diff -r 000000000000 -r 868dae1581ff README --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README Fri Jul 24 07:39:57 2009 -0700 @@ -0,0 +1,149 @@ +--------------------------------------------------------------------- + WHAT IS THIS? +--------------------------------------------------------------------- + +Vimoutliner already comes with some otl to HTML converters that work +quite well. I maintain a few different otl files, that are displayed +on a internal intranet - the step of converting to HTML on every little +change before upload was becoming mildly irritating, and countering my +near legendary laziness. + +This mod_perl handler teaches apache how to pretty print otl natively. + +Now, I can just edit the otl files directly - skip the conversion step +altogether, and let Apache make some delicious looking outlines. + +--------------------------------------------------------------------- + INSTALLATION +--------------------------------------------------------------------- + +First off all, make sure you have a mod_perl enabled Apache2. + +1) Add the following lines in your httpd.conf, or in a + separate otl.conf in the apache Includes directory: + + ------------------------- + PerlSwitches -I/path/to/perl/libraries + PerlModule Apache::OTL + + + SetHandler perl-script + PerlResponseHandler Apache::OTL + + ------------------------- + +2) Put the included css at /otl_style.css in your document root. + + +That's it! Apache will now pretty-print all your otl files. + +--------------------------------------------------------------------- + SETTINGS +--------------------------------------------------------------------- + +Settings for the otl_handler are stored on the first line of the otl +files themselves, prefixed by a colon. See the sample.otl for an +example settings line. All settings are entirely optional. + +title + Type: string + Default: filename + + The title of the OTL. Used as a header, and the html title. + If this is not set, the html title is derived from the filename. + + +style + Type: string + Default: /otl_style.css + + A path to the css style. + + +js + Type: string + Default: none + + Use javascript? If set, loads an external javascript library, + and calls init_page() on body load. + See the example 'folding' javascript included. + + +divs + Type: boolean + Default: 0 + + Wrap each outline group in a div class called "group" + + +dividers + Type: boolean + Default: 0 + + Separate each outline group with a horizontal rule? + + +legend + Type: boolean + Default: 0 + + Display small legend for todo and done items? + + +sort + Type: boolean + Default: 0 + + Show sort links? + + +sorttype + Type: string + Default: none + + Default sorting method. Valid values are + percent + alpha + + +sortrev + Type: boolean + Default: 0 + + Should we default to reverse sorting? + + +counts + Type: boolean + Default: 0 + + Count and display sub items? + + +timer + Type: boolean + Default: 0 + + Display how long the parser took to generate the html? + + +--------------------------------------------------------------------- + INCLUDED FILES +--------------------------------------------------------------------- + +otl_handler.pl + The mod_perl code itself. + Feel free to modify to taste. + +themes/* + Example css. Again, modify to taste! + +otl.js + Example (but functional!) javascript. If you use this + file, your top level items will be 'clickable' - expanding + the sub items underneath, but not initially showing them. + +sample.otl + An example vimoutliner file, with optional settings. + +