NAME
vendpage - manage HTML pages for Vend
SYNOPSIS
vendpage [-
3] [-m] [-n] [-i imagepath] [-h htmldir] [-v venddir]
DESCRIPTION
This program manages a tree of web pages that need submission to the Andrew Wilcox's Vend "shopping cart" software. It recursively scans a tree of pages and writes a corresponding tree of processed pages. If the directory tree does not exist, it will be created. It takes normal HTML hyperlinks and changes them based on a few rules. The rules are:
If the hyperlink is absolute, either beginning with a '/' or a protocol specification (i.e. http: or mailto:) it is left unchanged.
If the hyperlink is relative, not taking any BASE tag into account, it is changed to be relative to the Vend PageDir directory. The A HREF="file" specification is also changed to the Vend [page file] specification, preserving the text between the anchors.
If the hyperlink is a simple transfer to a name in the same document, it is not changed -- i.e. <A HREF="#name">anchor text </A> will not be touched.
Image specifications that are relative are changed so that the image must be in the image directory, which unless specified (in the form of a path relative to the HTTP server DocumentRoot) is DocumentRoot/images. Spaces between quote marks and URLs are stripped.
Comments that begin with [vend] are stripped and passed on to the Vend page as Vend tags. For example:
<!-- [vend] [order DB-201-A]DB-201-A Antenna[/order] [/vend] -->
becomes:
[order DB-201-A]DB-201-A Antenna[/order]
Anything between the [vend] - [/vend] pair will be passed on, including comment terminators and starters. The possibility exists to nest HTML and Vend designations so that one source tree can be used for both Vend and standard HTML.
Options
- -3
-
Use Vend 0.3 style page codes with quotes ([page "somepage"]).
- -hhtmldir
-
The directory which HTML will be taken from, defaults to /home/billc/web-public. This can be easily changed in the source.
- -iimagepath
-
The path relative to the HTTP server document root that IMG sources should be changed to.
- -m
-
Rename *.htm files in source tree to *.html.
- -n
-
Do not process IMG tags.
- -s
-
Silent mode, do not echo file names as they are processed.
- -vdirectory
-
The directory which processed Vend source will be written to, defaults to VendRoot/vend/pages.
Dependencies
Requires the "Getopt::Std" in perlmod and find.pl library modules.
Requires 'mkdir -
p' if the directories are to be automatically created. The File::Path module could easily be patched in to solve this.
Author
<A HREF="mailto:mikeh@iac.net>
Mike Heins, Internet Robotics
</A>