2011-08-20T19:34:56-0700, s...@panix.com wrote:
> YOu can use named pipes and a background script
> which processes the data from the named pipe in any way you want.
>
>
> On Sat, Aug 20, 2011 at 09:37:38PM -0400, Daniel Choi wrote:
> > Instead of performing the save-formatted action, which saves to a file,
> > I'd like to pipe the formatted contents of a web page displayed by
> > ELinks to a custom shell command (which, for example, sends the content
> > to a printer).
> >
> > Is there a convenient way to do this?
This is on a Mac. *nix would be something like "firefox -remote %c"
I just press 'S' and it goes to the external browser, but you can make
another one that pipes it through some commands and out through a
printer. (html2text %c | lpr ? IDK. Maybe you have to background it too?)
set document.uri_passing.safari = "open %c 2>/dev/null"
bind "main" "S" = "tab-external-command"
>From the config:
## document.uri_passing
# Rules for passing URIs to external commands. When one rule is defined the
# link and tab menu will have a menu item that makes it possible to pass the
# the link, frame or tab URI to an external command. If several rules are
# defined the link and tab menu will have a submenu of items for each rule.
#
# Note, this is mostly useful for launching graphical viewers, since there is
# no support for releasing the terminal while the command runs. The action
# and submenus are also available by binding keys to the
# frame-external-command, the link-external-command, and the
# tab-external-command actions.
## document.uri_passing.safari
# A rule for passing URI to an external command. The format is:
# %c in the string means the current URL
# %% in the string means '%'
# Do _not_ put single- or double-quotes around %c.
set document.uri_passing.safari = "open %c 2>/dev/null"
bind "main" "S" = "tab-external-command"
--
# Joseph Sullivan
# ~~~
# I met this girl, she was an actress, and she gave me her number. It
# started with 555.
# -- Mitch Hedberg
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users