MAN page from Mandriva 2010 webgrep-2.12-5mdv2010.0.i586.rpm
Section: User Commands (1)
Updated: Jan 2000Index
lshtmlref - list all relative links in html files
[-ahdAWL] [-i filelist] html-files
searches html files for relative links and prints the path names to these files.This can be used to build consistent tar archives from a number of htmlpages. lshtmlref
helps to include into these tar archives all web pages, images, text files etc...
Note: lshtmlref is not recursive. It will only list the links in the files provided on the command line. lshtmlref
expands a relative file path into a direct straight path by removingany .. and compensating it with the previous path component.lshtmlref
list each linked file only once independent of how often the file is referencedfrom any of the html-files. lshtmlref
finds out whether or not a link points to a directory by using stat
(2). Itcan therefore only conclude that a given index file must be appended to the file name ifthe directory does really exist. See option -i on how to specify the file nameof the index file.
To avoid errors in from the tar programlshtmlrefdoes not include broken links. Instead it warns about non existentfiles on stderr unless -W option is given.
- Print all relative links independent on whether the files exist or not.
- Print all links from the web-pages in debug format with line number and html-file name
- Prints a little help/usage information.
- Index files to use when an URL points to a directory. This is a commaseperated list. The default value is:
- List all links (absolut, relative, mailto ...) in the files. This option may be used to get an overview overthe content of a html file. This option must not be used when building a tar ball.
- Do not list the file names that were provided on the command line.
- Do not warn about broken links on stderr. Normally lshtmlref will checkthe existence of the referenced file and print an error message if it does not exist.
Build a tar archive that includes all text files, images, etc... whichare referenced with relative links (The quotes below are back-quotes):tar cvf web.tar `lshtmlref *.html */*.html`
Build a tar ball from all the images, html files etc... thatare referenced by index.html with relative links:
lshtmlref index.html | xargs tar cvf ball.tar
Check that relative links from the files a.html and b.html do not point to any other html files than a.html and b.html. Thischeck can be useful before you build a complete tar archive:
lshtmlref -L a.html a.html | fgrep .html
no known bugs
Guido Socher (guido.socherAATTlinuxfocus.org)
- SEE ALSO
This document was created byman2html,using the manual pages.