On (13:37 06/01/07), Kalle Olavi Niemitalo <[EMAIL PROTECTED]> put forth the
proposition:
> David Woodfall <[EMAIL PROTECTED]> writes:
>
> > At the moment I'm saving a page and using
> >
> > w3m -dump xxx.htm | lp
> >
> > Is there a way of setting up a keyboard shortcut/alias to do this?
>
> doc/lua-scripting.txt includes a "Printing" example that formats
> the document with ELinks (rather than w3m) and prints the result.
> However, it uses "writeto" which apparently is in Lua 4 but not
> in Lua 5. For Lua 5, you can instead use:
>
> -- print the current document (for Lua 5)
> function print()
> local lp, errmsg = io.popen("lp", "w")
> if lp == nil then
> error(errmsg)
> else
> lp:write(current_document_formatted(79))
> lp:close()
> end
> end
> bind_key('main', 'P', print)
>
> I don't have w3m installed but I imagine you could use "w3m -dump
> - | lp" in the popen call and current_document() in lp:write,
> or create a temporary file.
Thanks for the info. Unfortunately the elinks package I'm using was
compiled without Lua support.
But I have managed by setting up a URI passing options called Print
and pointing to a bash script:
elinks -no-references -dump $@ | lp 2>/dev/null 1>&2
Seems to work ok so far.
Thanks again.
> _______________________________________________
> elinks-users mailing list
> [email protected]
> http://linuxfromscratch.org/mailman/listinfo/elinks-users
--
Basic is a high level languish.
APL is a high level anguish.
_______________________________________________
elinks-users mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-users