Mike Schilli's Friendly Neighborhood Perl Shop

Home
USArundbrief.com
Resume
CPAN Modules
Articles in English
Articles in German
Mike's Script Archive
English-Japanese Translation Trainer
Adventures with O'Reilly's Safari
10 Easy Steps to Become a California Driver
Unofficial perlmonks.com IRC Channel
My Collection of Outage Pages
Prisma (Computer Club Deutschland)
Mike's Monologues
Mike's Script Archive: rel2abs

rel2abs - Make relative links in an HTML document absolute


DOWNLOAD

rel2abs


SYNOPSIS

    rel2abs [-h] base_url [html_file]
 base_url:  The base URL used to make links absolute, e.g. http://perlmeister.com
 html_file: The input html file. Output goes to STDOUT
 Options:
   -h     get help


OPTIONS

-h
Prints this manual page in text format.


DESCRIPTION

rel2abs takes a html document, either specified as a file on the command line or streaming in via STDIN, and transforms all relative links in there to absolute ones, using a specified base URL. It streams its output to STDOUT.

It is currently looking for <IMG SRC=...> and <A HREF=...> tags only.


EXAMPLES

  $ rel2abs http://perlmeister.com index.html >myindex.html


LEGALESE

Copyright 2002 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.


AUTHOR

2002, Mike Schilli <m@perlmeister.com>


Latest update: 20-Oct-2013