1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8" />
6 <meta name=
"generator" content=
"Docutils 0.7: http://docutils.sourceforge.net/" />
7 <title>INFO: Generate UML diagrams from docutils using PlantUML
</title>
8 <style type=
"text/css">
11 :Author: David Goodger (goodger@python.org)
13 :Copyright: This stylesheet has been placed in the public domain.
15 Default cascading style sheet for the HTML output of Docutils.
17 See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
18 customize this style sheet.
21 /* used to remove borders from tables and images */
22 .borderless, table.borderless td, table.borderless th {
25 table.borderless td, table.borderless th {
26 /* Override padding for
"table.docutils td" with
"! important".
27 The right padding separates the table cells. */
28 padding:
0 0.5em
0 0 ! important }
31 /* Override more specific margin styles with
"! important". */
32 margin-top:
0 ! important }
34 .last, .with-subtitle {
35 margin-bottom:
0 ! important }
41 text-decoration: none ;
48 margin-bottom:
0.5em }
50 /* Uncomment (and remove this text!) to get bold-faced definition list terms
58 div.abstract p.topic-title {
62 div.admonition, div.attention, div.caution, div.danger, div.error,
63 div.hint, div.important, div.note, div.tip, div.warning {
65 border: medium outset ;
68 div.admonition p.admonition-title, div.hint p.admonition-title,
69 div.important p.admonition-title, div.note p.admonition-title,
70 div.tip p.admonition-title {
72 font-family: sans-serif }
74 div.attention p.admonition-title, div.caution p.admonition-title,
75 div.danger p.admonition-title, div.error p.admonition-title,
76 div.warning p.admonition-title {
79 font-family: sans-serif }
81 /* Uncomment (and remove this text!) to get reduced vertical space in
83 div.compound .compound-first, div.compound .compound-middle {
84 margin-bottom:
0.5em }
86 div.compound .compound-last, div.compound .compound-middle {
95 div.dedication p.topic-title {
103 div.footer, div.header {
112 div.line-block div.line-block {
118 margin:
0 0 0.5em
1em ;
119 border: medium outset ;
121 background-color: #ffffee ;
126 div.sidebar p.rubric {
127 font-family: sans-serif ;
130 div.system-messages {
133 div.system-messages h1 {
137 border: medium outset ;
140 div.system-message p.system-message-title {
147 h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
148 h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
160 img.align-left, .figure.align-left, object.align-left {
165 img.align-right, .figure.align-right, object.align-right {
170 img.align-center, .figure.align-center, object.align-center {
186 /* reset inner alignment in figures */
190 /* div.align-center * { */
191 /* text-align: left } */
193 ol.simple, ul.simple {
197 list-style: decimal }
200 list-style: lower-alpha }
203 list-style: upper-alpha }
206 list-style: lower-roman }
209 list-style: upper-roman }
223 white-space: nowrap }
232 font-family: sans-serif ;
237 font-family: sans-serif ;
248 pre.literal-block, pre.doctest-block {
253 font-family: sans-serif ;
254 font-style: oblique }
256 span.classifier-delimiter {
257 font-family: sans-serif ;
261 font-family: sans-serif }
264 white-space: nowrap }
272 span.section-subtitle {
273 /* font-size relative to parent (h1..h6 element) */
277 border-left: solid
1px gray;
285 margin-bottom:
0.5em }
288 border-left: solid
1px black;
291 table.docutils td, table.docutils th,
292 table.docinfo td, table.docinfo th {
293 padding-left:
0.5em ;
294 padding-right:
0.5em ;
295 vertical-align: top }
297 table.docutils th.field-name, table.docinfo th.docinfo-name {
300 white-space: nowrap ;
303 h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
304 h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
308 list-style-type: none }
313 <div class=
"document" id=
"info-generate-uml-diagrams-from-docutils-using-plantuml">
314 <h1 class=
"title">INFO: Generate UML diagrams from docutils using PlantUML
</h1>
316 <p>Being able to generate html/pdf documents with diagrams from vi or automaticaly is great for me. Many many thanks to docutils and plantuml developers for sharing their vision and the effort!
</p>
317 <p>ASK:
<a class=
"reference external" href=
"mailto:mauriciocap@gmail.com">mauriciocap
@gmail.com
</a> /
<a class=
"reference external" href=
"http://www.mauriciocap.com.ar">http://www.mauriciocap.com.ar
</a></p>
318 <p>SEE:
<a class=
"reference external" href=
"http://plantuml.sourceforge.net/">http://plantuml.sourceforge.net/
</a> Generate UML diagrams from text, runnable from a single jar!
</p>
319 <p>SEE:
<a class=
"reference external" href=
"http://docutils.sourceforge.net/">http://docutils.sourceforge.net/
</a> Conveniently write and generate documents in various output formats
</p>
320 <p>SEE:
<a class=
"reference external" href=
"http://code.google.com/p/rst2pdf/">http://code.google.com/p/rst2pdf/
</a> Generate PDF output without latex in windows
</p>
321 <div class=
"section" id=
"install">
323 <p><strong>WARNING:
</strong> the directive EXECUTES an external program with an argument passed from the rst input file! Don't use it if to process input files you don't trust.
</p>
324 <ol class=
"arabic simple">
325 <li>replace/patch your docutils distribution with the files in src/, e.g. in my cygwin instance
</li>
327 <dl class=
"docutils">
329 <dd># cp -r src/* /usr/lib/python2.5/site-packages/docutils
</dd>
331 <ol class=
"arabic simple">
332 <li>see usage examples in usage/ including how to setup defaults PlantUML
</li>
335 <div class=
"section" id=
"examples">
337 <p>SEE: diagrams at
<a class=
"reference external" href=
"http://plantuml.sourceforge.net/">http://plantuml.sourceforge.net/
</a> , ALL should work as long as your plantuml installation works
</p>
338 <p>USE the
"uml
" directive and write an indented block of PlantUML commands. No arguments are required, an image will be generated and inlined. The name is derived from the input line number, the generatd plantuml
"source
" is keep in the same directory.
</p>
339 <img alt=
"uml/000032.png" src=
"uml/000032.png" />
340 <p>The same here:
</p>
341 <img alt=
"uml/000058.png" src=
"uml/000058.png" />
342 <p>You can pass a filename for the image (WITHOUT extension) as an optional parameter.
</p>
343 <img alt=
"uml2/myDiagram123.png" src=
"uml2/myDiagram123.png" />
345 <div class=
"section" id=
"development">
346 <h1>Development:
</h1>
347 <p>This was a quick (but effective) hack :) In the near future I'd like to:
</p>
349 <li>implement the image generation as a
"writer
" instead, as docutils architecture suggest
</li>
350 <li>contribute tests and better documentation
</li>
352 <p>Please let me know how can I be of more help!
</p>
353 <p><a class=
"reference external" href=
"mailto:mauriciocap@gmail.com">mauriciocap
@gmail.com
</a> /
<a class=
"reference external" href=
"http://www.mauriciocap.com.ar">http://www.mauriciocap.com.ar
</a></p>