--- vimoutliner-0.3.4+pristine.orig/debian/install +++ vimoutliner-0.3.4+pristine/debian/install @@ -0,0 +1,23 @@ +ftplugin/vo_*.vim usr/share/vim/addons/ftplugin/ +add-ons/plugins/vo_checkbox.vim usr/share/vim/addons/ftplugin/ +add-ons/plugins/vo_hoist.vim usr/share/vim/addons/ftplugin/ +syntax/vo_*.vim usr/share/vim/addons/syntax/ +ftdetect/vo_base.vim usr/share/vim/addons/ftdetect/ +colors/*.vim usr/share/vim/addons/colors +doc/* usr/share/vim/addons/doc +vimoutlinerrc etc/vim/ + +# registry file +debian/*.yaml usr/share/vim/registry/ + +## contrib files +# otl handler for apache +debian/contrib/doc/otl_handler/* usr/share/doc/vim-vimoutliner/examples/otl_handler +debian/contrib/scripts/otl_handler/* usr/share/doc/vim-vimoutliner/examples/otl_handler +# otl2html +debian/contrib/doc/otl2html/ljlogo.png usr/share/doc/vim-vimoutliner/examples/otl2html +debian/contrib/doc/otl2html/*.html usr/share/doc/vim-vimoutliner/examples/otl2html +debian/contrib/doc/otl2html/*.css usr/share/doc/vim-vimoutliner/examples/otl2html +debian/contrib/doc/otl2html/README usr/share/doc/vim-vimoutliner/examples/otl2html +debian/contrib/doc/otl2html/*.otl usr/share/doc/vim-vimoutliner/examples/otl2html + --- vimoutliner-0.3.4+pristine.orig/debian/docs +++ vimoutliner-0.3.4+pristine/debian/docs @@ -0,0 +1 @@ +VERSION --- vimoutliner-0.3.4+pristine.orig/debian/control +++ vimoutliner-0.3.4+pristine/debian/control @@ -0,0 +1,20 @@ +Source: vimoutliner +Section: editors +Priority: optional +Maintainer: Patrick Schoenfeld +Homepage: http://www.vimoutliner.org/ +Build-Depends: debhelper (>= 7), quilt +Build-Depends-Indep: sharutils +Standards-Version: 3.8.2 +Vcs-Svn: svn://svn.debian.org/collab-maint/deb-maint/vimoutliner/trunk +Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/deb-maint/vimoutliner + +Package: vim-vimoutliner +Architecture: all +Depends: ${misc:Depends}, vim | gvim, perl, python, libxml-writer-perl, libpalm-perl +Replaces: vimoutliner +Recommends: vim-addon-manager +Description: script for building an outline editor on top of Vim + Vimoutliner provides commands for using the Vim text editor as an + outline editor, to organize text hierarchically into discrete + sections. --- vimoutliner-0.3.4+pristine.orig/debian/copyright +++ vimoutliner-0.3.4+pristine/debian/copyright @@ -0,0 +1,32 @@ +This package was debianized by Matej Cepl on +Wed, 4 Dec 2002 16:29:33 -0500. + +It was downloaded from + http://www.vimoutliner.org + +This package uses a different tarball compared to previous package +versions. In fact it uses the original pristine tarball from upstream, +instead of one which contains external contributions. + +Upstream Authors: Steve Litt + Noel Henson +Copyright: + Copyright © 2001,2003 Steve Litt + Copyright © 2001,2003,2004 Noel Henson + + This package is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this package; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. + --- vimoutliner-0.3.4+pristine.orig/debian/postinst +++ vimoutliner-0.3.4+pristine/debian/postinst @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +#DEBHELPER# +# create vim-tags for documentation +helpztags /usr/share/vim/addons/doc >/dev/null --- vimoutliner-0.3.4+pristine.orig/debian/otl2docbook.1 +++ vimoutliner-0.3.4+pristine/debian/otl2docbook.1 @@ -0,0 +1,56 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH otl2docbook 1 "January 13, 2005" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +otl2docbook \- converts vimoutliner outline to Docbook +.SH SYNOPSIS +.B otl2docbook +.SH DESCRIPTION +This manual page documents briefly the +.B otl2docbook +Perl script. +.P +.B otl2docbook +is a +.BR perl (1) +script that converts a +.BR vimoutliner (1) +outline to HTML. +.P +.B otl2docbook +script with outline on standard input will +produce Docbook XML document on standard output. +.SH SEE ALSO +.BR vim (1), +.BR perl (1) +.SH REQUIREMENTS +This program uses the +.B XML::Writer +perl module, which is available +on +.B CPAN. +.SH AUTHOR +The original version was written by Thomas R. Fullhart to convert from Emacs +outline mode. +It is available at +.UR +http://genetikayos.com/code/repos/outline2docbook/distribution/. +http://genetikayos.com/code/repos/outline2docbook/distribution/. +.UE + +This manual page was written by Matej Cepl , +for the Debian GNU/Linux system (but may be used by others). --- vimoutliner-0.3.4+pristine.orig/debian/README.source +++ vimoutliner-0.3.4+pristine/debian/README.source @@ -0,0 +1,7 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +Further information can be found here (with the quilt package installed): +/usr/share/doc/quilt/README.source + --- vimoutliner-0.3.4+pristine.orig/debian/manpages +++ vimoutliner-0.3.4+pristine/debian/manpages @@ -0,0 +1,4 @@ +debian/otl2docbook.1 +debian/otl2html.1 +debian/otl2pdb.1 +debian/vo_maketags.1 --- vimoutliner-0.3.4+pristine.orig/debian/changelog +++ vimoutliner-0.3.4+pristine/debian/changelog @@ -0,0 +1,345 @@ +vimoutliner (0.3.4+pristine-9) unstable; urgency=low + + [ martin f. krafft ] + * Add note about vim-addons to README.Debian + (closes: #451286, #435704, #432891). + * Fix reference to upstream README (closes: #469657). + * Drop .py suffix from menu invocations; thanks to David Nusinow + (closes: #308073). + + [ Patrick Schoenfeld ] + * New maintainer + * Add a recommend for vim-addon-manager + * Add a Homepage field to debian/control + * Update Standards-Version to 3.8.2; no changes needed + * Improve description a bit, to be more oriented towards the target + audience and by removing an orphaned word + (Closes: #486538) + * Add ${misc:Depends} to debian/control + * Remove docs from debian/examples which are not part of the upstream + tarball; they'll eventually be added again later + * Add dependency on debhelper 7 + * Make debian/rules use debhelper 7 magic + * Add a debian/install file + * Add 'set -e' to postinst to make lintian quiet + * Add build-dependency on quilt + * Add quilt stuff to debian/rules + * Add patch to make plugin actually work in global runtime path which was + hidden in changes to the upstream tarball (urg!) + * Add a patch to remove installation instructions from vo readme, + because they are pointless for the package + * Update README.Debian + * Add a debian/NEWS file + * Properly document the copyright holders and let license file point + to the GPL-2 file instead of the generic GPL file in + /usr/share/common-licenses/ + * Add examples, which had been hidden in the modified upstream tarball + to debian/contrib. + * Change XS-Vcs-Svn into Vcs-Svn and add Vcs-Browser in debian/control + * Add a patch to fix color names + * Document the fact that watch file support is currently not possible + in debian/watch + * Add a README.source to document patch handling + * Put 'set -e' on an own line instead of adding it as an argument to + /bin/sh, to avoid different behaviour if script gets called manually + * Adjust debhelper compat level + * Add a patch to properly set maplocalleader to ',,' in the config + * Update upstream URL in debian/copyright + * Make package use a different tarball + + -- Patrick Schoenfeld Tue, 23 Jun 2009 14:53:58 +0200 + +vimoutliner (0.3.4-8) unstable; urgency=low + + * Added a vim-addons registry file; + thanks to Jan Schumacher (closes: #432891). + + -- martin f. krafft Sat, 14 Jul 2007 16:59:50 +0200 + +vimoutliner (0.3.4-7) unstable; urgency=medium + + * Only call helpztags on package remove, not on purge as well; thanks to + Lucas Nussbaum for the report (closes: #398529). Medium urgency as this is + RC. + * Also silence the helpztags output when there are no errors. + + -- martin f. krafft Tue, 14 Nov 2006 12:39:58 +0100 + +vimoutliner (0.3.4-6) unstable; urgency=low + + * New maintainer (closes: #394837). No other changes for now. + + -- martin f. krafft Tue, 24 Oct 2006 09:20:34 +0200 + +vimoutliner (0.3.4-5) unstable; urgency=low + + * Mention :he vimoutliner in README.Debian (closes: bug#382710). + * Move examples to their proper places (closes: bug#382708). + * Changed Depends: to vim | gvim (formerly it was vim (>=6.3) -- forgot gvim + and I guess nowhere in Debian world I can get vim less than 6.3). + + -- Matej Cepl Wed, 23 Aug 2006 23:47:13 -0400 + +vimoutliner (0.3.4-4) unstable; urgency=low + + * comment in README.Debian on the issue of + (closes: bug#377111). + + -- Matej Cepl Sun, 9 Jul 2006 20:23:12 -0400 + +vimoutliner (0.3.4-3) unstable; urgency=low + + * Fixing compatibility issues (rising compatibility versions). + * lintian issue: debhelper should be Build-Depends not only + Build-Depends-Indep. + + -- Matej Cepl Wed, 5 Jul 2006 14:03:18 -0400 + +vimoutliner (0.3.4-2) unstable; urgency=low + + * Forgot to close a bug fixed long time (closes: Bug#316626, bug#376042) + + -- Matej Cepl Sat, 8 Oct 2005 13:40:12 -0400 + +vimoutliner (0.3.4-1) unstable; urgency=low + + * New upstream stable release. + + -- Matej Cepl Mon, 20 Jun 2005 13:08:25 -0400 + +vimoutliner (0.3.3.9-3) unstable; urgency=low + + * New upstream beta -- fixing couple of apparent typos. + * Setting 'syntax on' in /etc/vim/vimoutlinerrc and removing + remark about need to set it in ~/.vimrc from help. + * Fixed ftplugin/vo_base.vim so that VO plugins are loaded from + ftplugin directory, not from plugins one, where is none. + + -- Matej Cepl Mon, 13 Jun 2005 07:54:01 -0400 + +vimoutliner (0.3.3.9-2) unstable; urgency=low + + * Delayed loading of modules, plus now VO actually loads! :-) + + -- Matej Cepl Thu, 9 Jun 2005 09:11:09 -0400 + +vimoutliner (0.3.3.9-1) unstable; urgency=low + + * Testing beta version of the upstream package. + + -- Matej Cepl Tue, 7 Jun 2005 22:30:46 -0400 + +vimoutliner (0.3.3-6) unstable; urgency=low + + * Everything in /etc/vim/vimoutlienrrc is commented out -- + Debian release manager did not feel it OK to include so big + change into frozen Debian. + + -- Matej Cepl Tue, 10 May 2005 13:22:39 -0400 + +vimoutliner (0.3.3-5) unstable; urgency=low + + * Using helpztags instead of internal vim commands (according + to vim policy, closes: bug#307527, bug#307906) + * Created a global configuration file /etc/vim/vimoutlinerrc, + which is read before and in addition to ~/.vimoutlienrrc. + * vo_maketags.pl works even when user doesn't have + ~/.vimoutliner created (and creates it for him). + * do not install useless filetype.vim; vim makes now ftdetect + subdirectory working per default. + * because of the previous, bump up the minimal version of vim + required to 6.3 (available in Debian/sarge). + + -- Matej Cepl Sat, 7 May 2005 17:01:14 -0400 + +vimoutliner (0.3.3-4) unstable; urgency=low + + * Fixed README.Debian: poor English (closes: Bug#305591) and + running non-standard scripts (vo_checkbox and vo_hoist). + * fixed lintian bug: description-synopsis-starts-with-an-article + + -- Matej Cepl Wed, 20 Apr 2005 23:20:12 -0400 + +vimoutliner (0.3.3-3) unstable; urgency=low + + * New upstream version of otl2html script. + * Fixed manpage for otl2html -- option -t is not available + anymore (closes: Bug#297313) and harmonized with the current + version of the script. + + -- Matej Cepl Sat, 5 Mar 2005 20:09:16 -0500 + +vimoutliner (0.3.3-2) unstable; urgency=low + + * vo_maketags script is again in /usr/bin as it supposed to be + (closes: Bug#292373). + + -- Matej Cepl Wed, 26 Jan 2005 15:01:48 -0500 + +vimoutliner (0.3.3-1) unstable; urgency=low + + * New upstream release: + - syntax/vo_base.vim was rewritten, so it works on startup + (closes: Bug#285452, Bug#255433). + * Added Martin Krafft as co-maintainer. + + -- Matej Cepl Tue, 18 Jan 2005 17:35:08 -0500 + +vimoutliner (0.3.2a-1) unstable; urgency=low + + * New upstream release (closes: Bug#246177). + * Applied patch for correction ("Safely" missing in vo_checkbox.vim; + closes: Bug#246173). + * Added upstream example of vimoutlinerrc (closes: Bug#246176). + + -- Matej Cepl Thu, 29 Apr 2004 01:57:05 -0400 + +vimoutliner (0.3.2-3) unstable; urgency=low + + * Corrected pathname to examples directory in postinst script (closes: + Bug#237627). + + -- Matej Cepl Sat, 13 Mar 2004 13:15:22 -0500 + +vimoutliner (0.3.2-2) unstable; urgency=low + + * Corrected README.Debian -- suggested settings in /etc/vim/vimrc are + unnecessary and actually harmfull in vim available in unstable. (closes: + Bug#234501). + * Fixed paths in vimoutlinerrc example (they should point to the real + location of vo_*.vim scripts). + + -- Matej Cepl Tue, 24 Feb 2004 12:29:25 -0500 + +vimoutliner (0.3.2-1) unstable; urgency=low + + * New upstream release. + * Update of manpages. + + -- Matej Cepl Wed, 18 Feb 2004 01:35:20 -0500 + +vimoutliner (0.3.1-1) unstable; urgency=low + + * New upstream release. + * Works with any installed version of vim; actually long time ago, but + I forgot to close it :-) (closes: Bug#204216). + + -- Matej Cepl Fri, 17 Oct 2003 22:55:58 -0400 + +vimoutliner (0.3.0-20030905-2) unstable; urgency=low + + * Added TODO.Debian file for items to be added into next + uploaded release. + * vo_INSTALL.TXT should not be installed. + + -- Matej Cepl Wed, 10 Sep 2003 02:32:16 +0200 + +vimoutliner (0.3.0-20030905-1) unstable; urgency=low + + * Experimental scripts included again (these were removed by mistake). + * New upstream CVS versions. + + -- Matej Cepl Fri, 5 Sep 2003 19:05:29 +0200 + +vimoutliner (0.3.0-20030824-1) unstable; urgency=low + + * Fixed changelog, which was incomprehensible :-). + * Experimental modules are now left in + /usr/share/vim/addons/experimental and note is included into + README.Debian, how they could be activated. + * Changed Standards-Version to 3.6.1 + * new CVS version. orig.tar.gz file now use exactly the + directory structure uploaded from upstream (modules from + experimental are not moved to ftplugin in tarball). + * included experimental modul for working with subtrees + (vo_hoist.vim). + * using date-based version numbers for CVS versions. + + -- Matej Cepl Sun, 31 Aug 2003 23:40:36 +0200 + +vimoutliner (0.3.0-4) unstable; urgency=low + + * setfiletype in /usr/share/vim/addons/ftdetect + + -- Matej Cepl Sun, 17 Aug 2003 11:10:14 +0200 + +vimoutliner (0.3.0-3) unstable; urgency=low + + * New experimental upstream version (with experimental module + vo_checkbox.vim for working with To-Do lists). + * sed is an essential package, so I do not have to it put into + Build-Depends-Indep: + * Corrected manpages -- vimoutliner.1 removed and other edited + (closes: Bug#205202). + * Documentation in vo_readme.txt is properly installed and tags are + generated (closes: Bug#204887). + * setfiletype is in /etc/vim/filetype.vim + + -- Matej Cepl Wed, 13 Aug 2003 14:43:22 +0200 + +vimoutliner (0.3.0-2) unstable; urgency=low + + * Experimental new upstream version. + * Paths changed according to proposed Debian Vim Scripts Policy. + * Revised according to 3.5.8 Debian Policy. + + -- Matej Cepl Sat, 2 Aug 2003 13:35:02 +0200 + +vimoutliner (0.3.0-1) unstable; urgency=low + + * New upstream version. + + -- Matej Cepl Mon, 23 Jun 2003 13:24:10 -0400 + +vimoutliner (0.2.99-5) unstable; urgency=low + + * New CVS version. + + -- Matej Cepl Fri, 13 Jun 2003 00:26:35 -0400 + +vimoutliner (0.2.99-4) unstable; urgency=low + + * things which belong to /usr/share/doc are there + + -- Matej Cepl Sun, 27 Apr 2003 20:59:54 -0400 + +vimoutliner (0.2.99-3) unstable; urgency=low + + * Changes in filetype.vim are managed by postinst/prerm scripts + + -- Matej Cepl Mon, 21 Apr 2003 15:22:13 -0400 + +vimoutliner (0.2.99-2) unstable; urgency=low + + * Pre-release of 0.3 + * INSTALLING.txt replaced by new version of INSTALL.TXT + * Get rid off ol.sh + * otl2html.1 and otltags.1 manpages added + + -- Matej Cepl Mon, 21 Apr 2003 13:51:35 -0400 + +vimoutliner (0.2.99-1) unstable; urgency=low + + * new upstream version + + -- Matej Cepl Mon, 10 Feb 2003 01:09:00 -0500 + +vimoutliner (0.2-3) unstable; urgency=low + + * changed to Architecture: all + * /etc/vimoutlinerconf is configuration file + * perl dependency added + + -- Matej Cepl Sun, 2 Feb 2003 23:13:00 -0500 + +vimoutliner (0.2-2) unstable; urgency=low + + * Newest dev version + + -- Matej Cepl Mon, 23 Dec 2002 01:36:32 -0500 + +vimoutliner (0.2-1) unstable; urgency=low + + * Initial Release. + + -- Matej Cepl Wed, 4 Dec 2002 16:29:33 -0500 --- vimoutliner-0.3.4+pristine.orig/debian/otl2html.1 +++ vimoutliner-0.3.4+pristine/debian/otl2html.1 @@ -0,0 +1,118 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH otl2html 1 "March 5, 2005" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +otl2html \- converts vimoutliner outline to HTML +.SH SYNOPSIS +.B otl2html +.RI [ filename ] +.SH DESCRIPTION +This manual page documents briefly the +.B otl2html +Python script. +.P +.B otl2html +is a +is a +.BR python (1) +script that converts a +.BR vimoutliner (1) +outline to HTML. +.P +.B otl2html +script called just with filename of the processed outline will +produce HTML document on standard output. +.SH OPTIONS +.\".TP +.\".B -t +.\".I type +.\"Specify the format type. +.\".P +.\".RS +.\"Types: +.\".TP +.\".B simple +.\"uses HTML tags

through +.\".TP +.\".B bullets +.\"uses HTML tags
    and
  • . +.\".TP +.\".B numeric +.\"uses HTML tags
      and
    1. for 1.1.1 +.\".TP +.\".B roman +.\"uses HTML tags
        and
      1. for I.I.I +.\".TP +.\".B alpha +.\"uses HTML tags
          and
        1. for A.A.A +.\".TP +.\".B indent +.\"uses HTML tags
            and
          1. +.\".P +.\"Not compatible with -s or -S. +.\".RE +.TP +.B -p +Presentation: slide show output for use with HtmlSlides. +.TP +.B -D +First-level is divisions (
            ) for making pretty web +pages. +.TP +.B -s +.I sheet +Use the specified style sheet with a link. +.\"Not compatible with -t. +.TP +.B -S +.I sheet +Include the specified style sheet in-line the output. +For encapsulated style. +.\"Not compatible with -t. +.TP +.B -T +The first line is not the title. Treat it as outline data +.TP +.B -c +Hide comments (line with [ as the first non-whitespace +character. +Ending with ] is optional. +.TP +.B -C +.I copyright +Override the internal copyright notice with the one supplied in +the quoted string following this flag. +Single or double quotes can be used. +.TP +.B -v +Print version (RCS) information. +.TP +.B -H +Show the file syntax help. +.SH SEE ALSO +.BR vim (1), +.BR python (1) +.ig +.br +The script is fully documented on +.UR http://www.troubleshooters.com/projects/vimoutliner/index.htm +http://www.troubleshooters.com/projects/vimoutliner/index.htm +.UE +.. +.SH AUTHOR +This manual page was written by Matej Cepl , +for the Debian GNU/Linux system (but may be used by others). --- vimoutliner-0.3.4+pristine.orig/debian/NEWS +++ vimoutliner-0.3.4+pristine/debian/NEWS @@ -0,0 +1,8 @@ +vimoutliner (0.3.4-9) unstable; urgency=low + + From this version on the package does not change the localleader in + comparison to the upstream package. For Debian users who didn't set + their own maplocalleader parameter this means that the localleader changed + from '\' to ',,' as it is in upstream documentation. + + -- Patrick Schoenfeld Sat, 20 Jun 2009 09:52:21 +0200 --- vimoutliner-0.3.4+pristine.orig/debian/README.Debian +++ vimoutliner-0.3.4+pristine/debian/README.Debian @@ -0,0 +1,52 @@ +vimoutliner for Debian +---------------------- + +Dear user, this package provides the vim addon ADDON, but it is +not enable per default. If you want to enable it for your user +account just execute vim-addons install ADDON. Similarly, to +enable it for all users of this system just execute (as root) +vim-addons -w install ADDON. vim-addons is provided by the +vim-addon-manager package, have a look at its manpage for more +information. + +1) Behavior of the package has changed from previous versions! + Scripts vo_checkbox.vim and vo_hoist.vim are now considered + stable and thus they could be sourced by the ingenious + mechanism controlled by run g:vo_modules_load variable in + /etc/vim/vimoutlinerrc. + +2) If you want to use different localleader uncomment in + /etc/vim/vimoutlinerrc the following line and change the value + of the variable to whatever you want. + + "let maplocalleader = ",," " this is prepended to VO key + +4) For information how to use vimoutliner, you can use vim help + under :he vimoutliner. + +5) Two very useful plugins for VO -- hoist and checkbox -- ARE + enabled by default. Their status could be changed by changes + in the global variable g:vo_modules_load either in the VO + global configuration file /etc/vim/vimoutlinerrc or in + personal configuration file ~/.vimoutlinerrc. + +Additional information from the upstream vo_INSTALL.TXT file: + +Feedback +Any feedback concerning these scripts or VimOutliner should be +sent to: noel@noels-lab.com (of course, all feedback concerning +bugs in packaging should still go to Debian BTS, use +reportbug(1)). + +Participation +If you'd like to help with the development, testing and/or +documentation of VimOutliner, please join the mailing list. You +can do so here: +http://www.lists.vimoutliner.org/mailman/listinfo/vimoutliner +or by sending email to vimoutliner-request@vimoutliner.org with +word "subscribe" in Subject: line of the message. + +Have fun! +Noel + +" vim:set nobackup tw=65 fo=tcqn ai: --- vimoutliner-0.3.4+pristine.orig/debian/watch +++ vimoutliner-0.3.4+pristine/debian/watch @@ -0,0 +1,2 @@ +# Upstream has currently no website we can properly watch, +# so DEHS support is disabled for now. --- vimoutliner-0.3.4+pristine.orig/debian/otl2pdb.1 +++ vimoutliner-0.3.4+pristine/debian/otl2pdb.1 @@ -0,0 +1,94 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH otl2pdb 1 "January 13, 2005" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +otl2pdb \- converts vimoutliner outline to AddressDB Palm file. +.SH SYNOPSIS +.B otl2pdb +.RI [ filename ] +.SH DESCRIPTION +This manual page documents briefly the +.B otl2pdb +Perl script. +.P +.B otl2pdb +is a +.BR perl (1) +script that takes an outline from +.BR vimoutliner (1) +with contact information and creates an AddressDB.pdb file +for a Palm. +.P +For now this script can only create a .pdb file. +You then have to use a syncing tool to load it into your Palm. +I recommend the +.I pilot-link +package for linux. +.P +The format of the contact outline is the following: + + $category + $record_name + c:$cell + a:$address + .... +.P +You can have as many categories and records(entries) as you want. +The following are valid fields for a record with the necessary text +to indicate them in quotes: + + 'a:'-address + 'c:'-cell + 'e:'-email + 'h:'-home phone + 'n:'-note + 'web:'-website + 'w:'-work phone + +Also, each record's category is left as 'Unfiled' as I can't get the record's +category to write correctly. + +.SH SEE ALSO +.BR vim (1), +.BR perl (1) +.SH REQUIREMENTS +This program uses the +.B Palm::Address +perl module, which is available on +.B CPAN. +.SH TIPS +If using the pilot-link package: + + -load the pdb with 'pilot-xfer -i AddressDB.pdb' + -specify the serial port if other than /dev/pilot (which will usually be the case + unless you link to it) with -p in the above command; usually this is /dev/ttyS0 in linux + +.SH AUTHOR +The original version was written by Gabriel Walker +. +.P +If you like using perl, linux, vim and databases to make your +life easier (not lazier ;) check out my website at +.UR http://www.chwhat.com +http://www.chwhat.com. +.UE +.P +This manual page was written by Matej Cepl +(using +.BR perldoc (1) +part of the documented script), +for the Debian GNU/Linux system (but may be used by others). --- vimoutliner-0.3.4+pristine.orig/debian/postrm +++ vimoutliner-0.3.4+pristine/debian/postrm @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +#DEBHELPER# +# update vim-tags on removal +[ "$1" = remove ] && helpztags /usr/share/vim/addons/doc >/dev/null || : + +exit 0 --- vimoutliner-0.3.4+pristine.orig/debian/vim-registry.yaml +++ vimoutliner-0.3.4+pristine/debian/vim-registry.yaml @@ -0,0 +1,11 @@ +addon: vimoutliner +description: Vim as an outline editor +files: + - ftplugin/vo_checkbox.vim + - ftplugin/vo_hoist.vim + - ftplugin/vo_base.vim + - syntax/vo_base.vim + - colors/vo_dark.vim + - colors/vo_light.vim + - doc/vo_readme.txt.gz + - ftdetect/vo_base.vim --- vimoutliner-0.3.4+pristine.orig/debian/compat +++ vimoutliner-0.3.4+pristine/debian/compat @@ -0,0 +1 @@ +7 --- vimoutliner-0.3.4+pristine.orig/debian/vo_maketags.1 +++ vimoutliner-0.3.4+pristine/debian/vo_maketags.1 @@ -0,0 +1,50 @@ +.\" Hey, EMACS: -*- nroff -*- +.\" First parameter, NAME, should be all caps +.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection +.\" other parameters are allowed: see man(7), man(1) +.TH vo_maketags 1 "August 13, 2003" +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.SH NAME +vo_maketags \- build TAGS for vim outliner +.SH SYNOPSIS +.B vo_maketags +.RI [ filename ] +.SH DESCRIPTION +This manual page documents briefly the +.B vo_maketags +Perl script. +.PP +.B vo_maketags +is a +.BR perl (1) +script that creates tag file which works with +.B vimoutliner +.RB ( vim (1) +plugin for editing outlines). +.SH OPTIONS +.B vo_maketags +script called just with filename of the processed outline, which +is a top of the hierarchy of linked outlines. +.SH SEE ALSO +.BR vim (1) +.ig +.br +The script is fully documented on +.UR http://www.vimoutliner.org +http://www.vimoutliner.org +.UE +.. +.SH AUTHOR +This manual page was written by Matej Cepl , +for the Debian GNU/Linux system (but may be used by others). --- vimoutliner-0.3.4+pristine.orig/debian/rules +++ vimoutliner-0.3.4+pristine/debian/rules @@ -0,0 +1,43 @@ +#!/usr/bin/make -f + +# Uncomment this for verbose output +#export DH_VERBOSE=1 + +include /usr/share/quilt/quilt.make + +build: build-stamp +build-stamp: $(QUILT_STAMPFN) + dh build + uudecode debian/contrib/doc/otl2html/ljlogo.png.b64 \ + -o debian/contrib/doc/otl2html/ljlogo.png + touch build-stamp + +clean: unpatch + dh clean + -rm debian/contrib/doc/otl2html/ljlogo.png + +install: build install-stamp +install-stamp: + dh install + gzip -9 debian/vim-vimoutliner/usr/share/vim/addons/doc/* + # Permission fix + chmod -x debian/vim-vimoutliner/usr/share/vim/addons/ftplugin/vo_*.vim + # Install scripts + install -D -m755 scripts/vo_maketags.pl \ + debian/vim-vimoutliner/usr/bin/vo_maketags + install -D -m755 debian/contrib/scripts/otl2html.py \ + debian/vim-vimoutliner/usr/bin/otl2html + install -D -m755 debian/contrib/scripts/otl2pdb.pl \ + debian/vim-vimoutliner/usr/bin/otl2pdb + install -D -m755 debian/contrib/scripts/otl2docbook.pl \ + debian/vim-vimoutliner/usr/bin/otl2docbook + touch install-stamp + +binary-arch: install + dh binary-arch + +binary-indep: install + dh binary-indep + +binary: binary-arch binary-indep + --- vimoutliner-0.3.4+pristine.orig/debian/patches/03-change_color_names.patch +++ vimoutliner-0.3.4+pristine/debian/patches/03-change_color_names.patch @@ -0,0 +1,24 @@ +# Change color names to match the filename, because otherwise +# vim sometimes complains that colorschems cannot be found. +# I don't know if this is the right way to fix this, but for now +# this solution does the trick +Index: vimoutliner-0.3.4/colors/vo_dark.vim +=================================================================== +--- vimoutliner-0.3.4.orig/colors/vo_dark.vim 2009-06-20 13:44:29.000000000 +0200 ++++ vimoutliner-0.3.4/colors/vo_dark.vim 2009-06-20 13:44:37.000000000 +0200 +@@ -1,4 +1,4 @@ +-let g:colors_name="VO Dark" ++let g:colors_name="vo_dark" + hi normal guifg=white guibg=black ctermfg=white ctermbg=black + hi StatusLine guifg=white guibg=black ctermfg=white ctermbg=black + hi StatusLineNC guifg=white guibg=black ctermfg=white ctermbg=black +Index: vimoutliner-0.3.4/colors/vo_light.vim +=================================================================== +--- vimoutliner-0.3.4.orig/colors/vo_light.vim 2009-06-20 13:44:29.000000000 +0200 ++++ vimoutliner-0.3.4/colors/vo_light.vim 2009-06-20 13:44:44.000000000 +0200 +@@ -1,4 +1,4 @@ +-let g:colors_name="VO Light" ++let g:colors_name="vo_light" + hi normal guifg=black guibg=white ctermfg=white ctermbg=black + hi StatusLine guifg=black guibg=white ctermfg=white ctermbg=black + hi StatusLineNC guifg=black guibg=white ctermfg=white ctermbg=black --- vimoutliner-0.3.4+pristine.orig/debian/patches/01-fix-vo-plugin-in-global-runtime-path.patch +++ vimoutliner-0.3.4+pristine/debian/patches/01-fix-vo-plugin-in-global-runtime-path.patch @@ -0,0 +1,65 @@ +# This patch changes the plugin so that it works in the global runtime directory +# It also adds support for the .vimoutliner directory +Index: vimoutliner-0.3.4/ftdetect/vo_base.vim +=================================================================== +--- vimoutliner-0.3.4.orig/ftdetect/vo_base.vim 2009-06-20 09:04:16.000000000 +0200 ++++ vimoutliner-0.3.4/ftdetect/vo_base.vim 2009-06-20 09:05:09.000000000 +0200 +@@ -74,9 +74,7 @@ + "Revision 1.1 2003/02/08 21:11:26 noel + "Initial revision + " +-if exists("did_load_filetypes") +- finish +-endif ++ + augroup filetypedetect + au! BufRead,BufNewFile *.otl setfiletype vo_base + au! BufRead,BufNewFile *.oln setfiletype xoutliner +Index: vimoutliner-0.3.4/ftplugin/vo_base.vim +=================================================================== +--- vimoutliner-0.3.4.orig/ftplugin/vo_base.vim 2009-06-20 09:05:31.000000000 +0200 ++++ vimoutliner-0.3.4/ftplugin/vo_base.vim 2009-06-20 09:10:14.000000000 +0200 +@@ -57,10 +57,10 @@ + + " Load the plugin {{{1 + " Prevenet the plugin from being loaded twice +-"if exists("b:did_ftplugin") +-" finish +-"endif +-"let b:did_ftplugin = 1 ++if exists("b:did_ftplugin") ++ finish ++endif ++let b:did_ftplugin = 1 + let b:current_syntax = "outliner" + + " User Preferences {{{1 +@@ -74,6 +74,10 @@ + + " End User Preferences + ++" Personal configuration options files as per Matej Cepl ++setlocal runtimepath+=$HOME/.vimoutliner,$HOME ++runtime! .vimoutlinerrc vimoutlinerrc ++ + " VimOutliner Standard Settings {{{1 + setlocal autoindent + setlocal backspace=2 +@@ -574,7 +578,7 @@ + imap - ---------------------------------------- + + " switch document between the two types of bodytext styles +-if use_space_colon == 1 ++if g:use_space_colon == 1 + " First, convert document to the marker style + map b :%s/\(^\t*\) :/\1/e:%s/\(^\t*\) /\1 : /e:let @/="" + " Now, convert document to the space style +@@ -669,7 +673,7 @@ + let s:tmp = strpart(s:tmp, s:idx + 1) + let s:idx = stridx(s:tmp, ':') + "exec 'ru! ftplugin/vo_' . part . '.vim' +- exec "runtime! plugins/vo_" . s:part . ".vim" ++ exec "runtime! ftplugin/vo_" . s:part . ".vim" + endwhile + + " The End --- vimoutliner-0.3.4+pristine.orig/debian/patches/series +++ vimoutliner-0.3.4+pristine/debian/patches/series @@ -0,0 +1,4 @@ +01-fix-vo-plugin-in-global-runtime-path.patch +02-patch-install-instructions-out-of-docs.patch +03-change_color_names.patch +04-fix-maplocalleader-in-default-config.patch --- vimoutliner-0.3.4+pristine.orig/debian/patches/02-patch-install-instructions-out-of-docs.patch +++ vimoutliner-0.3.4+pristine/debian/patches/02-patch-install-instructions-out-of-docs.patch @@ -0,0 +1,119 @@ +# Remove installation instructions from upstream readme +Index: vimoutliner-0.3.4/doc/vo_readme.txt +=================================================================== +--- vimoutliner-0.3.4.orig/doc/vo_readme.txt 2009-06-20 09:43:59.000000000 +0200 ++++ vimoutliner-0.3.4/doc/vo_readme.txt 2009-06-20 09:47:02.000000000 +0200 +@@ -5,9 +5,6 @@ + LICENSE |vo-license| + VERSION |vo-version| + INSTALLING AND TESTING VIMOUTLINER |vo-install| +- Automatic method |vo-auto-install| +- Updating an existing installation |vo-updating| +- Manual method |vo-manual-install| + Color schemes |vo-color| + Testing |vo-testing| + Debian |vo-debian| +@@ -64,103 +61,6 @@ + ------------------------------------------------------------------------- + INSTALLING AND TESTING VIMOUTLINER *vo-install* + +- How do I install VimOutliner? +- Automatic Method |vo-auto-install| +- Updating |vo-updating| +- Manual Method |vo-manual-install| +- Testing |vo-testing| +- +- Automatic method *vo-auto-install* +- +- The new automatic installation targets Unix-compatible +- platforms. +- $ tar xzvf vimoutliner-0.3.x.tar.gz +- $ cd vimoutliner +- $ sh install.sh +- +- First you can decide whether to install the VimOutliner +- files or abort the process leaving everything unchanged. +- Assuming you confirmed the installation, the script +- creates the necessary directory tree and copies the files +- which provide the core functionality and documentation. +- +- With the second question you decide whether you want to +- install some brand new add-ons, currently implementing +- hoisting and checkboxes. +- +- Updating an existing installation *vo-updating* +- +- Updating an existing installation might require some +- manual work. +- +- If you are already working with a previous VimOutliner +- release, there is a slight chance that the current directory +- tree is different from your current one. In this case, you +- will have to manually migrate your files to the new locations. +- +- The installation script creates unique backups of files +- being replaced with newer versions. So if you put some +- local customisations into, say $HOME/.vimoutlinerrc, you'll +- probably have to merge the backup with the new file by hand. +- +- +- Manual method *vo-manual-install* +- +- You can also copy the files from the unpacked distribution +- tarball into their destination folders by yourself. The +- following steps are a description of what has to go where +- and assume some knowledge of your vim setup. +- +- If you encounter problems, please contact the mailinglist +- for an immediate solution and more complete future +- documentation. www.lists.vimoutliner.org +- +- If you want to setup VimOutliner on a system running Microsoft +- Windows, the directory $HOME denotes the base folder of the +- vim installation. If you're on Unix based system, $HOME +- is as usual. +- +- You need the following subtrees in your $HOME directory: +- $HOME/.vim/ +- doc/ ftdetect/ ftplugin/ syntax/ +- $HOME/.vimoutliner/ +- plugins/ scripts/ +- +- The distribution tarball unpacks into a directory vimoutliner +- with the following contents +- add-ons/ +- plugins/ (2) +- scripts/ (2) +- doc/ (1) +- ftdetect/ (1) +- ftplugin/ (1) +- install.sh* +- scripts/ (2) +- syntax/ (1) +- vimoutlinerrc (3) +- +- (1) The content of these folders should be copied to their +- namesakes in the $HOME/.vim folder +- (2) The content of these folders should be copied to their +- namesakes in the $HOME/.vimoutliner folder +- (3) This file needs to be moved to $HOME/.vimoutlinerrc +- +- Your $HOME/.vimrc file should contain the lines +- filetype plugin indent on +- syntax on +- +- Your $HOME/.vim/ftplugin/vo_base.vim file should contain +- the lines +- runtime! ftdetect/*.vim +- +- Finally, you need to integrate the online help provided +- with VimOutliner into the vim help system. Start vim +- and execute the following command: +- :helptags $HOME/.vim/doc +- +- At this point, VimOutliner should be functional. +- Type "help vo" to get started. +- + Color Schemes *vo-color* + + Color schemes specify the colors Vim Outliner uses when --- vimoutliner-0.3.4+pristine.orig/debian/patches/04-fix-maplocalleader-in-default-config.patch +++ vimoutliner-0.3.4+pristine/debian/patches/04-fix-maplocalleader-in-default-config.patch @@ -0,0 +1,15 @@ +# This patch changes the default localleader to ',,' as used +# in the documentation of vimoutliner +Index: vimoutliner-0.3.4/vimoutlinerrc +=================================================================== +--- vimoutliner-0.3.4.orig/vimoutlinerrc 2009-06-23 11:40:13.000000000 +0200 ++++ vimoutliner-0.3.4/vimoutlinerrc 2009-06-23 11:40:16.000000000 +0200 +@@ -12,7 +12,7 @@ + let g:vo_modules_load = "checkbox:hoist" + + "User Preferences *************************************************** +-"let maplocalleader = ",," " this is prepended to VO key mappings ++let maplocalleader = ",," " this is prepended to VO key mappings + + "setlocal ignorecase " searches ignore case + "setlocal smartcase " searches use smart case --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl_handler/sample.otl +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl_handler/sample.otl @@ -0,0 +1,37 @@ +:title=Sample OTL list :style=/otl_style.css :divs=1 :dividers=0 :legend=1 :js=/otl.js :last_mod=1 + +[_] 58% Things to get for party + [_] 50% Food + [_] Chips + [X] Dips + [X] Honey roasted peanuts + [_] Sausage + [_] 66% Party favors + [X] Hats + [X] Whistles + [_] Beer bong + +[_] 18% House projects + [_] 12% Paint + [_] 25% Buy paint and supplies + [_] Paint + [X] Brushes + [_] Trays + [_] Overalls + [_] 0% Rooms done + [_] Bathroom + [_] Bedroom + : Red? + [_] 20% Upgrade electrical + [_] 2 circuits to computer room + [_] 40% Get equipment + [X] Romex wire + [_] 0% Entry feed wire + : How much of this do I really need? + : I should probably go out to the street + : and measure stuff. + [_] Service meter + [X] Grounding rods + [_] Breakers + [_] Learn about electricity + [_] Don't die --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl_handler/README +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl_handler/README @@ -0,0 +1,147 @@ +--------------------------------------------------------------------- + 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 Apache. + +1) Add the following lines in your httpd.conf: + + ------------------------- + PerlRequire /path/to/otl_handler.pl + + + SetHandler perl-script + PerlHandler 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. + +otl_style.css + 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. + + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo3.html +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo3.html @@ -0,0 +1,381 @@ + +OTL2HTML Webpage Demonstration + + + + + +
            +

            OTL2HTML Webpage Demonstration

            +
            +
            +
          + +
          +
            +
          1. Tina's Birthday +
          2. Scope
              +

              Plan and execute a barbeque for the family and close friends. This is to +be a combination barbeque and birthday party for Tina.

              +
            +
          3. Features
              +
            1. Western Theme +
            2. Hay rides +
            3. Horseback rides +
            4. Games
            +
          4. To Do (50%)
              +
            1. [_] 50% Vital
                +
              1. [_] Send Invitaions +
              2. [X] Buy Present
                  +
                1. Options (in order of preference)
                    +
                  1. Pony +
                  2. MP3 Player (the second choice is reasonable) +
                  3. XBox +
                  4. Bicycle
                  +
                +
              +
            2. [X] 100% Important
                +
              1. [X] Order Clown +
              2. [X] Rent Horse and Handler
              +
            3. [_] 0% Optional
                +
              1. [_] Mow Lawn +
              2. [_] Trim Hedges +
              3. [_] Wash Dog
              +
            +
          5. Materials (%)
              +
            1. [_] 63% Barbeque
                +
              1. [_] 83% Food
                  +
                1. [X] 20 Burgers +
                2. [X] 20 Hamburger Buns +
                3. [X] 20 Hotdogs +
                4. [X] 20 Hotdog Buns +
                5. [X] Potato Chips +
                6. [_] Potato Salad
                +
              2. [_] 33% Drink
                  +
                1. [_] Soda +
                2. [_] Diet Soda +
                3. [X] Beer
                +
              3. [_] Chairs for 30 +
              4. [X] Tables (2 or 3) +
              5. [X] 5 Bags of ice +
              6. [_] 20 Hay Bails
              +
            2. [_] 66% Birthday
                +
              1. [_] Cake +
              2. [X] 100% Party Favors
                  +
                1. [X] Hats +
                2. [X] Poppers +
                3. [X] Whistles
                +
              3. [X] Disposable Cameras
              +
            3. Guests
                + + + + + +
                NameRSVPFood to Bring
                Bill, Joan and BillieYESCorn Bread
                JonesYESPopcorn Balls
                Jack & JillYESSoda
                GrandmaYESnone
                +
              +
            +
          6. Summary
              +

              This is just a simple example of what can be done.

            +
          +
        + + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo.otl +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo.otl @@ -0,0 +1,47 @@ +OTL2HTML Webpage Demonstration +_Menu + **Home** + [demo1.html About] + [demo2.html Usage] + [demo3.html Party Report] + [mailto:noel@noels-lab.com Contact] + Links + [http://www.vimoutliner.org Vim Outliner] + [http://www.troubleshooters.com Troubleshooters.com] + [http://www.sourceforge.net SourceForge.Net] + [http://www.freshmeat.net FreshMeat.Net] + [http://www.python.org Python] + [http://www.apache.org Apache] + [http://www.thinkgeek.com Think Geek] + [http://www.cnn.com CNN] + [http://www.linuxmag.com Linux Magazine] + [http://www.linuxjournal.com [ljlogo.png]] +News + December 1, 2004 + OTL2HTML.PY Tool Gets Twisted Upgrade + : Noel Henson's python-based otl2html.py tool gets a rather serious + : but twisted upgrade. Mr. Henson claims that the tool can now take an + : outline and generate a surprisingly nice-looking web page. The + : extension would allow for entire websites to be developed using the + : world renowned [http://www.vimoutliner.org Vim Outliner]. + : + : -- anonymous + November 28, 2004 + Hyperlinks and Images Are Added to OTL2HTML.PY + : In the same spirit as [http://txt2tags.sf.net TXT2TAGS], otl2html.py can + : now process and include hyperlinks and images into the html files it + : creates. The hyperlinks can be to web pages, ftp sites, mail-tos or + : any other standard URL. The images can be included as just images or + : as hyperlinks. Check out the LJ logo in the menu. + : + : -- anonymous +Main + : Using VO to generate pages like this is surprisingly simple. A simple + : .otl file and the otl2html.py script is all you need. To see the file + : that generated this page, [demo.otl click here]. By the way, a heading + : that stars with "_" won't show on the page. You can see examples of this + : in the aforementioned file. To invoke the otl2html.py tool enter the + : following from the command line: + Example + ; otl2html.py -D -s webpage.css demo.otl > demo.html + : Have fun with this upgraded and potentially cool tool. --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/otl2html.otl +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/otl2html.otl @@ -0,0 +1,51 @@ +OTL2HTML.PY +What is OTL2HTML.PY? + : It is a small program that converts Vim Outliner's OTL files + : into nicely formatted HTML files. It has two main output methods. One is + : for pretty, stand-alone web pages; useful for reports and instances + : where a 'Word' document might suffice. The other is for created HTML + : pages that might be used for web pages or for complete web sites. For + : easy customization it supports the use of both in-line and external CSS + : files. +Usage + otl2html.py [options] inputfile > outputfile + Command Line Option + ; -s sheet Use the specified style sheet with a link. + ; -S sheet Include the specified style sheet in-line. + ; -T The first line is not the title. + ; -D First level is divisions for pretty web pages. + ; -c Hide comments. + ; -C "copyright" Use the specified copyright. + ; -v Show the version. + ; -H Show the syntax help. +Beautification + : These are simple character styles. You must keep the start and end tags + : on the same line. + || Tag | Function | Usage | Presentation | + | ** | bold | **This is bold** This is not | **This is bold** This is not | + | // | italic | //This is italic// This is not | //This is italic// This is not | + | +++ | highlight | +++As if I used a highlighter+++ or not | +++As if I used a highlighter+++ or not | + | --- | strikeout | The price is ---old price--- new price | The price is ---old price--- new price | + | (c) | copyright symbol | Copyright (c) 2005 Noel Henson | Copyright (c) 2005 Noel Henson | + | (C) | copyright symbol | Copyright (C) 2005 Noel Henson | Copyright (C) 2005 Noel Henson | + : If proper nesting of tags is observed, several can be used at once: + : +++//**Highlight-Bold-Italic**//+++. + Bullets + || Tag | Function | Usage | Presentation | + | - | bulleted heading | - Heading |
        • Heading
            | + | + | numbered heading | + Heading |
            • Heading
                | + Horizontal Rule + : This is the final beautifier. Just put 40 dashes on a line and it + : will be show up as a simple horizontal rule. + ---------------------------------------- + : It makes this: + ---------------------------------------- +Supported VO Data Blocks + + Headings + + Body Text + Preformatted Text + Tables +Version and Copyright + ; Version 1.37 + ; Copyright (c) 2005 Noel Henson + ; License: GPL --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/party.html +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/party.html @@ -0,0 +1,330 @@ + +Tina's Birthday + + + + + +
                +

                Tina's Birthday

                +
                +
                +
                  +
                1. Scope
                    +

                    Plan and execute a barbeque for the family and close friends. This is to +be a combination barbeque and birthday party for Tina.

                    +
                  +
                2. Features
                    +
                  1. Western Theme +
                  2. Hay rides +
                  3. Horseback rides +
                  4. Games
                  +
                3. To Do (50%)
                    +
                  1. [_] 50% Vital
                      +
                    1. [_] Send Invitaions +
                    2. [X] Buy Present
                        +
                      1. Options (in order of preference)
                          +
                        1. Pony +
                        2. MP3 Player (the second choice is reasonable) +
                        3. XBox +
                        4. Bicycle
                        +
                      +
                    +
                  2. [X] 100% Important
                      +
                    1. [X] Order Clown +
                    2. [X] Rent Horse and Handler
                    +
                  3. [_] 0% Optional
                      +
                    1. [_] Mow Lawn +
                    2. [_] Trim Hedges +
                    3. [_] Wash Dog
                    +
                  +
                4. Materials (%)
                    +
                  1. [_] 63% Barbeque
                      +
                    1. [_] 83% Food
                        +
                      1. [X] 20 Burgers +
                      2. [X] 20 Hamburger Buns +
                      3. [X] 20 Hotdogs +
                      4. [X] 20 Hotdog Buns +
                      5. [X] Potato Chips +
                      6. [_] Potato Salad
                      +
                    2. [_] 33% Drink
                        +
                      1. [_] Soda +
                      2. [_] Diet Soda +
                      3. [X] Beer
                      +
                    3. [_] Chairs for 30 +
                    4. [X] Tables (2 or 3) +
                    5. [X] 5 Bags of ice +
                    6. [_] 20 Hay Bails
                    +
                  2. [_] 66% Birthday
                      +
                    1. [_] Cake +
                    2. [X] 100% Party Favors
                        +
                      1. [X] Hats +
                      2. [X] Poppers +
                      3. [X] Whistles
                      +
                    3. [X] Disposable Cameras
                    +
                  3. Guests
                      + + + + + +
                      NameRSVPFood to Bring
                      Bill, Joan and BillieYESCorn Bread
                      JonesYESPopcorn Balls
                      Jack & JillYESSoda
                      GrandmaYESnone
                      +
                    +
                  +
                5. Summary
                    +

                    This is just a simple example of what can be done.

                  +
                +
                + + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo2.otl +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo2.otl @@ -0,0 +1,27 @@ +OTL2HTML Webpage Demonstration +_Menu + [demo.html Home] + [demo1.html About] + **Usage** + [demo3.html Party Report] + [mailto:noel@noels-lab.com Contact] +_Main + ; Usage: + ; otl2html.py [ options ] inputfile > outputfile + ; Options + ; -p Presentation: slide show output for use with HtmlSlides. + ; -D First-level is divisions (for pretty web pages). + ; -s sheet Use the specified style sheet with a link. Not compatible + ; with -t. + ; -S sheet Include the specified style sheet in-line the output. For + ; encapsulated style. Not compatible with -t. Hide + ; -T The first line is not the title. Treat it as outline data + ; -c comments (line with [ as the first non-whitespace + ; character. Ending with ] is optional. + ; -C copyright Override the internal copyright notice with the + ; one supplied in the quoted string following this + ; flag. Single or double quotes can be used. + ; -v Print version (RCS) information. + ; -H Show the file syntax help. + ; output is on STDOUT + ; --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/otl2html.html +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/otl2html.html @@ -0,0 +1,329 @@ + +OTL2HTML.PY + + + + + +
                +

                OTL2HTML.PY

                +
                +
                +
                  +
                1. What is OTL2HTML.PY?
                    +

                    It is a small program that converts Vim Outliner's OTL files +into nicely formatted HTML files. It has two main output methods. One is +for pretty, stand-alone web pages; useful for reports and instances +where a 'Word' document might suffice. The other is for created HTML +pages that might be used for web pages or for complete web sites. For +easy customization it supports the use of both in-line and external CSS +files.

                    +
                  +
                2. Usage
                    +
                  1. otl2html.py [options] inputfile > outputfile +
                  2. Command Line Option
                      +
                       -s    sheet        Use the specified style sheet with a link.
                      + -S    sheet        Include the specified style sheet in-line.
                      + -T                 The first line is not the title.
                      + -D                 First level is divisions for pretty web pages.
                      + -c                 Hide comments.
                      + -C   "copyright"   Use the specified copyright.
                      + -v                 Show the version.
                      + -H                 Show the syntax help. 
                      +
                    +
                  +
                3. Beautification
                    +

                    These are simple character styles. You must keep the start and end tags +on the same line. +

                    + + + + + + + + +
                    TagFunctionUsagePresentation
                    **bold**This is bold** This is notThis is bold This is not
                    //italic//This is italic// This is notThis is italic This is not
                    +++highlight+++As if I used a highlighter+++ or notAs if I used a highlighter or not
                    ---strikeoutThe price is ---old price--- new priceThe price is old price new price
                    (c)copyright symbolCopyright (c) 2005 Noel HensonCopyright © 2005 Noel Henson
                    (C)copyright symbolCopyright (C) 2005 Noel HensonCopyright © 2005 Noel Henson
                    +

                    If proper nesting of tags is observed, several can be used at once: +Highlight-Bold-Italic. +

                    +
                  1. Bullets
                      + + + +
                      TagFunctionUsagePresentation
                      -bulleted heading- Heading
                      • Heading
                        +numbered heading+ Heading
                        • Heading
                          +
                        +
                      • Horizontal Rule
                          +

                          This is the final beautifier. Just put 40 dashes on a line and it +will be show up as a simple horizontal rule. +

                          +
                        1. ---------------------------------------- +

                          It makes this:

                          +
                        +
                      +



                    1. +
                    2. Supported VO Data Blocks
                        +
                      1. Headings +
                      2. Body Text +
                      3. Preformatted Text +
                      4. Tables
                      +
                    3. Version and Copyright
                        +
                         Version 1.37
                        + Copyright © 2005 Noel Henson
                        + License: GPL 
                      +
                    +
                    + + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo1.html +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo1.html @@ -0,0 +1,332 @@ + +OTL2HTML Webpage Demonstration + + + + + +
                    +

                    OTL2HTML Webpage Demonstration

                    +
                    +
                    +
          + +
          +
            +
          1. Main
              +

              OTL2HTML.PY is a script that takes Vim Outliner OTL files and converts +them to HTML for pretty printing and simple web pages. It supports CSS +both in-line and external for easy user-control of the appearance. +

              +

              +This is the last version of the 1.xx series. Its internal logic has +become convoluted and difficult to maintain much less extend. The 2.xx +series will be written to be recursive and possible object-oriented. It +will use external configuration files as well as command-line options. +And it will make it easy to print pretty reports, nice web pages with +navigation and even entire web sites (with a single OTL file!). Table of +contents and slide shows are also on the list of features. +

              +

              +Have fun!

            +
          +
          + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo3.otl +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo3.otl @@ -0,0 +1,65 @@ +OTL2HTML Webpage Demonstration +_Menu + [demo.html Home] + [demo1.html About] + [demo2.html Usage] + **Party Report** + [mailto:noel@noels-lab.com Contact] +_Main + Tina's Birthday + Scope + : Plan and execute a barbeque for the family and close friends. This is to + : be a combination barbeque and birthday party for Tina. + Features + - Western Theme + - Hay rides + - Horseback rides + - Games + To Do (50%) + [_] 50% Vital + [_] Send Invitaions + [X] Buy Present + Options (in order of preference) + + Pony + + MP3 Player (the second choice is reasonable) + + XBox + + Bicycle + [X] 100% Important + [X] Order Clown + [X] Rent Horse and Handler + [_] 0% Optional + [_] Mow Lawn + [_] Trim Hedges + [_] Wash Dog + Materials (%) + [_] 63% Barbeque + [_] 83% Food + [X] 20 Burgers + [X] 20 Hamburger Buns + [X] 20 Hotdogs + [X] 20 Hotdog Buns + [X] Potato Chips + [_] Potato Salad + [_] 33% Drink + [_] Soda + [_] Diet Soda + [X] Beer + [_] Chairs for 30 + [X] Tables (2 or 3) + [X] 5 Bags of ice + [_] 20 Hay Bails + [_] 66% Birthday + [_] Cake + [X] 100% Party Favors + [X] Hats + [X] Poppers + [X] Whistles + [X] Disposable Cameras + Guests + || Name | RSVP | Food to Bring | + | Bill, Joan and Billie | YES | Corn Bread | + | Jones | YES | Popcorn Balls | + | Jack & Jill | YES | Soda | + | Grandma | YES | none | + Summary + : This is just a simple example of what can be done. --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/README +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/README @@ -0,0 +1,25 @@ +The html files have been created with these commands: + +otl2html.py -S -D webpage.css demo.otl > demo.html +otl2html.py -S -D webpage.css demo1.otl > demo1.html +otl2html.py -S -D webpage.css demo2.otl > demo2.html +otl2html.py -S -D webpage.css demo3.otl > demo3.html +otl2html.py -S nnnnnn.css party.otl > party.html +otl2html.py -S nnnnnn.css otl2html.otl > otl2html.html + +This is the last of the 1.xx series of otl2html.py. It's internal logic has +become complex and unwieldy. It is being rewritten from the ground up to +be: + recursive + much simpler + use configuration files + +It will suport: + table of contents generation + slide shows + better general document authoring + better web page authoring + web site authoring + +Have fun! + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/ljlogo.png.b64 +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/ljlogo.png.b64 @@ -0,0 +1,88 @@ +begin-base64 644 ljlogo.png +iVBORw0KGgoAAAANSUhEUgAAAI4AAABFCAMAAACrDC5NAAAABGdBTUEAANbY +1E9YMgAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGA +UExURbwjKcQ9Qv34+NBkaezAwdd9gc5dYv79/em3ud2RlPvz8/fl5tRxdfz0 +9Prt7vz29tFobOexs89hZrUNFNZ4fNqGifXd3vrw8clNUu3Ext+Wmei0tt2O +kdNucuKgor8tMvbh4u7HycVARcpRVshKT7QJEPjp6s1ZXvHS1PHQ0sAxNvLU +1tuKjdJrb+asruq5u9d7f7oeJPTZ2uGeoMtVWvDNz+7GyL0nLbMFDNV0eOGd +n+SoqrgWHLcSGMM5PvDMztiAhMdGTO/KzOWqrLsgJr4qMMZCSOausOSmqLkY +HrYPFrkaILobIcE0OdZ3e9V2erMEC8EzOLIDCtmDhtqEh92Qk+CZnME1OtmC +hf36+uCanbQHDuCYm7UME7QID+GbnvPW1/Tb3Oq7vMhLUMxWW+eytOu/wP77 ++/fj5Ou+v9yLjuq8vcAvNPXf4Pnr7Prv8MdFS+u9vuzBw8I3PPPX2MdITctT +WMpPVN6Ul9yMj8I2O8xXXPjn6OSlp7ICCf///3S9xiAAAACAdFJOU/////// +//////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////// +//////////////////////////////////////////8AOAVLZwAADHhJREFU +eNpiqIcCVnlfEMjhqccABhApeZH6enZlLQhbAFlBBFhBoK99fT1vMlRBKJK8 +aXggWIGWopgvmAWUt0SSh9rtqyUEEEAMUBF2rToIkMVwDbs8VMqgvp5bGMqO +zUBSYQcRsxCrr9eAyteFIcnLwQQ1081hTBs+uHRSAEwwCyCAYM5RsIWK1GI4 +By7lXl9fZAHTKYdQoOYJEWLgra/Xg0oHSCKZwAMVZOCqF4Xpr5OGyebBnZjM +BBBAMOewQF1ooYnhnMwgiJRqSX19DNw0ZoQCSaje4khguEOlPfOQTCiFCqrU +15fEwgzQhckKwUQYMuoBAgjmHCmYkDiGc0KhUq5AzwvAnePGDlcQDxWSALKV +oWwlJAPEXaCC/kCOBMwAc160mIxlqa8HCCCYc5ihYo6YKVkIyTZGuHMMEe7W +hQoJ1dfzu0LZyEldExbDHkCOB8yAABawpLYNTKACyAMIIAbU1FhniZmSixEp +GZZKQKYpwlW4IRTA4yIKyQRnqFi0E5DDBwsqkPL6eiYllNgHCCCoc7g9MVMo +FGTAUrI1MJXAU3JdHSs8KXoj9EpDmUFFyPkYFqD5IB48vsNB0R0B54FDGyCA +oM6B2RNgiuEceCLXqK83RrimrhiWeBShei2AnteBZWM1JBNg6akAzLOCGeDF +DcypqjANCWBJgABiQE3JLvkYzuGEJT0u5JRcVxfnBFVghaQ3BZaSEQm9nssc +JSE4wUoZi6L6RFhSsxWEqAUIIKhzYMaUYabkMqgUW319ZA6Sc+BZHVaqmCDl +IREkAySDUEqaSHh2kMqHOVSYBaoWIIAgzomEuTIYwzVMMC2V9fWJXsjOMYSW +q2xQfgiwNoiGsp2RTICVA8JGEH4FzIBymM4gKZhagACCOAdujyCGcxJg1QJH +fT1HHQqAKi5AcGG5OA65MIWVA/JMaHkDDhCFFEAAQZyjD/NAIoZzUmEJTwGR +UBHlDBCkQ2u7WKDn/RC1QT1GOWACE1BHc01QKlwtQABBnFMJ8wAvhnNCoFKB +TPAC0RYa+y7gvCnug/B8MpbCNN8HvWRIRXOOP0IxQAAxoER/OWZKroZKVQML +RGhZKa9ngZQ2NeMgHGVgHmLA0iyA5yRnjKwGrW6YEIoBAgjsHHZfqIwDhmsi +Ya0LUWBZCS3PS7lckWoCZ4TnNWCliAySCbWwMhmRnvxRcoQYkmKAAGJAaULo +YTgHnsiBIVEUAPO7LFJ9K4LQC3MZSivFElYsIdKTfTRS8aWPbB1AAIGdwwIt +GeISMJwDS+SqiYjWhRVclANR5oIKbVhtEIRshQpmemJ3QzhHB8U6gABiQE7J +rlwYzoE1l3IQKdlCsZ5LHlGHmyPaC7CUHK2BMABeZfohmZoFd00yqnUAAQR2 +jgSi4EUHpYgimMkVYTG05vBKhKdUoN58WD3syYfUeMNo/QEbFQxw52ih5mWA +AAI5B54hQjFcwwXzG7DcTIhFtHuMhGFtFDlE6jWKxVJjcWIWaeLhSCnZHcU+ +gAACOUcbZkwShnPgeYUFUVwYIJVtKvCUCkxGZhZY2l5CaGUyUlMPtXAEA4AA +AjlHEFatKmA4B9YSt+FGFIjWSC1WWwVoRMcmIsypk0JKtbAKMwUuFIZS6tjm +ItsHEEAg5zggFbxoAJZXitPhBSKkcZ8ADTYZeYTnYS2NIBaEATU26EWamBdq +mYySQgACiAGpCaGOmZKVkVoX8ij1EbRRaRiLaJnAWnY2NQgDioLgpQOsE4lW +RYB8CgcAAQR0Dq851iIA3LpwRXgBViCWopYAUBCBVDXaIaVkKbTqv54FLXBA +rTAEAAggoHNKvJAKNVRg5IVI5ByojXtBVEP1EFUaSupUR262gxrlsFwcZIPR +4QICgABiQNjjJYbhHJhUbC6idQFt3GtEI7tGNQGpUEAqvmDVPbhhDErZsJKy +rloOSxepHiCAgM4JhqVkfgznwFKDCx+8/QprWfG6IjtHnh+pWYVUHcB6FnWl +4Ajkl4V3HLjhLq2LR6gHCCAGRMGL2cWCN/Ts0uHNYC2meiyJRwg5y6jCuyO5 +sGQZlInSkKmTB/Y0ZNH7o0AAEEAMiOa2QKogCnAX4zJEdEBN49DKD1Pk2OIE +jRzAU0NBJDRbwUOQERw48NZkrBlS7YxcfwAEEEO9pmodDuBuFIdIDdaIdg+0 +JeSLpDQblA3l4Vw2FqMSSTllC1QLs+E2gdtDefA2M6LfARBADIhGCjqIyxBE +ysawZk0qRsICFa3caG3goNhYpA4rpEQTM6xDtCxB/gmsQ4xsQAFAADHA7cEA +5vUySPWcBKLdA2t1WqAVZZy4TGIAuZapAG6wGmoZi5S3AAKIATHCgQ6S4Y1I +1ZJ6fmh54YrIfkixBcnakjgM8mJBKY1VWdBqIKRWKEAAMXAx4HKOCDz0XXnr +tVURrYt6DOMqIWW4G3bXgC0ThI+4BWNUIIiCEyCAGOCtCwxgDe8hSSAKYeSR +TERsQcvzXFdscV6EMmJTJx8J0w8fDAI14yAAIIAYUnG5RlWhXh5RmYlith0Q +g0+2sNZfnrJtEGqF5M0jjjpuEWeFNCSLFrz19QABxCCEyzk2FTKw/rBAlBUs +nQjFx4SFAREQxMvB0qKLVFhYVExMvJVcmBBK3Ado+RkbxwBl/OBxIC8VFR8F +1AwkrSzhbneBBg9AADHk1FEVBEXj5kGEsOuDJmaAAGLwrRsUANr+AAggBvPB +4Rxo6AAEYLkOcQAGQiAA1iCaVC7/OFt3L1gEiP3/SwqXJqhhAc11P4wISDIS +pxgMc6/yNb3AScAqc2N7pYA2DltJWe0DOMnGsUXLUlsre5xoT5XhGOZSbFda +b3r/h/MTQNDRr8i0zCSUNnS6O6ssjxxKk6MmKS3bvp4bSCINIPKmpaVlsjjl +oTQE8rIz0wp56/MKC81Qx4qSWNKykWcP6rWzUe0FCCCoc4rQuiMJkDxurojW +Ic0Bt/O1mNAbNMIqSB1PSOUSA2qY+nBhDAmjTHo4orUGAQKIATF+h6SOiRFL +NxnUPNACN9Z8mTDai3Uu3Gjj9LL1UcDaCLmTmeeJ0dUtRXMfQAAhDeQiCbOA +Cx5VlAoc7JxAcBhhcw5yw58TUk0Dm58uvBgjPSi9chU05wAEEHbngLr05hlR +yENWMOeAQqcK1TmWUbaovgY7xxU0soPiHEhTxg6fcwACCLtzBMDVGqhTro7N +OeGoznEGt6NN0CJLVUEPZVAHNtJjzoTHOQABhN05QuA2krYwyvAcTufIgdvA +JujDBIUcaM5RQWqq4XAOQADhdk4K2DkSqDEYCO6pE+ecsCTUyAI1XqMDQMND +uJ0DEEAMiBkyNOeYoDunEu6cKgLOgYwn8HCgOkcB2NMI90YdAkd3DkAAkeCc +LFzOsa43Qe3hQ5yjLIjqHFB2Za5CavxjcQ5AACE5R5co52BJOwa1NnUotgCd +Y2tRJ68XgJJ2QN1OTgnY6Dh25wAEEO60Q7xzIM1zBZRSWcu2zjNMFcU5oMaW +NNBkNzzOAQggstKOLxNmr9cKdfZUxbVOmFUYxTnAGLXQFoFMKONyDkAAkeAc +RKmMLXQMS1BylrpKXZC6F3LaAdVYtuIVkMkLXM4BCCASIgunc5hDfVAb9UDn +MOsCIwwldPKACUwepB7aX8fqHIAAokbacQb3/gtQnMMWBS5kkEIHNJbuIyCB +OvyG7hyAAGKo13ZyUuRTJDp0sBaDoOLfDcU5KYVBaCP/UfDKVgC3cwACiIEd +1HaP0SDaOVgrCR4M5yhDhleQnMMDd04pbucABBADeMGHlEYARaGD6ZxkSJ8O +KbJA0WTj4gJstZjz43QOQABBnBMGcg5SWmSG11llqG08iHPsIvE7JxQ0AlaK +6hwmYCzEFXGJAzvaXkY4nQMQQAzglTJRGqhNGx5wTxg0/CeEWqq6ggszt3qC +znGDTHIjIgtUY9nkgYdhAlhQnIM86gYQQAzgAWJlS9T+LqhKNlSMQJ06zgYN +W0kzora0cDlHCTIhjHAOqMbyZYesDJBDcY4Wj6wArNEJEEAM8IncACeEeYqg +bAFuShZiLtNBKYFxpR1GSAGJcI4cZH4SUslhTAjBEgpAADHA1zsoRSJ1a2CD +PozITTfYwJQ5H+rQqBW43GFEqU606rXB7W0u5AlHUCrRhDoLdRYZ5hyAAAIW +gx6O5gwM5o7Ig9/13Lq+DAwMWswoE9lcrHYgQTbkSXJFJSUljvoKRiUlpBTp +zKjEXM+rDJQygWciHaAS0GQRX7mSkgB8WN4SKAoEjDFQPkCAAQBO6asaI8sL +EwAAAABJRU5ErkJggg== +==== --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/webpage.css +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/webpage.css @@ -0,0 +1,290 @@ +/* copyright notice and filename */ +body { + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + background-color: #888888; +} + /* title at the top of the page */ +H1 { + border: 1px solid blue; + font-family: helvetica,arial,sans-serif; + font-size: 14pt; + font-weight: bold; + text-align: left; + color: black; + background-color: #ddddee; + padding-left: 10px; + padding-bottom: 10px; + padding-top: 10px; +} +H2 { + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + font-weight: bold; + text-align: left; + color: black; +} +H3 { + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + text-align: left; + color: black; +} +H4 { + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + text-align: left; + color: black; +} +H5 { + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + text-align: left; + color: black; +} + /* outline level spacing */ +OL { + padding-bottom: 8pt; + margin-left: -20px; +} + /* global heading settings */ +LI { + font-family: helvetica,arial,sans-serif; + color: black; + font-weight: normal; + list-style: lower-alpha; + margin-left: -5px; + padding-top: 4px; +} + /* level 1 heading overrides */ +LI.L1 { + font-size: 12pt; + font-weight: bold; + list-style: none; +} + /* level 2 heading overrides */ +LI.L2 { + font-size: 10pt; + font-weight: bold; + list-style: none; +} + /* level 3 heading overrides */ +LI.L3 { + font-size: 10pt; + list-style: none; +} + /* level 4 heading overrides */ +LI.L4 { + font-size: 10pt; + list-style: none; +} + /* level 5 heading overrides */ +LI.L5 { + font-size: 10pt; + list-style: none; +} + /* level 6 heading overrides */ +LI.L6 { + font-size: 10pt; + list-style: none; +} + /* level 7 heading overrides */ +LI.L7 { + font-size: 10pt; + list-style: none; +} + /* level 1 bullet heading overrides */ +LI.LB1 { + font-size: 12pt; + font-weight: bold; + list-style: disc; +} + /* level 2 bullet heading overrides */ +LI.LB2 { + font-size: 10pt; + font-weight: bold; + list-style: disc; +} + /* level 3 bullet heading overrides */ +LI.LB3 { + font-size: 10pt; + list-style: disc; +} + /* level 4 bullet heading overrides */ +LI.LB4 { + font-size: 10pt; + list-style: disc; +} + /* level 5 bullet heading overrides */ +LI.LB5 { + font-size: 10pt; + list-style: disc; +} + /* level 6 bullet heading overrides */ +LI.LB6 { + font-size: 10pt; + list-style: disc; +} + /* level 7 bullet heading overrides */ +LI.LB7 { + font-size: 10pt; + list-style: disc; +} + /* level 1 numeric heading overrides */ +LI.LN1 { + font-size: 12pt; + font-weight: bold; + list-style: decimal; +} + /* level 2 numeric heading overrides */ +LI.LN2 { + font-size: 10pt; + font-weight: bold; + list-style: decimal; +} + /* level 3 numeric heading overrides */ +LI.LN3 { + font-size: 10pt; + list-style: decimal; +} + /* level 4 numeric heading overrides */ +LI.LN4 { + font-size: 10pt; + list-style: decimal; +} + /* level 5 numeric heading overrides */ +LI.LN5 { + font-size: 10pt; + list-style: decimal; +} + /* level 6 numeric heading overrides */ +LI.LN6 { + font-size: 10pt; + list-style: decimal; +} + /* level 7 numeric heading overrides */ +LI.LN7 { + font-size: 10pt; + list-style: decimal; +} + /* body text */ +P { + font-family: helvetica,arial,sans-serif; + font-size: 9pt; + font-weight: normal; + color: black; +} + /* preformatted text */ +PRE { + font-family: fixed; + font-size: 9pt; + font-weight: normal; + color: black; +} + +TABLE { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + font-weight: normal; + border-collapse: collapse; +} + +TH { + border: 1px solid black; + padding: 0.5em; + background-color: #eeddee; +} + +TD { + border: 1px solid black; + padding: 0.5em; + background-color: #ddeeee; +} + +CODE { + background-color: yellow; +} + +TABLE.TAB1 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB2 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 11pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB3 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB4 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB5 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB6 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} +DIV.Menu { + float: left; + border: 1px solid blue; + background-color: #e6add8; + padding-right:10px; + text-align: left; + width: 25%; +} +DIV.TopMenu { + border: 1px solid blue; + background-color: #e6add8; + padding-right:10px; + margin-bottom: 15px; + text-align: Center; +} +DIV.News { + float: left; + border: 1px solid green; + background-color: #ade6d8; + padding-left: 3px; + padding-right: 8px; + text-align: left; + width: 69%; + margin-bottom: 15px; + margin-left: 15px; +} +Div.Main { + float: left; + border: 1px solid green; + background-color: white; + padding-left: 3px; + padding-right: 8px; + text-align: left; + width: 69%; + margin-bottom: 15px; + margin-left: 15px; +} +IMG { + border: none; +} --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/party.otl +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/party.otl @@ -0,0 +1,57 @@ +Tina's Birthday +Scope + : Plan and execute a barbeque for the family and close friends. This is to + : be a combination barbeque and birthday party for Tina. +Features + - Western Theme + - Hay rides + - Horseback rides + - Games +To Do (50%) + [_] 50% Vital + [_] Send Invitaions + [X] Buy Present + Options (in order of preference) + + Pony + + MP3 Player (the second choice is reasonable) + + XBox + + Bicycle + [X] 100% Important + [X] Order Clown + [X] Rent Horse and Handler + [_] 0% Optional + [_] Mow Lawn + [_] Trim Hedges + [_] Wash Dog +Materials (%) + [_] 63% Barbeque + [_] 83% Food + [X] 20 Burgers + [X] 20 Hamburger Buns + [X] 20 Hotdogs + [X] 20 Hotdog Buns + [X] Potato Chips + [_] Potato Salad + [_] 33% Drink + [_] Soda + [_] Diet Soda + [X] Beer + [_] Chairs for 30 + [X] Tables (2 or 3) + [X] 5 Bags of ice + [_] 20 Hay Bails + [_] 66% Birthday + [_] Cake + [X] 100% Party Favors + [X] Hats + [X] Poppers + [X] Whistles + [X] Disposable Cameras + Guests + || Name | RSVP | Food to Bring | + | Bill, Joan and Billie | YES | Corn Bread | + | Jones | YES | Popcorn Balls | + | Jack & Jill | YES | Soda | + | Grandma | YES | none | +Summary + : This is just a simple example of what can be done. --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo.html +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo.html @@ -0,0 +1,368 @@ + +OTL2HTML Webpage Demonstration + + + + + +
          +

          OTL2HTML Webpage Demonstration

          +
          +
        + +
        +
          +
        1. News
            +
          1. December 1, 2004
              +
            1. OTL2HTML.PY Tool Gets Twisted Upgrade +

              Noel Henson's python-based otl2html.py tool gets a rather serious +but twisted upgrade. Mr. Henson claims that the tool can now take an +outline and generate a surprisingly nice-looking web page. The +extension would allow for entire websites to be developed using the +world renowned Vim Outliner. +

              +

              +-- anonymous

              +
            +
          2. November 28, 2004
              +
            1. Hyperlinks and Images Are Added to OTL2HTML.PY +

              In the same spirit as TXT2TAGS, otl2html.py can +now process and include hyperlinks and images into the html files it +creates. The hyperlinks can be to web pages, ftp sites, mail-tos or +any other standard URL. The images can be included as just images or +as hyperlinks. Check out the LJ logo in the menu. +

              +

              +-- anonymous

              +
            +
          +
        +
        +
        +
          +
        1. Main
            +

            Using VO to generate pages like this is surprisingly simple. A simple +.otl file and the otl2html.py script is all you need. To see the file +that generated this page, click here. By the way, a heading +that stars with "_" won't show on the page. You can see examples of this +in the aforementioned file. To invoke the otl2html.py tool enter the +following from the command line: +

            +
          1. Example
              +
               otl2html.py -D -s webpage.css demo.otl > demo.html 
              +
            +

            Have fun with this upgraded and potentially cool tool.

          +
        +
        + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo1.otl +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo1.otl @@ -0,0 +1,21 @@ +OTL2HTML Webpage Demonstration +_Menu + [demo.html Home] + **About** + [demo2.html Usage] + [demo3.html Party Report] + [mailto:noel@noels-lab.com Contact] +Main + : OTL2HTML.PY is a script that takes Vim Outliner OTL files and converts + : them to HTML for pretty printing and simple web pages. It supports CSS + : both in-line and external for easy user-control of the appearance. + : + : This is the last version of the 1.xx series. Its internal logic has + : become convoluted and difficult to maintain much less extend. The 2.xx + : series will be written to be recursive and possible object-oriented. It + : will use external configuration files as well as command-line options. + : And it will make it easy to print pretty reports, nice web pages with + : navigation and even entire web sites (with a single OTL file!). Table of + : contents and slide shows are also on the list of features. + : + : Have fun! --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/demo2.html +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/demo2.html @@ -0,0 +1,336 @@ + +OTL2HTML Webpage Demonstration + + + + + +
        +

        OTL2HTML Webpage Demonstration

        +
        +
        + +
        +
          +
           Usage:
          + otl2html.py [ options ] inputfile > outputfile
          + Options
          +     -p              Presentation: slide show output for use with HtmlSlides.
          +     -D              First-level is divisions (for pretty web pages).
          +     -s sheet        Use the specified style sheet with a link. Not compatible
          +                     with -t.
          +     -S sheet        Include the specified style sheet in-line the output. For
          +                     encapsulated style. Not compatible with -t. Hide
          +     -T              The first line is not the title. Treat it as outline data
          +     -c              comments (line with [ as the first non-whitespace
          +                     character. Ending with ] is optional.
          +     -C copyright    Override the internal copyright notice with the
          +                     one supplied in the quoted string following this
          +                     flag. Single or double quotes can be used.
          +     -v              Print version (RCS) information.
          +     -H              Show the file syntax help.
          + output is on STDOUT
          +
          +
           
        + +
        + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/doc/otl2html/nnnnnn.css +++ vimoutliner-0.3.4+pristine/debian/contrib/doc/otl2html/nnnnnn.css @@ -0,0 +1,245 @@ +/* copyright notice and filename */ +body { + font-family: helvetica,arial,sans-serif; + font-size: 10pt; +} + /* title at the top of the page */ +H1 { + font-family: helvetica,arial,sans-serif; + font-size: 14pt; + font-weight: bold; + text-align: center; + color: black; + background-color: #ddddee; + padding-top: 20px; + padding-bottom: 20px; +} +H2 { + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + font-weight: bold; + text-align: left; + color: black; +} +H3 { + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + text-align: left; + color: black; +} +H4 { + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + text-align: left; + color: black; +} +H5 { + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + text-align: left; + color: black; +} + /* outline level spacing */ +OL { + padding-bottom: 8pt; +} + /* global heading settings */ +LI { + font-family: helvetica,arial,sans-serif; + color: black; + font-weight: normal; + list-style: lower-alpha; + padding-top: 4px; +} + /* level 1 heading overrides */ +LI.L1 { + font-size: 12pt; + font-weight: bold; + list-style: none; +} + /* level 2 heading overrides */ +LI.L2 { + font-size: 10pt; + font-weight: bold; + list-style: none; +} + /* level 3 heading overrides */ +LI.L3 { + font-size: 10pt; + list-style: none; +} + /* level 4 heading overrides */ +LI.L4 { + font-size: 10pt; + list-style: none; +} + /* level 5 heading overrides */ +LI.L5 { + font-size: 10pt; + list-style: none; +} + /* level 6 heading overrides */ +LI.L6 { + font-size: 10pt; + list-style: none; +} + /* level 7 heading overrides */ +LI.L7 { + font-size: 10pt; + list-style: none; +} + /* level 1 bullet heading overrides */ +LI.LB1 { + font-size: 12pt; + font-weight: bold; + list-style: disc; +} + /* level 2 bullet heading overrides */ +LI.LB2 { + font-size: 10pt; + font-weight: bold; + list-style: disc; +} + /* level 3 bullet heading overrides */ +LI.LB3 { + font-size: 10pt; + list-style: disc; +} + /* level 4 bullet heading overrides */ +LI.LB4 { + font-size: 10pt; + list-style: disc; +} + /* level 5 bullet heading overrides */ +LI.LB5 { + font-size: 10pt; + list-style: disc; +} + /* level 6 bullet heading overrides */ +LI.LB6 { + font-size: 10pt; + list-style: disc; +} + /* level 7 bullet heading overrides */ +LI.LB7 { + font-size: 10pt; + list-style: disc; +} + /* level 1 numeric heading overrides */ +LI.LN1 { + font-size: 12pt; + font-weight: bold; + list-style: decimal; +} + /* level 2 numeric heading overrides */ +LI.LN2 { + font-size: 10pt; + font-weight: bold; + list-style: decimal; +} + /* level 3 numeric heading overrides */ +LI.LN3 { + font-size: 10pt; + list-style: decimal; +} + /* level 4 numeric heading overrides */ +LI.LN4 { + font-size: 10pt; + list-style: decimal; +} + /* level 5 numeric heading overrides */ +LI.LN5 { + font-size: 10pt; + list-style: decimal; +} + /* level 6 numeric heading overrides */ +LI.LN6 { + font-size: 10pt; + list-style: decimal; +} + /* level 7 numeric heading overrides */ +LI.LN7 { + font-size: 10pt; + list-style: decimal; +} + /* body text */ +P { + font-family: helvetica,arial,sans-serif; + font-size: 9pt; + font-weight: normal; + color: darkgreen; +} + /* preformatted text */ +PRE { + font-family: fixed; + font-size: 9pt; + font-weight: normal; + color: darkblue; +} + +TABLE { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + font-weight: normal; + border-collapse: collapse; +} + +TH { + border: 1px solid black; + padding: 0.5em; + background-color: #eeddee; +} + +TD { + border: 1px solid black; + padding: 0.5em; + background-color: #ddeeee; +} + +CODE { + background-color: yellow; +} + +TABLE.TAB1 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 12pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB2 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 11pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB3 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB4 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB5 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} +TABLE.TAB6 { + margin-top: 1em; + font-family: helvetica,arial,sans-serif; + font-size: 10pt; + font-weight: normal; + border-collapse: collapse; +} --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl2docbook.pl +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl2docbook.pl @@ -0,0 +1,270 @@ +#!/usr/bin/perl + +use strict; +use XML::Writer; +use vars qw($writer $section_has_contents $VERSION); + +use constant DEBUG => 0; + +$VERSION = '2.0'; + +sub debug { + if ( DEBUG ) + { + print STDERR @_; + } +} + +sub start_docbook { + $writer = XML::Writer->new(DATA_MODE => 1, + DATA_INDENT => 1); + + debug(' 'x$writer->getDataIndent(), "starting new docbook\n"); + + $writer->xmlDecl(); + +# my $system = '/usr/share/sgml/docbook/xml-dtd-4.1/docbookx.dtd'; + my $system = 'http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd'; + + $writer->doctype('article', + '-//OASIS//DTD DocBook XML V4.1//EN', + $system); +} + +sub start_article { + my $id = shift; + + debug(' 'x$writer->getDataIndent(), "starting new article\n"); + + my @attributes = ( + 'class' => 'whitepaper', + ); + + if ( $id ) + { + push @attributes, ( 'id' => $id ); + } + + $writer->startTag('article', @attributes); +} + +sub start_section { + my $title = shift; + + debug(' 'x$writer->getDataIndent(), "starting new section\n"); + + $writer->startTag('section'); + + $section_has_contents = 0; + + if ( $title ) + { + $writer->dataElement('title', $title); + } +} + +sub start_list { + debug(' 'x$writer->getDataIndent(), "starting new list\n"); + + $writer->startTag('itemizedlist'); +} + +sub append_list_item { + my $text = shift; + + debug(' 'x$writer->getDataIndent(), "starting new listitem\n"); + + $writer->startTag('listitem'); + + $writer->dataElement('para', $text); + + $writer->endTag('listitem'); +} + +sub end_list { + $writer->endTag('itemizedlist'); + + debug(' 'x$writer->getDataIndent(), "ending list\n"); +} + +sub append_code { + my $code = shift; + + debug(' 'x$writer->getDataIndent(), "starting new programlisting\n"); + + $section_has_contents = 1; + + $writer->dataElement('programlisting', $code, role=>'C'); +} + +sub append_para { + my $text = shift; + + debug(' 'x$writer->getDataIndent(), "starting new para\n"); + + $section_has_contents = 1; + + $writer->dataElement('para', $text); +} + +sub end_section { + if ( ! $section_has_contents ) + { + $writer->emptyTag('para'); + $section_has_contents = 1; + } + + $writer->endTag('section'); + + debug(' 'x$writer->getDataIndent(), "ending section\n"); +} + +sub end_article { + $writer->endTag('article'); + + debug(' 'x$writer->getDataIndent(), "ending article\n"); +} + +sub end_docbook { + $writer->end(); + + debug(' 'x$writer->getDataIndent(), "ending docbook\n"); +} + +#################################################### + +start_docbook(); +start_article(); + +my $section_level = 0; +my $line; +my $para = ''; +my $list_mode = 0; +my $code_mode = 0; +my $first_line = 1; + +sub list_done { + if ( $list_mode ) { + end_list(); + $list_mode = 0; + } +} + +sub para_done { + if ( $para ) + { + chomp $para; + if ( $code_mode ) + { + append_code($para); + $code_mode = 0; + } + elsif ( $list_mode ) + { + append_list_item($para); + } + else + { + append_para($para); + } + } + $para = ''; +} + +while ( defined ($line = <>) ) +{ + if ( $first_line and $line =~ /^-\*-/ ) + { + next; + } + $first_line = 0; + + if ( $line =~ /^\t*\* (.*)/ ) + { + para_done(); + + $para = $1; + + if ( ! $list_mode ) + { + start_list(); + $list_mode = 1; + } + + next; + } + + if ( $line =~ /^\t*[^\t: ]/ ) + { + para_done(); + list_done(); + } + + if ( $line =~ /^(\t*)([^\t\n: ].*)/ ) + { + my $title = $2; + my $new_section_level = length($1) + 1; + + para_done(); + list_done(); + + for ( my $i = 0 ; $section_level - $new_section_level >= $i ; $i++ ) + { + end_section(); + } + + chomp $title; + start_section($title); + + $section_level = $new_section_level; + next; + } + +# Code mode not supported yet +# if ( ! $list_mode and $line =~ /^\s+/ ) +# { +# debug("enabling code mode\n"); +# $code_mode = 1; +# } + + $line =~ s/^\t*(\: ?| )//; + if ($line =~ /^$/) { + para_done(); + list_done(); + next; + } + $para .= $line; +} +para_done(); + +for ( my $i = 0 ; $section_level > $i ; $i++ ) +{ + end_section(); +} + +end_article(); +end_docbook(); + +__END__ + +=head1 NAME + +outline2dockbook - Generate DocBook XML from VimOutliner outline + +=head1 SYNOPSIS + +outline2docbook < input > output + +=head1 DESCRIPTION + +B reads an VimOutliner outline-mode type text file on +standard input and outputs DocBook XML on standard output. + +The original version was written by Thomas R. Fullhart to convert from Emacs +outline mode. It is available at +http://genetikayos.com/code/repos/outline2docbook/distribution/. + +This program uses the B perl module, which is available +on B. + +=cut --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl2ooimpress.sh +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl2ooimpress.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# otl2ooimpress.sh +# needs otl2ooimpress.py to work at all +############################################################################# +# +# Tool for Vim Outliner files to Open Office Impress files. +# Copyright (C) 2003 by Noel Henson, all rights reserved. +# +# This tool is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to: +# +# Free Software Foundation, Inc. +# 59 Temple Place, Suite 330 +# Boston, MA 02111-1307 USA +# +############################################################################# + +# Path to otl2ooimpress.py +MYPATH=/usr/share/vim/addons/scripts +# Path to rm +RMPATH=/bin +# Path to zip +ZIPPATH=/usr/bin + +$MYPATH/otl2ooimpress.py $1 > content.xml +$ZIPPATH/zip $1.sxi content.xml +$RMPATH/rm content.xml --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl2html.py +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl2html.py @@ -0,0 +1,982 @@ +#!/usr/bin/python +# otl2html.py +# convert a tab-formatted outline from VIM to HTML +# +# Copyright 2001 Noel Henson All rights reserved +# +# ALPHA VERSION!!! +# $Revision: 1.43 $ +# $Date: 2005/06/07 13:16:40 $ +# $Author: noel $ +# $Source: /home/noel/active/NoelOTL/RCS/otl2html.py,v $ +# $Locker: $ + +########################################################################### +# Basic function +# +# This program accepts text outline files and converts them +# to HTML. The outline levels are indicated by tabs. A line with no +# tabs is assumed to be part of the highest outline level. +# +# 10 outline levels are supported. These loosely correspond to the +# HTML H1 through H9 tags. Alphabetic, numeric and bullet formats +# are also supported. +# +# CSS support has been added. +# + +########################################################################### +# include whatever mdules we need + +import sys +from string import * +from re import * +from time import * + +########################################################################### +# global variables + +formatMode = "indent" +copyright = "" +level = 0 +div = 0 +silentdiv = 0 +slides = 0 +hideComments = 0 +showTitle = 1 +inputFile = "" +outline = [] +flatoutline = [] +inBodyText = 0 # 0: no, 1: text, 2: preformatted text, 3: table +styleSheet = "nnnnnn.css" +inlineStyle = 0 + +########################################################################### +# function definitions + +# usage +# print the simplest form of help +# input: none +# output: simple command usage is printed on the console + +def showUsage(): + print + print "Usage:" + print "otl2html.py [options] inputfile > outputfile" + print "Options" + print " -p Presentation: slide show output for use with HtmlSlides." + print " -D First-level is divisions (
        ) for making" + print " pretty web pages." + print " -s sheet Use the specified style sheet with a link. This is the" + print " default." + print " -S sheet Include the specified style sheet in-line the output. For" + print " encapsulated style." + print " -T The first line is not the title. Treat it as outline data" + print " -c comments (line with [ as the first non-whitespace" + print " character. Ending with ] is optional." + print " -C copyright Override the internal copyright notice with the" + print " one supplied in the quoted string following this" + print " flag. Single or double quotes can be used." + print " -v Print version (RCS) information." + print " -H Show the file syntax help." + print "output is on STDOUT" + print " Note: if neither -s or -S are specified, otl2html.py will default to -s. It" + print " will try to use the css file 'nnnnnn.css' if it exists. If it does not" + print " exist, it will be created automatically." + print + +def showSyntax(): + print + print "Syntax" + print "Syntax is Vim Outliner's normal syntax. The following are supported:" + print + print " Text" + print " : Body text marker. This text will wrap in the output." + print " ; Preformmated text. This text will will not wrap." + print + print " Tables" + print " || Table header line." + print " | Table and table columns. Example:" + print " || Name | Age | Animal |" + print " | Kirby | 9 | Dog |" + print " | Sparky | 1 | Bird |" + print " | Sophia | 8 | Cat |" + print " This will cause an item to be left-justified." + print " | whatever |" + print " This will cause an item to be right-justified." + print " | whatever |" + print " This will cause an item to be centered." + print " | whatever |" + print + print " Character Styles" + print " ** Bold. Example: **Bold Text**" + print " // Italic. Example: //Italic Text//" + print " +++ Highlight. Example: +++Highlight Text+++" + print " --- Strikeout. Example: ---Strikeout Text---" + print " Insane ---+++//**Wow! This is insane!**//+++---" + print " Just remember to keep it all on one line." + print " Horizontal Rule" + print " ---------------------------------------- (40 dashes)." + print " Copyright" + print " (c) or (C) Converts to a standard copyright symbol." + print + print " Including Images (for web pages)" + print " [imagename] Examples:" + print " [logo.gif] [photo.jpg] [car.png]" + print " [http://i.a.cnn.net/cnn/.element/img/1.1/logo/logl.gif]" + print " or from a database:" + print " [http://www.lab.com/php/image.php?id=4]" + print + print " Including links (for web pages)" + print " [link text-or-image] Examples:" + print " [about.html About] [http://www.cnn.com CNN]" + print " or with an image:" + print " [http://www.ted.com [http://www.ted.com/logo.png]]" + print + print " Note:" + print " When using -D, the top-level headings become divisions (
        )" + print " and will be created using a class of the heading name. Spaces" + print " are not allowed. If a top-level heading begins with '_', it" + print " will not be shown but the division name will be the same as" + print " without the '_'. Example: _Menu will have a division name of" + print " Menu and will not be shown." + print + +# version +# print the RCS version information +# input: none +# output: RSC version information is printed on the console + +def showVersion(): + print + print "RCS" + print " $Revision: 1.43 $" + print " $Date: 2005/06/07 13:16:40 $" + print " $Author: noel $" + print + +# getArgs +# Check for input arguments and set the necessary switches +# input: none +# output: possible console output for help, switch variables may be set + +def getArgs(): + global inputfile, debug, formatMode, slides, hideComments, copyright, styleSheet, inlineStyle, div, showTitle + if (len(sys.argv) == 1): + showUsage() + sys.exit()() + else: + for i in range(len(sys.argv)): + if (i != 0): + if (sys.argv[i] == "-d"): debug = 1 # test for debug flag + elif (sys.argv[i] == "-?"): # test for help flag + showUsage() # show the help + sys.exit() # exit + elif (sys.argv[i] == "-p"): # test for the slides flag + slides = 1 # set the slides flag + elif (sys.argv[i] == "-D"): # test for the divisions flag + div = 1 # set the divisions flag + elif (sys.argv[i] == "-T"): # test for the no-title flag + showTitle = 0 # clear the show-title flag + elif (sys.argv[i] == "-c"): # test for the comments flag + hideComments = 1 # set the comments flag + elif (sys.argv[i] == "-C"): # test for the copyright flag + copyright = sys.argv[i+1] # get the copyright + i = i + 1 # increment the pointer + elif (sys.argv[i] == "-s"): # test for the style sheet flag + styleSheet = sys.argv[i+1] # get the style sheet name + formatMode = "indent" # set the format + i = i + 1 # increment the pointer + elif (sys.argv[i] == "-S"): # test for the style sheet flag + styleSheet = sys.argv[i+1] # get the style sheet name + formatMode = "indent" # set the format + inlineStyle = 1 + i = i + 1 # increment the pointer + elif (sys.argv[i] == "--help"): + showUsage() + sys.exit() + elif (sys.argv[i] == "-h"): + showUsage() + sys.exit() + elif (sys.argv[i] == "-H"): + showSyntax() + sys.exit() + elif (sys.argv[i] == "-v"): + showVersion() + sys.exit() + elif (sys.argv[i][0] == "-"): + print "Error! Unknown option. Aborting" + sys.exit() + else: # get the input file name + inputfile = sys.argv[i] + +# getLineLevel +# get the level of the current line (count the number of tabs) +# input: linein - a single line that may or may not have tabs at the beginning +# output: returns a number 1 is the lowest + +def getLineLevel(linein): + strstart = lstrip(linein) # find the start of text in line + x = find(linein,strstart) # find the text index in the line + n = count(linein,"\t",0,x) # count the tabs + return(n+1) # return the count + 1 (for level) + +# getLineTextLevel +# get the level of the current line (count the number of tabs) +# input: linein - a single line that may or may not have tabs at the beginning +# output: returns a number 1 is the lowest + +def getLineTextLevel(linein): + strstart = lstrip(linein) # find the start of text in line + x = find(linein,strstart) # find the text index in the line + n = count(linein,"\t",0,x) # count the tabs + n = n + count(linein," ",0,x) # count the spaces + return(n+1) # return the count + 1 (for level) + +# colonStrip(line) +# stip a leading ':', if it exists +# input: line +# output: returns a string with a stipped ':' + +def colonStrip(line): + if (line[0] == ":"): return lstrip(line[1:]) + else: return line + +# semicolonStrip(line) +# stip a leading ';', if it exists +# input: line +# output: returns a string with a stipped ';' + +def semicolonStrip(line): + if (line[0] == ";"): return line[1:] + else: return line + +# dashStrip(line) +# stip a leading '-', if it exists +# input: line +# output: returns a string with a stipped '-' + +def dashStrip(line): + if (line[0] == "-"): return line[1:] + else: return line + +# pipeStrip(line) +# stip a leading '|', if it exists +# input: line +# output: returns a string with a stipped '|' + +def pipeStrip(line): + if (line[0] == "|"): return line[1:] + else: return line + +# plusStrip(line) +# stip a leading '+', if it exists +# input: line +# output: returns a string with a stipped '+' + +def plusStrip(line): + if (line[0] == "+"): return line[1:] + else: return line + +# handleBodyText +# print body text lines with a class indicating level, if style sheets +# are being used. otherwise print just

        +# input: linein - a single line that may or may not have tabs at the beginning +# output: through standard out + +def handleBodyText(linein,lineLevel): + global inBodyText + if (inBodyText == 2): print "" + if (inBodyText == 3): print "" + print "" + colonStrip(rstrip(lstrip(linein))), + +# handlePreformattedText +# print preformatted text lines with a class indicating level, if style sheets +# are being used. otherwise print just

        +# input: linein - a single line that may or may not have tabs at the beginning
        +# output: through standard out
        +
        +def handlePreformattedText(linein,lineLevel):
        +  global inBodyText
        +  if (inBodyText == 1): print "

        " + if (inBodyText == 3): print "" + print "" + semicolonStrip(rstrip(lstrip(linein))), + + +# isAlignRight +# return flag +# input: coldata, a string + +def isAlignRight(coldata): + l = len(coldata) + if (coldata[0:2] == " ") and (coldata[l-2:l] != " "): return 1 + else: return 0 + +# isAlignLeft +# return flag +# input: coldata, a string + +def isAlignLeft(coldata): + l = len(coldata) + if (coldata[0:2] != " ") and (coldata[l-2:l] == " "): return 1 + else: return 0 + +# isAlignCenter +# return flag +# input: coldata, a string + +def isAlignCenter(coldata): + l = len(coldata) + if (coldata[0:2] == " ") and (coldata[l-2:l] == " "): return 1 + else: return 0 + +# getColumnAlignment(string) +# return string +# input: coldata +# output: or or or + +def getColumnAlignment(coldata): + if isAlignCenter(coldata): return '' + if isAlignRight(coldata): return '' + if isAlignLeft(coldata): return '' + return '' + +# handleTableColumns +# return the souce for a row's columns +# input: linein - a single line that may or may not have tabs at the beginning +# output: string with the columns' source + +def handleTableColumns(linein,lineLevel): + out = "" + coldata = lstrip(rstrip(linein)) + coldata = coldata.split("|") + for i in range(1,len(coldata)-1): + out += getColumnAlignment(coldata[i]) + out += lstrip(rstrip(coldata[i]))+'' + return out + +# handleTableHeaders +# return the souce for a row's headers +# input: linein - a single line that may or may not have tabs at the beginning +# output: string with the columns' source + +def handleTableHeaders(linein,lineLevel): + out = "" + coldata = lstrip(rstrip(linein)) + coldata = coldata.split("|") + for i in range(2,len(coldata)-1): + out += getColumnAlignment(coldata[i]) + out += lstrip(rstrip(coldata[i]))+'' + out = replace(out,' tag if necessary +# input: linein - a single line that may or may not have tabs at the beginning +# output: through standard out + +def handleTable(linein,lineLevel): + global inBodyText + if (inBodyText == 1): print "

        " + if (inBodyText == 2): print "
        " + if (inBodyText != 3): + print "" + inBodyText = 3 + print handleTableRow(linein,lineLevel), + +# linkOrImage +# if there is a link to an image or another page, process it +# input: line +# output: modified line + +def linkOrImage(line): + line = sub('\[(\S+?)\]','\\1',line) + line = sub('\[(\S+)\s(.*?)\]','\\2',line) + line = replace(line,'X','[X]') + line = replace(line,'_','[_]') + return line + +# divName +# create a name for a division +# input: line +# output: division name +def divName(line): + global silentdiv + line = lstrip(rstrip(line)) + if (line[0] == '_'): + silentdiv = 1 + line = line[1:] + line = replace(line, ' ', '_') + return'
        ' + +# getTitleText(line) +# extract some meaningful text to make the document title from the line +# input: line +# output: modified line +def getTitleText(line): + out = sub('.*#(.*)#.*','\\1',line); + out = sub('<.*>','',out); +# if (out != ""): out = sub('\"(.*?)\"','\\1',line); + return(out); + +# stripTitleText(line) +# strip the title text if it is enclosed in double-quotes +# input: line +# output: modified line +def stripTitleText(line): + out = sub('#\W*.*#','',line); + return(out); + +# beautifyLine(line) +# do some optional, simple beautification of the text in a line +# input: line +# output: modified line +def beautifyLine(line): + if (lstrip(rstrip(line)) == "----------------------------------------"): + return "


        " + + out = line + line = "" + + while (line != out): + + line = out + out = linkOrImage(out) + # out = replace(out,'**','',1) + out = sub('\*\*(.*?)\*\*','\\1',out) + # out = replace(out,'//','',1) + out = sub('\/\/(.*?)\/\/','\\1',out) + # out = replace(out,'+++','',1) + out = sub('\+\+\+(.*?)\+\+\+','\\1',out) + # out = replace(out,'---','',1) + out = sub('\-\-\-(.*?)\-\-\-','\\1',out) + out = sub('\(c\)','©',out) + out = sub('\(C\)','©',out) + return out + +# closeLevels +# generate the number of or tags necessary to proplerly finish +# input: format - a string indicating the mode to use for formatting +# level - an integer between 1 and 9 that show the current level +# (not to be confused with the level of the current line) +# output: through standard out + +def closeLevels(): + global level, formatMode + while (level > 0): + if (formatMode == "bullets"): + print "" + if (formatMode == "alpha") or (formatMode == "numeric") or \ + (formatMode == "roman") or (formatMode == "indent"): + print "" + + level = level - 1 + + +# processLine +# process a single line +# input: linein - a single line that may or may not have tabs at the beginning +# format - a string indicating the mode to use for formatting +# level - an integer between 1 and 9 that show the current level +# (not to be confused with the level of the current line) +# output: through standard out + +def processLine(linein): + global level, formatMode, slides, hideComments, inBodyText, styleSheet, inlineStyle, div, silentdiv + if (lstrip(linein) == ""): return + linein = beautifyLine(linein) + lineLevel = getLineLevel(linein) + if ((hideComments == 0) or (lineLevel != (find(linein,"[")+1))): + + if (lineLevel > level): # increasing depth + while (lineLevel > level): + if (formatMode == "indent" or formatMode == "simple"): + if (inBodyText == 1): + print"

        " + inBodyText = 0 + elif (inBodyText == 2): + print"" + inBodyText = 0 + elif (inBodyText == 3): + print"
        " + inBodyText = 0 + if not (div == 1 and lineLevel == 1): print "
          " + else: + sys.exit("Error! Unknown formatMode type") + level = level + 1 + + elif (lineLevel < level): # decreasing depth + while (lineLevel < level): + if (inBodyText == 1): + print"

          " + inBodyText = 0 + elif (inBodyText == 2): + print"" + inBodyText = 0 + elif (inBodyText == 3): + print"" + inBodyText = 0 + print "
        " + level = level - 1 + if (div == 1 and level == 1): + if (silentdiv == 0): print'' + else: slientdiv = 0 + print'
        ' + + else: print # same depth + if (div == 1 and lineLevel == 1): + print divName(linein) + if (silentdiv == 0): print "
          " + + if (slides == 0): + if (lineLevel == find(linein," ") +1 ) or \ + (lineLevel == find(linein,":") +1 ): + if (inBodyText != 1): handleBodyText(linein,lineLevel) + elif (colonStrip(rstrip(lstrip(linein))) == ""): + print "

          " + handleBodyText(linein,lineLevel) + else: print colonStrip(rstrip(lstrip(linein))), + elif (lineLevel == find(linein,";") +1 ): + if (inBodyText != 2): handlePreformattedText(linein,lineLevel) + elif (semicolonStrip(rstrip(lstrip(linein))) == ""): + print "" + handlePreformattedText(linein,lineLevel) + else: print semicolonStrip(rstrip(lstrip(linein))), + elif (lineLevel == find(linein,"|") +1 ): + if (inBodyText != 3): handleTable(linein,lineLevel) + elif (pipeStrip(rstrip(lstrip(linein))) == ""): + print "" + handleTtable(linein,lineLevel) + else: print handleTableRow(linein,lineLevel), + else: + if (inBodyText == 1): + print"

          " + inBodyText = 0 + elif (inBodyText == 2): + print"" + inBodyText = 0 + elif (inBodyText == 3): + print"" + inBodyText = 0 + if (silentdiv == 0): + print "" + lstrip(rstrip(dashStrip(lstrip(linein)))), + elif (lineLevel == find(linein,"+ ") +1 ): + print " class=\"LN" + str(lineLevel) + "\"", + print ">" + lstrip(rstrip(plusStrip(lstrip(linein)))), + else: + print " class=\"L" + str(lineLevel) + "\"", + print ">" + rstrip(lstrip(linein)), + else: silentdiv = 0 + else: + if (lineLevel == 1): + if (linein[0] == " "): + if (inBodyText == 0): + handleBodyText(linein,lineLevel) + else: print rstrip(lstrip(linein)), + else: + print "
          " + print rstrip(lstrip(linein)), + print "
          \n" + else: + if (lineLevel == find(linein," ") +1 ) or \ + (lineLevel == find(linein,":") +1 ): + if (inBodyText == 0): + handleBodyText(linein,lineLevel) + else: print rstrip(lstrip(linein)), + else: + if (inBodyText == 1): + print"

          " + inBodyText = 0 + print "" + rstrip(lstrip(linein)), + +# flatten +# Flatten a subsection of an outline. The index passed is the outline section +# title. All sublevels that are only one level deeper are indcluded in the current +# subsection. Then there is a recursion for those items listed in the subsection. +# Exits when the next line to be processed is of the same or lower outline level. +# (lower means shallower) +# input: idx - the index into the outline. The indexed line is the title. +# output: adds reformatted lines to flatoutline[] + +def flatten(idx): + if (outline[idx] == ""): + return + if (len(outline) <= idx): + return + titleline = outline[idx] + titlelevel = getLineLevel(titleline) + if (getLineLevel(outline[idx+1]) > titlelevel): + if (titleline[titlelevel-1] != " "): + flatoutline.append(lstrip(titleline)) + exitflag = 0 + while (exitflag == 0): + if (idx < len(outline)-1): + idx = idx + 1 + currlevel = getLineLevel(outline[idx]) + if (currlevel == titlelevel + 1): + if (currlevel == find(outline[idx]," ") +1): + flatoutline.append("\t " + lstrip(outline[idx])) + else: + flatoutline.append("\t" + lstrip(outline[idx])) + elif (currlevel <= titlelevel): + exitflag = 1 + else: + exitflag = 1 + level = titlelevel + return + +def createCSS(): + global styleSheet + output = " /* copyright notice and filename */\n" + output += "body { \n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 10pt;\n" + output += "}\n" + output += " /* title at the top of the page */\n" + output += "H1 { \n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 14pt;\n" + output += " font-weight: bold;\n" + output += " text-align: center;\n" + output += " color: black;\n" + output += " background-color: #ddddee;\n" + output += " padding-top: 20px;\n" + output += " padding-bottom: 20px;\n" + output += "}\n" + output += "H2 { \n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 12pt;\n" + output += " font-weight: bold;\n" + output += " text-align: left;\n" + output += " color: black;\n" + output += "}\n" + output += "H3 { \n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 12pt;\n" + output += " text-align: left;\n" + output += " color: black;\n" + output += "}\n" + output += "H4 { \n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 12pt;\n" + output += " text-align: left;\n" + output += " color: black;\n" + output += "}\n" + output += "H5 { \n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 10pt;\n" + output += " text-align: left;\n" + output += " color: black;\n" + output += "}\n" + output += " /* outline level spacing */\n" + output += "OL { \n" + output += " padding-bottom: 8pt;\n" + output += "}\n" + output += " /* global heading settings */\n" + output += "LI { \n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " color: black;\n" + output += " font-weight: normal;\n" + output += " list-style: lower-alpha;\n" + output += " padding-top: 4px;\n" + output += "}\n" + output += " /* level 1 heading overrides */\n" + output += "LI.L1 { \n" + output += " font-size: 12pt;\n" + output += " font-weight: bold;\n" + output += " list-style: none;\n" + output += "}\n" + output += " /* level 2 heading overrides */\n" + output += "LI.L2 { \n" + output += " font-size: 10pt;\n" + output += " font-weight: bold;\n" + output += " list-style: none;\n" + output += "}\n" + output += " /* level 3 heading overrides */\n" + output += "LI.L3 { \n" + output += " font-size: 10pt;\n" + output += " list-style: none;\n" + output += "}\n" + output += " /* level 4 heading overrides */\n" + output += "LI.L4 { \n" + output += " font-size: 10pt;\n" + output += " list-style: none;\n" + output += "}\n" + output += " /* level 5 heading overrides */\n" + output += "LI.L5 { \n" + output += " font-size: 10pt;\n" + output += " list-style: none;\n" + output += "}\n" + output += " /* level 6 heading overrides */\n" + output += "LI.L6 { \n" + output += " font-size: 10pt;\n" + output += " list-style: none;\n" + output += "}\n" + output += " /* level 7 heading overrides */\n" + output += "LI.L7 { \n" + output += " font-size: 10pt;\n" + output += " list-style: none;\n" + output += "}\n" + output += " /* level 1 bullet heading overrides */\n" + output += "LI.LB1 { \n" + output += " font-size: 12pt;\n" + output += " font-weight: bold;\n" + output += " list-style: disc;\n" + output += "}\n" + output += " /* level 2 bullet heading overrides */\n" + output += "LI.LB2 { \n" + output += " font-size: 10pt;\n" + output += " font-weight: bold;\n" + output += " list-style: disc;\n" + output += "}\n" + output += " /* level 3 bullet heading overrides */\n" + output += "LI.LB3 { \n" + output += " font-size: 10pt;\n" + output += " list-style: disc;\n" + output += "}\n" + output += " /* level 4 bullet heading overrides */\n" + output += "LI.LB4 { \n" + output += " font-size: 10pt;\n" + output += " list-style: disc;\n" + output += "}\n" + output += " /* level 5 bullet heading overrides */\n" + output += "LI.LB5 { \n" + output += " font-size: 10pt;\n" + output += " list-style: disc;\n" + output += "}\n" + output += " /* level 6 bullet heading overrides */\n" + output += "LI.LB6 { \n" + output += " font-size: 10pt;\n" + output += " list-style: disc;\n" + output += "}\n" + output += " /* level 7 bullet heading overrides */\n" + output += "LI.LB7 { \n" + output += " font-size: 10pt;\n" + output += " list-style: disc;\n" + output += "}\n" + output += " /* level 1 numeric heading overrides */\n" + output += "LI.LN1 { \n" + output += " font-size: 12pt;\n" + output += " font-weight: bold;\n" + output += " list-style: decimal;\n" + output += "}\n" + output += " /* level 2 numeric heading overrides */\n" + output += "LI.LN2 { \n" + output += " font-size: 10pt;\n" + output += " font-weight: bold;\n" + output += " list-style: decimal;\n" + output += "}\n" + output += " /* level 3 numeric heading overrides */\n" + output += "LI.LN3 { \n" + output += " font-size: 10pt;\n" + output += " list-style: decimal;\n" + output += "}\n" + output += " /* level 4 numeric heading overrides */\n" + output += "LI.LN4 { \n" + output += " font-size: 10pt;\n" + output += " list-style: decimal;\n" + output += "}\n" + output += " /* level 5 numeric heading overrides */\n" + output += "LI.LN5 { \n" + output += " font-size: 10pt;\n" + output += " list-style: decimal;\n" + output += "}\n" + output += " /* level 6 numeric heading overrides */\n" + output += "LI.LN6 { \n" + output += " font-size: 10pt;\n" + output += " list-style: decimal;\n" + output += "}\n" + output += " /* level 7 numeric heading overrides */\n" + output += "LI.LN7 { \n" + output += " font-size: 10pt;\n" + output += " list-style: decimal;\n" + output += "}\n" + output += " /* body text */\n" + output += "P {\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 9pt;\n" + output += " font-weight: normal;\n" + output += " color: darkgreen;\n" + output += "}\n" + output += " /* preformatted text */\n" + output += "PRE { \n" + output += " font-family: fixed;\n" + output += " font-size: 9pt;\n" + output += " font-weight: normal;\n" + output += " color: darkblue;\n" + output += "}\n" + output += "\n" + output += "TABLE {\n" + output += " margin-top: 1em;\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 12pt;\n" + output += " font-weight: normal;\n" + output += " border-collapse: collapse;\n" + output += "}\n" + output += "\n" + output += "TH {\n" + output += " border: 1px solid black;\n" + output += " padding: 0.5em;\n" + output += " background-color: #eeddee;\n" + output += "}\n" + output += "\n" + output += "TD {\n" + output += " border: 1px solid black;\n" + output += " padding: 0.5em;\n" + output += " background-color: #ddeeee;\n" + output += "}\n" + output += "\n" + output += "CODE {\n" + output += " background-color: yellow;\n" + output += "}\n" + output += "\n" + output += "TABLE.TAB1 {\n" + output += " margin-top: 1em;\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 12pt;\n" + output += " font-weight: normal;\n" + output += " border-collapse: collapse;\n" + output += "}\n" + output += "TABLE.TAB2 {\n" + output += " margin-top: 1em;\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 11pt;\n" + output += " font-weight: normal;\n" + output += " border-collapse: collapse;\n" + output += "}\n" + output += "TABLE.TAB3 {\n" + output += " margin-top: 1em;\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 10pt;\n" + output += " font-weight: normal;\n" + output += " border-collapse: collapse;\n" + output += "}\n" + output += "TABLE.TAB4 {\n" + output += " margin-top: 1em;\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 10pt;\n" + output += " font-weight: normal;\n" + output += " border-collapse: collapse;\n" + output += "}\n" + output += "TABLE.TAB5 {\n" + output += " margin-top: 1em;\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 10pt;\n" + output += " font-weight: normal;\n" + output += " border-collapse: collapse;\n" + output += "}\n" + output += "TABLE.TAB6 {\n" + output += " margin-top: 1em;\n" + output += " font-family: helvetica,arial,sans-serif;\n" + output += " font-size: 10pt;\n" + output += " font-weight: normal;\n" + output += " border-collapse: collapse;\n" + file = open(styleSheet,"w") + file.write(output) + +def printHeader(linein): + global styleSheet, inlineStyle + print "" + print "" + getTitleText(linein) + "" + print"" + print"" + print"" + try: + file = open(styleSheet,"r") + except IOError, e: + createCSS() + file = open(styleSheet,"r") + if (styleSheet != "" and inlineStyle == 0): + print "" + if (styleSheet != "" and inlineStyle == 1): + print "" + print "" + +def printFirstLine(linein): + print "
          " + print "

          " + stripTitleText(rstrip(lstrip(linein))) +"

          " + print "
          " + print "
          " + +def printFooter(): + global slides, div + print "
          " + if (slides == 0 and div == 0): + print "
          " + print "
          " + print copyright + print "
          " + print inputfile + "   " + strftime("%Y/%m/%d %H:%M",localtime(time())) + print "
          " + print "" + +def main(): + global showTitle + getArgs() + flatouline = [] + file = open(inputfile,"r") + if (slides == 0): + firstLine = beautifyLine(lstrip(rstrip(file.readline()))) + printHeader(firstLine) + if (showTitle == 1): + printFirstLine(firstLine) + linein = beautifyLine(lstrip(rstrip(file.readline()))) + else: + linein = firstLine + while linein != "": + processLine(linein) + linein = file.readline() + closeLevels() + else: + linein = beautifyLine(lstrip(rstrip(file.readline()))) + outline.append(linein) + linein = lstrip(rstrip(file.readline())) + while linein != "": + outline.append("\t" + linein) + linein = rstrip(file.readline()) + for i in range (0,len(outline)-1): + flatten(i) + printHeader(flatoutline[0]) + for i in range (0,len(flatoutline)): + processLine(flatoutline[i]) + + printFooter() + file.close() + +main() + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl2pdb.pl +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl2pdb.pl @@ -0,0 +1,183 @@ +#!/usr/bin/perl +#license + #Copyright (C) 2003 by Gabriel Horner + #You can find me through my website at http://www.chwhat.com + #GNU GPL LICENSE, FREE SOFTWARE BUT NO WARRANTIES + #see http://www.gnu.org/copyleft/gpl.html for details +#declarations + package Mypalm; + use Getopt::Long; + Getopt::Long::Configure("bundling"); + use Palm::Address; + use strict; + use Data::Dumper; + + our (%o,$file,@array); + GetOptions(\%o,qw/v h w:s/); + my $pdb = new Palm::Address; +#functions + sub usage { + my $var; + ($var = << '') =~ s/(^|\n)\t\t/\1/g; + Usage: {OPTIONS} {contact file} #note: []-required,{}-optional + -w [file] file to write + -h brings up help + -v verbose + + print $var; + } + sub file2array { + open(FILE,'<',$_[0]); + chomp(my @lines = ); + close FILE; + return @lines; + } + sub indent { + #u: $var or $line,$file + #d:counts tabs of line + my $count=0; my @array;my $line;my $x; + if (@_ ==1) { $x =$_[0]} + elsif (@_ ==2) { ($line,$file)=@_; + tie @array,'Tie::File',$file or die; + $x=$array[$line-1];} + else { die "? arguments of &indent buster\n";} + while ($x =~ /\t/g) {$count++} + if (@_ ==2) {untie @array;} + return $count; + } + sub indents { + #u: (\@ ||$file) or lines,$file + #d:makes array of lines' indent levels + my (@tabs,@array); + if (@_==1) { + my $a=0; my @array; + if (ref($_[0]) eq "ARRAY") { @array = @{$_[0]}} + else { tie @array,'Tie::File',$_[0] or die; } + while($array[$a]) {$tabs[$a] = indent($array[$a]);$a++} + untie @array if (ref($_[0]) ne "ARRAY"); + } + else { + my ($a,$b,$file)= @_; + tie @array,'Tie::File',$file or die; + for (my $j=$a;$j<=$b;$j++) { $tabs[$j]= indent($array[$j]); } + untie @array; + } + return @tabs; + } +#main + if ($o{h}) {&usage;exit} + my @temp = file2array(shift || "/home/bozo/bin/dat/contacts"); + + #ignore empty or '#' commented lines + my @lines = grep(!/^\s*#|^\s*$/,@temp); + + #obtain indent level of lines + my @tabs = indents(\@lines); + + #get rid of surrounding white space + my @lines = map {$_ =~ s/^\s*|\s*$//;$_} @lines; + + my $categorylevel = $tabs[0]; + my ($category,%rec,$reclevel,$prec,%cat); + # %rec is only for error checking + my $a = 0; + for (@lines) { + #read in a category + if ($tabs[$a] == $categorylevel) { + $rec{category} = $category = $_; + $reclevel = $tabs[$a+1]; + print "c:$tabs[$a]\n" if ($o{v}); + } + #read in person's name and initialize a new record + elsif ($tabs[$a] == $reclevel) { + %rec=(); + $prec = $pdb->append_Record; + $pdb->addCategory($category) unless exists $cat{$category}; + $cat{$category}++; + $prec->{category} = $category; + #print Dumper $prec; + $prec->{phoneLabel}{phone3} = 7; + $rec{category}=$category; + #$prec->{fields}{name} = $_; + $rec{name} = $_; + $prec->{fields}{name} = $_; + print "n:$tabs[$a]\n" if ($o{v}); + } + #fills in all the record's fields + else { + print "details:$tabs[$a],$_\n" if ($o{v}); + for ($_) { + /^a.*:\s*(.*)/i && do {$rec{addr} = $1; $prec->{fields}{address} = $1; last}; + /^c.*:\s*(.*)/i && do {$rec{cell} = $1; $prec->{fields}{phone3} = $1;last}; + /^e.*:\s*(.*)/i && do {$rec{email} = $1; $prec->{fields}{phone5} = $1;last}; + /^h.*:\s*(.*)/i && do {$rec{home} = $1; $prec->{fields}{phone2} = $1;last}; + /^n.*:\s*(.*)/i && do {$rec{notes} = $1; $prec->{fields}{note} = $1;last}; + /^o.*:\s*(.*)/i && do {$rec{other} = $1; $prec->{fields}{phone4} = $1;last}; + /^web.*:\s*(.*)/i && do {$rec{web} = $1; $prec->{fields}{custom1} = $1;last}; + /^w.*:\s*(.*)/i && do {$rec{work} = $1; $prec->{fields}{phone1} = $1;last}; + #print "shouldn't be here\n"; + } + } + if ((($tabs[$a+1] <= $reclevel) and $tabs[$a] != $categorylevel) or ($a == @lines -1)) + { #write record + print "record $a finished\n"; + print Dumper(\%rec) if ($o{v}); + #push (@recs,\%rec); + } + $a++; + } + $pdb->Write($o{w}||"/home/bozo/bin/dat/AddressDB.pdb"); + +__END__ + +=head1 NAME + +otl2pdb.pl - A script that takes an outline of contact information and creates an AddressDB.pdb file +for a Palm. + +=head1 DESCRIPTION + +For now this script can only create a .pdb file. You then have to use a syncing tool +to load it into your Palm. I recommend the pilot-link package for linux. + +The format of the contact outline is the following: + + $category + $record_name + c:$cell + a:$address + .... + +You can have as many categories and records(entries) as you want. +The following are valid fields for a record with the necessary text +to indicate them in quotes: + + 'a:'-address + 'c:'-cell + 'e:'-email + 'h:'-home phone + 'n:'-note + 'web:'-website + 'w:'-work phone + +Also, each record's category is left as 'Unfiled' as I can't get the record's +category to write correctly. + +=head1 TIPS + +If using the pilot-link package: + + -load the pdb with 'pilot-xfer -i AddressDB.pdb' + -specify the serial port if other than /dev/pilot (which will usually be the case + unless you link to it) with -p in the above command; usually this is /dev/ttyS0 in linux + +=head1 AUTHOR + +Me. Gabriel that is. If you want to bug me with a bug: cldwalker@chwhat.com +If you like using perl,linux,vim and databases to make your life easier (not lazier ;) check out my website +at www.chwhat.com. + +=head1 LINKS + +http://www.pilot-link.org +http://www.coldsync.org --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl2ooimpress.py +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl2ooimpress.py @@ -0,0 +1,263 @@ +#!/usr/bin/python +# otl2ooimpress.py +# needs otl2ooimpress.sh to work in an automated way +############################################################################# +# +# Tool for Vim Outliner files to Open Office Impress files. +# Copyright (C) 2003 by Noel Henson, all rights reserved. +# +# This tool is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with this library; if not, write to: +# +# Free Software Foundation, Inc. +# 59 Temple Place, Suite 330 +# Boston, MA 02111-1307 USA +# +############################################################################# +# ALPHA VERSION!!! +# $Revision: 1.3 $ +# $Date: 2003/12/01 20:22:18 $ +# $Author: noel $ +# $Source: /home/noel/apps/otl2ooimpress/RCS/otl2ooimpress.py,v $ +# $Locker: $ + +########################################################################### +# Basic function +# +# This program accepts VO outline files and converts them +# to the zipped XML files required by Open Office Impress. +# +# 10 outline levels are supported. These loosely correspond to the +# HTML H1 through H9 tags. +# + + +########################################################################### +# include whatever mdules we need + +import sys +from string import * +from time import * + +########################################################################### +# global variables + +level = 0 +inputFile = "" +outline = [] +flatoutline = [] +pageNumber = 0 +inPage = 0 +debug = 0 + +########################################################################### +# function definitions + +# usage +# print the simplest form of help +# input: none +# output: simple command usage is printed on the console + +def showUsage(): + print + print "Usage:" + print "otl2ooimpress.py [options] inputfile > outputfile" + print "Options" + print " -v Print version (RCS) information." + print "output is on STDOUT" + print + +# version +# print the RCS version information +# input: none +# output: RSC version information is printed on the console + +def showVersion(): + print + print "RCS" + print " $Revision: 1.3 $" + print " $Date: 2003/12/01 20:22:18 $" + print " $Author: noel $" + print " $Source: /home/noel/apps/otl2ooimpress/RCS/otl2ooimpress.py,v $" + print + +# getArgs +# Check for input arguments and set the necessary switches +# input: none +# output: possible console output for help, switch variables may be set + +def getArgs(): + global inputfile, debug + if (len(sys.argv) == 1): + showUsage() + sys.exit()() + else: + for i in range(len(sys.argv)): + if (i != 0): + if (sys.argv[i] == "-d"): debug = 1 # test for debug flag + elif (sys.argv[i] == "-?"): # test for help flag + showUsage() # show the help + sys.exit() # exit + elif (sys.argv[i] == "--help"): + showUsage() + sys.exit() + elif (sys.argv[i] == "-h"): + showUsage() + sys.exit() + elif (sys.argv[i] == "-v"): + showVersion() + sys.exit() + elif (sys.argv[i][0] == "-"): + print "Error! Unknown option. Aborting" + sys.exit() + else: # get the input file name + inputfile = sys.argv[i] + +# getLineLevel +# get the level of the current line (count the number of tabs) +# input: linein - a single line that may or may not have tabs at the beginning +# output: returns a number 1 is the lowest + +def getLineLevel(linein): + strstart = lstrip(linein) # find the start of text in line + x = find(linein,strstart) # find the text index in the line + n = count(linein,"\t",0,x) # count the tabs + return(n+1) # return the count + 1 (for level) + +# getLineTextLevel +# get the level of the current line (count the number of tabs) +# input: linein - a single line that may or may not have tabs at the beginning +# output: returns a number 1 is the lowest + +def getLineTextLevel(linein): + strstart = lstrip(linein) # find the start of text in line + x = find(linein,strstart) # find the text index in the line + n = count(linein,"\t",0,x) # count the tabs + n = n + count(linein," ",0,x) # count the spaces + return(n+1) # return the count + 1 (for level) + +# colonStrip(line) +# stip a leading ':', if it exists +# input: line +# output: returns a string with a stipped ':' + +def colonStrip(line): + if (line[0] == ":"): return lstrip(line[1:]) + else: return line + +# processLine +# process a single line +# input: linein - a single line that may or may not have tabs at the beginning +# level - an integer between 1 and 9 that show the current level +# (not to be confused with the level of the current line) +# output: through standard out + +def processLine(linein): + global inPage, pageNumber + if (lstrip(linein) == ""): + print + return + if (getLineLevel(linein) == 1): + if (inPage==1): + print '' + inPage = 0 + pageNumber += 1 + outstring = '' + print outstring + outstring = '' + print outstring + outstring = '' + outstring += lstrip(linein) + outstring += "" + print outstring + outstring = '' + print outstring + inPage = 1 + else: + outstring = '' + outstring += lstrip(linein) + outstring += '' + print outstring + +# flatten +# Flatten a subsection of an outline. The index passed is the outline section +# title. All sublevels that are only one level deeper are indcluded in the current +# subsection. Then there is a recursion for those items listed in the subsection. +# Exits when the next line to be processed is of the same or lower outline level. +# (lower means shallower) +# input: idx - the index into the outline. The indexed line is the title. +# output: adds reformatted lines to flatoutline[] + +def flatten(idx): + if (outline[idx] == ""): + return + if (len(outline) <= idx): + return + titleline = outline[idx] + titlelevel = getLineLevel(titleline) + if (getLineLevel(outline[idx+1]) > titlelevel): + if (titleline[titlelevel-1] != " "): + flatoutline.append(lstrip(titleline)) + exitflag = 0 + while (exitflag == 0): + if (idx < len(outline)-1): + idx = idx + 1 + currlevel = getLineLevel(outline[idx]) + if (currlevel == titlelevel + 1): + if (currlevel == find(outline[idx]," ") +1): + flatoutline.append("\t " + lstrip(outline[idx])) + else: + flatoutline.append("\t" + lstrip(outline[idx])) + elif (currlevel <= titlelevel): + exitflag = 1 + else: + exitflag = 1 + level = titlelevel + return + +def printHeader(linein): + print'' + print'' + print'' + print'' + print'' + +def printFooter(): + print '' + print'' + +def main(): + getArgs() + flatouline = [] + file = open(inputfile,"r") + linein = lstrip(rstrip(file.readline())) + outline.append(linein) + linein = lstrip(rstrip(file.readline())) + while linein != "": + outline.append("\t" + linein) + linein = rstrip(file.readline()) + for i in range (0,len(outline)-1): + flatten(i) + + printHeader(flatoutline[0]) + for i in range (0,len(flatoutline)): + processLine(flatoutline[i]) + printFooter() + + file.close() + +main() + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl_handler/otl_style.css +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl_handler/otl_style.css @@ -0,0 +1,153 @@ +body +{ + font-family: Verdana; + font-size: 12px; + color: black; + background-color: #efefef; + margin: 30px 30px 100px 30px; +} + +.legend +{ + margin-bottom: 10px; +} + +.timer +{ + position: absolute; + top: 5; + right: 10; + color: #ccc; +} + +.group +{ + padding: 0px; + background-color: white; + width: 600px; + border: 1px solid #ccc; + margin-bottom: 5px; +} + +.header +{ + font-size: 24px; + font-variant: small-caps; + font-weight: bold; +} + +.last_mod +{ + display: block; + border-top: 1px solid #ccc; + font-style: italic; + color: #777; +} + +.counts +{ + font-size: 11px; + display: block; + color: #777; + margin-left: 30px; + font-style: italic; +} + +.sort +{ + margin-bottom: 30px; + border-bottom: 1px solid #ccc; + font-weight: bold; +} + +.sort a +{ + font-weight: normal; + text-decoration: none; + color: #777; +} + +.sort a:hover +{ + color: black; +} + +.date, .time { } + +.level0 +{ + background-color: #ddd; + font-size: 18px; + font-weight: bold; + display: block; + cursor: pointer; + -moz-user-select: none; +} + +.level0_over +{ + display: block; + background-color: #ecebe2; + cursor: pointer; +} + +.level1 +{ + font-size: 14px; + font-weight: bold; + margin-left: 15px; + color: #333; + display: block; +} + +.level2 +{ + font-size: 12px; + margin-left: 30px; + color: #555; + display: block; +} + +.level3 +{ + font-size: 10px; + margin-left: 45px; + color: #777; + display: block; +} + +.level4 +{ + font-size: 10px; + margin-left: 60px; + color: #aaa; + display: block; +} + +.percent +{ + font-weight: bold; + color: #7c8ee8; +} + +.todo +{ + background-color: #ccc; + padding-right: 12px; + margin-right: 10px; +} + +.done +{ + background-color: #7c8ee8; + margin-right: 10px; + padding-right: 12px; +} + +.comment +{ + font-weight: normal; + font-style: italic; + display: block; +} + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl_handler/otl.js +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl_handler/otl.js @@ -0,0 +1,108 @@ + +// otl_handler javascript functions + + +var scroll = new Array(); +var itemcount = 0; + +function init_page() +{ + if (! document.getElementById ) return false; + + var spans = document.getElementsByTagName('span'); + for (i = 0; i < spans.length; i++) { + var id = spans[i].getAttribute('id'); + if (id == null || id == "") continue; + if (id.indexOf("itemtoplevel_") == -1) continue; + + // ie doesn't support negative substr positions :\ + // var num = id.substr(-1, 1); + var num = id.substr(13, 1); + var itemtoplevel = spans[i]; + var itemgroup = document.getElementById("itemgroup_" + num); + if (! itemtoplevel || ! itemgroup) continue; + + itemcount++; + + itemgroup.style.display = 'none'; + itemgroup.style.overflow = 'auto'; + itemtoplevel.onmouseover = function() { this.className = 'level0_over'; } + itemtoplevel.onmouseout = function() { this.className = 'level0'; } + itemtoplevel.onmouseup = function() { this.className = 'level0'; toggle(this); return false; } + itemtoplevel.onselectstart = function() { return false; } + + } + + return; +} + + +function toggle(i) +{ + var ig = document.getElementById( i.id.replace("toplevel", "group") ); + if (! ig ) return; + + var num = ig.id.substr(10,1); + + // show + if (ig.style.display == "" || + ig.style.display == "none") { + + ig.style.height = "0pt"; + ig.style.display = 'block'; + grow(num); + + // hide others + for (i = 0; i != itemcount; i++) { + if (i != num) shrink(i); + } + + } + // hide + else { + shrink(num); + } + + return; +} + + +function grow(num) +{ + var ig = document.getElementById( "itemgroup_" + num ); + if (! ig ) return; + scroll[num] = 1; + + var curheight = parseInt(ig.style.height.replace("pt", "")); + if (curheight >= 250) { + scroll[num] = 0; + return; + } + + var newheight = curheight + 25 + "pt"; + ig.style.height = newheight; + + setTimeout("grow(" + num + ")", 30); + return; +} + +function shrink(num) +{ + var ig = document.getElementById( "itemgroup_" + num ); + if (! ig ) return; + if (scroll[num] == 1) return; + + var curheight = parseInt(ig.style.height.replace("pt", "")); + if (curheight == 0) { + ig.style.display = 'none'; + return; + } + + var newheight = curheight - 50 + "pt"; + ig.style.height = newheight; + + setTimeout("shrink(" + num + ")", 30); + return; +} + + --- vimoutliner-0.3.4+pristine.orig/debian/contrib/scripts/otl_handler/otl_handler.pl +++ vimoutliner-0.3.4+pristine/debian/contrib/scripts/otl_handler/otl_handler.pl @@ -0,0 +1,223 @@ +#!/usr/bin/perl + +package Apache::OTL; +use strict; +use Apache::Constants qw/ :common /; +use Time::HiRes qw/ gettimeofday /; + +sub handler +{ + my $r = shift; + my $VERSION = '0.3'; + my $t0 = Time::HiRes::gettimeofday; + my ( + $file, # the absolute file path + $title, # the file's title + $uri, # the file uri + %re, # a hash of pre compiled regular expressions + $data, # file contents + %opt, # options from the otl file + @blocks, # todo groupings + $mtime, # last modification time of otl file + %get, # get arguments (sorting, etc) + ); + + return DECLINED unless $r->method() eq 'GET'; + ($file, $uri) = ($r->filename, $r->uri); + return DECLINED unless -e $file; + $mtime = localtime( (stat(_))[9] ); + + %get = $r->args; + + %re = + ( + title => qr/(?:.+)?\/(.+).otl$/i, + percent => qr/(\[.\]) (\d+)%/, + todo => qr/(\[_\]) /, + done => qr/(\[X\]) /, + comment => qr/^(?:\t+)?:(.+)/, + time => qr/(\d{2}:\d{2}:\d{2})/, + date => qr/(\d{2,4}-\d{2}-\d{2})/, + subitem => qr/^\t(?!\t)/, + line_wo_tabs => qr/^(?:\t+)?(.+)/, + linetext => qr/^(?:\[.\] (?:\d+%)?)? (.+)/, + ); + + open OTL, "$file" + || ( $r->log_error("Unable to read $file: $!") && return DECLINED ); + do { + local $/ = undef; + $data = ; # shlorp + }; + close OTL; + + # divide each outline into groups + @blocks = split /\n\n+/, $data; + + # get optional settings and otl title + { + my $settings = shift @blocks; + if ($settings =~ $re{comment}) { + %opt = map { split /=/ } split /\s?:/, $settings; + } + + # if the first group wasn't a comment, + # we probably just aren't using a settings + # line. push the group back into place. + else { + unshift @blocks, $settings; + } + } + + # GET args override settings + $opt{$_} = $get{$_} foreach keys %get; + + # set title (fallback to file uri) + $title = + $opt{title} + ? $opt{title} + : $1 if $uri =~ $re{title}; + + $opt{style} ||= '/otl_style.css'; + + $r->send_http_header('text/html'); + $r->print(< + + + $title + +EHTML + + if ($opt{js}) { + $r->print( + ' ' x 8, + "\n", + ' ' x 4, "\n", + "\n", + ); + } else { + $r->print(< + +EHTML + } + + $r->print("$opt{title}
          \n") if $opt{title}; + $r->print("Last modified: $mtime
          \n") if $opt{last_mod}; + if ($opt{legend}) { + $r->print(< +  Item completed
          +  Item is incomplete
          +
        +EHTML + } + if ($opt{sort}) { + my %sorts = ( + alpha => 'alphabetical', + percent => 'percentages', + ); + $r->print("
        Sort: \n"); + foreach (sort keys %sorts) { + if ($opt{sorttype} eq $_ && $opt{sortrev}) { + $r->print("$sorts{$_} "); + } elsif ($opt{sorttype} eq $_ && ! $opt{sortrev}) { + $r->print("$sorts{$_} "); + } else { + $r->print("$sorts{$_} "); + } + } + $r->print("
        \n"); + } + + my $bc = 0; + foreach my $block ( sort { sorter(\%opt, \%re) } @blocks ) { + # separate outline items + $r->print("
        \n") if $opt{divs}; + my $lc = 0; + my @items = split /\n/, $block; + + # get item counts + my ($subs, $comments, $subsubs); + if ($opt{counts}) { + foreach (@items) { + if (/$re{comment}/) { + $comments++; + } elsif (/$re{subitem}/) { + $subs++; + } + } + $subsubs = (scalar @items - 1) - $subs - $comments;; + } + + # parse + foreach (@items) { + my $level = tr/\t/\t/ || 0; + next unless /\w/; + + # append counts + if ($lc == 0 && $opt{counts} && $_ !~ $re{comment}) { + my $itmstr = $subs == 1 ? 'item' : 'items'; + my $sitmstr = $subsubs == 1 ? 'subitem' : 'subitems'; + $_ .= " $subs $itmstr, $subsubs $sitmstr"; + } + s/^:// if ! $level; + + if ($opt{js}) { + s#(.+)#$1# if $lc == 0; + $r->print("\n") if $lc == 1; + } + + s#$re{'time'}#$1#g if /$re{'time'}/; + s#$re{date}#$1#g if /$re{date}/; + s#$re{percent}#$1 $2%# if /$re{percent}/; + s#$re{todo}# # if /$re{todo}/; + s#$re{done}# # if /$re{done}/; + s#$re{comment}#$1# if /$re{comment}/; + s#$re{line_wo_tabs}#$1#; + + $r->print("$_\n"); + $lc++; + } + $r->print("\n") if $opt{js}; + $r->print("
        \n") if $opt{divs}; + $r->print("


        \n") if $opt{dividers}; + $r->print("

        \n") unless $opt{divs} || $opt{dividers}; + $bc++; + } + + my $t1 = Time::HiRes::gettimeofday; + my $td = sprintf("%0.3f", $t1 - $t0); + $r->print("
        OTL parsed in $td secs
        ") if $opt{timer}; + $r->print(< + +EHTML + + return OK; +} + +sub sorter +{ + my ($opt, $re) = @_; + return 0 unless $opt->{sorttype}; + my ($sa, $sb); + if ($opt->{sorttype} eq 'percent') { + $sa = $2 if $a =~ $re->{percent}; + $sb = $2 if $b =~ $re->{percent}; + return $opt->{sortrev} ? $sb <=> $sa : $sa <=> $sb; + } + else { + $sa = $1 if $a =~ $re->{linetext}; + $sb = $1 if $b =~ $re->{linetext}; + return $opt->{sortrev} ? $sb cmp $sa : $sa cmp $sb; + } +} + +1;