list2tree.pl
list2tree.pl [ options ] < sourcefile.html
Options: -c closeimg image file used for closed nodes; default 'closedbook.gif' -h display this help and exit -l link set tree head link to link; default '#TOP' -n no icons in tree widget; default is icons on -o output path of root directory where output files are written; default './' -p input is a Pod::ProjectDocs output file -r rootimg image file used for root of tree; default is openimg -t title tree head title text; default is <title> of source file; enclose title in quotes if includes spaces -w widgetpkg name of a Perl package implementing the widget; default 'HTML::ListToTree::DTree' -x openimg image file used for open nodes; default 'openbook.gif'
Convert HTML nested lists within a source document to Javascript tree widget.
Reads input from STDIN. Input should be an HTML file with an ordered (<ol>) or unordered (<ul>) list (possibly nested) preceded by
<!-- INDEX START -->
and followed by
<!-- INDEX END -->
Outputs several files:
<output>/sourcefile_main.html - a frameset container <output>/sourcefile_frame.html - the original sourcefile.html with the nested list index removed <output>/sourcefile_tree.html - the Javascripted tree widget <output>/css/tree.css - CSS for the widget (if any) <output>/js/tree.js - Javascript for the widget (if any) <output>/img/* - icon image files (if any)
Directories will be created as needed.
To install HTML::ListToTree, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::ListToTree
CPAN shell
perl -MCPAN -e shell install HTML::ListToTree
For more information on module installation, please visit the detailed CPAN module installation guide.