HXCOPY(1) | HTML-XML-utils | HXCOPY(1) |
hxcopy - copy an HTML file and update its relative links
hxcopy [ -i old-URL ] [ -o new-URL ] [ -s ] [ -v ] [ file-or-URL [ file-or-URL ] ]
The hxcopy command copies its first argument to its second argument, while updating relative links. The input is assumed to be HTML or XHTML and may be slightly reformatted in the process.
If the second argument is omitted, hxcopy writes to standard output. In this case the option -o is required. If the first argument is also omitted, hxcopy reads from standard input. In this case the option -i is required.
The following options are supported:
To use a proxy to retrieve remote files, set the environment variables http_proxy and ftp_proxy. E.g., http_proxy="http://localhost:8080/"
Unlike the last argument of cp(1), the last argument of hxcopy must be a file, not a directory.
The second argument must be a local file. Writing to a URL is not yet implemented. To work around this, replace hxcopy file.html http://example.org/file.html by hxcopy -o http://example.org/file.html file.html tmp.html and then upload tmp.html to the given URL with some other command, such as curl(1). The first argument, however, may be a URL. hxcopy will download the given file. (Currently only HTTP is supported.)
Assume the HTML file foo.html contains a relative link to "../bar.html". Here are some examples of commands:
9 Dec 2008 | 7.x |