2
<head><title>Lore: A Document Generation System</title></head>
5
<h1>Lore: A Document Generation System</h1>
7
<div class="author">Andrew Bennetts <andrew@puzzling.org></div>
8
<div class="author">(Twisted Lore maintainer)</div>
12
<li>Document generation system</li>
13
<li>Input format is essentially a subset of XHTML</li>
14
<li>Outputs nicely formatted HTML and LaTeX</li>
15
<li>Used to generate >200 pages of Twisted documentation</li>
20
<li>Twisted needed documentation -- and a format</li>
21
<li>We didn't want to depend on a big system
23
<li>The lower the barrier for documentation contributions, the
27
<li>We wanted something quick and easy
29
<li>Lots of people already know simple HTML</li>
30
<li>People were already using HTML to write docs</li>
33
<li>Our needs matured: table of contents, printable version</li>
34
<li>So we created Lore</li>
39
<li>Easy to use for authors</li>
40
<li>Easy to install</li>
41
<li>(Uncommon) Source format should be readable
43
<li>Even to non-hackers</li>
48
<h2>Small Example</h2>
52
<title>Example</title>
55
<h1>Example</h1>
56
<p>Simple paragraph<span class="footnote">footnote</span></p>
63
<li>twisted.lore Python package</li>
64
<li><code class="shell">lore</code> command-line program</li>
65
<li>Comes with every Twisted installation</li>
66
<li>In particular -- works on Linux, Win32, Mac</li>
67
<li>In particular -- supports Python 2.1, 2.2, 2.3 alpha</li>
70
<h2>Alternatives - HTML</h2>
73
<li>No support for needed idioms
75
<li>Special-purpose Python markup</li>
76
<li>Tables of contents</li>
80
<li>Renders badly to dead trees with current tools</li>
83
<h2>Alternatives - LaTeX</h2>
85
<li>Very good at printed results</li>
86
<li>LaTeX's design makes alternative parsers near-impossible</li>
87
<li>Renderers to HTML are buggy and fragile
89
<li>Although the Python Standard Library seems to cope :-)</li>
94
<h2>Alternatives - Docbook</h2>
96
<li>Using correctly requires too much work
98
<li>Write a DTD with special elements</li>
99
<li>Write Jade stylesheets</li>
102
<li>Lore is probably smaller than docbook specialization</li>
105
<h2>Alternatives - Texinfo</h2>
107
<li>Next slide, please</li>
110
<h2>Lore goodies</h2>
112
<li>Special tag to mark classes/modules/functions
114
<li>Can be made to point to auto-generated docs</li>
118
<li>Inline code-examples
120
<li>No need to escape all those <, > and &</li>
124
<li>Syntax-highlight Python code</li>
127
<h2>'lore -o lint': A lint-like tool</h2>
129
<li>Checks for many common errors
132
<li>Unhandled elements</li>
133
<li>Misspelled (or miscased) class names</li>
134
<li>Checks Python code for syntax errors</li>
139
<h2>Extending Lore</h2>
141
<li>Easily done with some Python code</li>
142
<li>Input-enhancements decide which output formats to handle</li>
143
<li>Example: math-lore, Lore with LaTeX formulae</li>
146
<h2>Extending Lore (cont'd)</h2>
147
<div class="pause" />
149
<li>Another example: These slides!</li>
150
<li>The <code>lore-slides</code> plugin can output to
153
<li>HTML (one page per slide)</li>
154
<li>HTML (one big page)</li>
161
<li>HTML is a flexible output format</li>
162
<li>Documents often have to integrate with a site</li>
163
<li>Lore produces HTML documents based on a template</li>
164
<li>Lore uses only HTML <code>class</code> attributes, never <code>font</code>
166
<li>Plays nice with CSS</li>
173
<li>Lore has a program to convert man pages to Lore documents</li>
174
<li>Man pages are written anyway</li>
175
<li>No man output: the format is too limited</li>
178
<h2>Future Directions</h2>
180
<li>More output formats</li>
181
<li>Some more classes -- abstract, bibliography</li>