|
1 --------------------------------------------------------------------- |
|
2 WHAT IS THIS? |
|
3 --------------------------------------------------------------------- |
|
4 |
|
5 Vimoutliner already comes with some otl to HTML converters that work |
|
6 quite well. I maintain a few different otl files, that are displayed |
|
7 on a internal intranet - the step of converting to HTML on every little |
|
8 change before upload was becoming mildly irritating, and countering my |
|
9 near legendary laziness. |
|
10 |
|
11 This mod_perl handler teaches apache how to pretty print otl natively. |
|
12 |
|
13 Now, I can just edit the otl files directly - skip the conversion step |
|
14 altogether, and let Apache make some delicious looking outlines. |
|
15 |
|
16 --------------------------------------------------------------------- |
|
17 INSTALLATION |
|
18 --------------------------------------------------------------------- |
|
19 |
|
20 First off all, make sure you have a mod_perl enabled Apache2. |
|
21 |
|
22 1) Add the following lines in your httpd.conf, or in a |
|
23 separate otl.conf in the apache Includes directory: |
|
24 |
|
25 ------------------------- |
|
26 PerlSwitches -I/path/to/perl/libraries |
|
27 PerlModule Apache::OTL |
|
28 |
|
29 <FilesMatch ".*\.otl"> |
|
30 SetHandler perl-script |
|
31 PerlResponseHandler Apache::OTL |
|
32 </FilesMatch> |
|
33 ------------------------- |
|
34 |
|
35 2) Put the included css at /otl_style.css in your document root. |
|
36 |
|
37 |
|
38 That's it! Apache will now pretty-print all your otl files. |
|
39 |
|
40 --------------------------------------------------------------------- |
|
41 SETTINGS |
|
42 --------------------------------------------------------------------- |
|
43 |
|
44 Settings for the otl_handler are stored on the first line of the otl |
|
45 files themselves, prefixed by a colon. See the sample.otl for an |
|
46 example settings line. All settings are entirely optional. |
|
47 |
|
48 title |
|
49 Type: string |
|
50 Default: filename |
|
51 |
|
52 The title of the OTL. Used as a header, and the html title. |
|
53 If this is not set, the html title is derived from the filename. |
|
54 |
|
55 |
|
56 style |
|
57 Type: string |
|
58 Default: /otl_style.css |
|
59 |
|
60 A path to the css style. |
|
61 |
|
62 |
|
63 js |
|
64 Type: string |
|
65 Default: none |
|
66 |
|
67 Use javascript? If set, loads an external javascript library, |
|
68 and calls init_page() on body load. |
|
69 See the example 'folding' javascript included. |
|
70 |
|
71 |
|
72 divs |
|
73 Type: boolean |
|
74 Default: 0 |
|
75 |
|
76 Wrap each outline group in a div class called "group" |
|
77 |
|
78 |
|
79 dividers |
|
80 Type: boolean |
|
81 Default: 0 |
|
82 |
|
83 Separate each outline group with a horizontal rule? |
|
84 |
|
85 |
|
86 legend |
|
87 Type: boolean |
|
88 Default: 0 |
|
89 |
|
90 Display small legend for todo and done items? |
|
91 |
|
92 |
|
93 sort |
|
94 Type: boolean |
|
95 Default: 0 |
|
96 |
|
97 Show sort links? |
|
98 |
|
99 |
|
100 sorttype |
|
101 Type: string |
|
102 Default: none |
|
103 |
|
104 Default sorting method. Valid values are |
|
105 percent |
|
106 alpha |
|
107 |
|
108 |
|
109 sortrev |
|
110 Type: boolean |
|
111 Default: 0 |
|
112 |
|
113 Should we default to reverse sorting? |
|
114 |
|
115 |
|
116 counts |
|
117 Type: boolean |
|
118 Default: 0 |
|
119 |
|
120 Count and display sub items? |
|
121 |
|
122 |
|
123 timer |
|
124 Type: boolean |
|
125 Default: 0 |
|
126 |
|
127 Display how long the parser took to generate the html? |
|
128 |
|
129 |
|
130 --------------------------------------------------------------------- |
|
131 INCLUDED FILES |
|
132 --------------------------------------------------------------------- |
|
133 |
|
134 otl_handler.pl |
|
135 The mod_perl code itself. |
|
136 Feel free to modify to taste. |
|
137 |
|
138 themes/* |
|
139 Example css. Again, modify to taste! |
|
140 |
|
141 otl.js |
|
142 Example (but functional!) javascript. If you use this |
|
143 file, your top level items will be 'clickable' - expanding |
|
144 the sub items underneath, but not initially showing them. |
|
145 |
|
146 sample.otl |
|
147 An example vimoutliner file, with optional settings. |
|
148 |
|
149 |