Query: hxcopy
OS: debian
Section: 1
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
HXCOPY(1) HTML-XML-utils HXCOPY(1)NAMEhxcopy - copy an HTML file and update its relative linksSYNOPSIShxcopy [ -i old-URL ] [ -o new-URL ] [ file-or-URL [ file-or-URL ] ]DESCRIPTIONThe 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.OPTIONSThe following options are supported: -i old-URL For the purposes of updating relative links, act as if old-URL is the location from which the input is copied. If this option is omitted, the actual location of the first argument is used for calculating relative links. -o new-URL For the purposed of updating relative links, act as if new-URL is the location to which the input is copied. If this option is omitted, the actual location of the second argument is used for calculating relative links.ENVIRONMENTTo use a proxy to retrieve remote files, set the environment variables http_proxy and ftp_proxy. E.g., http_proxy="http://localhost:8080/"BUGSUnlike 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.)EXAMPLEAssume the HTML file foo.html contains a relative link to "../bar.html". Here are some examples of commands: hxcopy foo.html bar/foo.html The file foo.html is copied to ../bar/foo.html and the relative link to "../bar.html" becomes "../../bar.html". hxcopy foo.html ../foo.html The file foo.html is copied to ../foo.html and the relative link to "../bar.html" is rewritten as "bar.html". hxcopy -i http://my.org/dir1/foo.html -o http://my.org/foo.html file1.html file2.html The file file1.html is copied to file2.html and the relative link to "../bar.html" is rewritten as "bar.html". A command like this may be useful to update files that are later uploaded to a server.SEE ALSOcp(1), curl(1), hxwls(1) 6.x 9 Dec 2008 HXCOPY(1)
Related Man Pages |
---|
httpindex(1) - debian |
template::plugin::file(3) - centos |
html::linkextractor(3pm) - debian |
mojo::url(3pm) - debian |
template::plugin::file(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
Number of html files |
another question? |
Bash too many arguments error |
awk command in special character |
Word count in html files |