wax - webify your CLI
wax [OPTIONS] program [OPTIONS] ...
$ wax grep -B1 demons http://www.mplayerhq.hu/DOCS/man/en/mplayer.1.txt $ wax espeak -f http://www.setec.org/mel.txt $ alias perldoc="wax perldoc" $ perldoc -F "http://www.pair.com/~comdog/brian's_guide.pod"
wax is a simple command-line program that runs other command-line programs and converts their URL arguments to file paths. The remote resources are saved as temporary files, which are cleaned up after the waxed program has exited.
wax
The following wax options can be supplied before the command name. Subsequent options are passed to the waxed program verbatim, apart from URLs, which are converted to paths to the corresponding temporary files. To exclude args from waxing, pass them after -- e.g.
--
wax command -f http://www.example.com -- --title http://www.example.com
The separator token can be overridden with the -s or --separator option e.g.
-s
--separator
wax -s --nowax command -f http://www.example.com --nowax --title http://www.example.com
Print diagnostic information to STDERR.
Display this documentation.
Set the token used to mark the end of waxable options. Default: --.
Note: the separator token is removed from the list of options passed to the command.
Disable detection of the wax separator token i.e. the default -- separator is not used to mark the end of waxable options.
Set the timeout for HTTP requests in seconds. Default: 60.
Set the user-agent string for HTTP requests.
As with any command-line programs that take URL parameters, care should be taken to ensure that special shell characters are suitably quoted. As a general rule, URLs that contain &, ~, <, >, $ &c. should be single- or double-quoted in shells on Unix-like systems, and double-quoted with embedded escapes in Windows cmd/command.exe-like shells.
&
~
<
>
$
cmd
command.exe
It's worth checking that a program actually needs waxing. Many command-line programs already support URLs:
vim http://www.vim.org/ gedit http://projects.gnome.org/gedit/ eog http://upload.wikimedia.org/wikipedia/commons/4/4c/Eye_of_GNOME.png gimp http://upload.wikimedia.org/wikipedia/commons/6/6c/Gimpscreen.png
&c.
0.3.1
rlwrap
sshfs
chocolateboy, <chocolate@cpan.org>
Copyright (C) 2010-2011 by chocolateboy
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install App::Wax, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Wax
CPAN shell
perl -MCPAN -e shell install App::Wax
For more information on module installation, please visit the detailed CPAN module installation guide.