App-Basis-ConvertText2
view release on metacpan or search on metacpan
docs/README.html view on Meta::CPAN
<li>size
<ul>
<li>size of image, default 80x20, widthxheight</li>
</ul></li>
</ul>
<p><strong>Example</strong></p>
<pre><code>~~~~{.ditaa }
Full example
+--------+ +-------+ +-------+
| | --+ ditaa +--> | |
| Text | +-------+ |diagram|
|Document| |!magic!| | |
| {d}| | | | |
+---+----+ +-------+ +-------+
: ^
| Lots of work |
\-------------------------+
~~~~</code></pre>
<p><strong>Output</strong></p>
<p><img src='/tmp/kmulholland/cache/ct2/8ac235932524c7f7b6592ea295b3ad95.png' height='196' width='390' /></p>
<h2 id="uml-diagrams"><a name='9_uml_diagrams'>9 UML Diagrams</a></h2>
<p>Software engineers love to draw diagrams, <a href="http://plantuml.sourceforge.net">PlantUML</a> is a java component to make this simple.</p>
<p>You will need to have a script on your system called âumlâ that calls java with the component.</p>
<p>Here is mine, it is also available in the scripts directory in the</p>
<pre class="shell"><code>#!/bin/bash
# run plantuml
# moodfarm@cpan.org
# we assume that the plantuml.jar file is in the same directory as this executable
EXEC_DIR=`dirname $0`
PLANTUML="$EXEC_DIR/plantuml.jar"
INPUT=$1
OUPUT=$2
function show_usage {
arg=$1
err=$2
if [ "$err" == "" ] ; then
err=1
fi
"Create a UML diagram from an input text file
(see http://plantuml.sourceforge.net/ for reference)
usage: $0 inputfile outputfile.png
"
if [ "$arg" != "" ] ; then
echo "$arg
"
fi
exit $err
}
if [ "$INPUT" == "-help" ] ; then
show_usage "" 0
fi
if [ ! -f "$INPUT" ] ; then
show_usage "ERROR: Could not find input file $1"
fi
if [ "$OUPUT" == "" ] ; then
show_usage "ERROR: No output file specified"
fi
# we use the pipe option to control output into the file we want
cat "$INPUT" | java -jar $PLANTUML -nbthread auto -pipe >$OUPUT
# exit 0
</code></pre>
<p>The content for this code-block must be the same that you would use to with the <a href="http://plantuml.sourceforge.net">PlantUML</a> software</p>
<p>The arguments allowed are</p>
<ul>
<li>title
<ul>
<li>used as the generated images âaltâ argument</li>
</ul></li>
<li>size
<ul>
<li>size of image, default 80x20, widthxheight</li>
</ul></li>
</ul>
<p><strong>Example</strong></p>
<pre><code>~~~~{.uml }
' this is a comment on one line
/' this is a
multi-line
comment'/
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
~~~~</code></pre>
<p><strong>Output</strong></p>
<p><img src='/tmp/kmulholland/cache/ct2/e476fbf3e854e012b058fae4ac3a6fdf.png' height='207' width='294' /></p>
<p><a href="http://plantuml.sourceforge.net">PlantUML</a> can also create simple application interfaces <a href="http://plantuml.sourceforge.net/salt.html">See Salt</a></p>
<p><strong>Example</strong></p>
<pre><code>~~~~{.uml }
@startuml
salt
{
Just plain text
[This is my button]
() Unchecked radio
(X) Checked radio
[] Unchecked box
[X] Checked box
"Enter text here "
^This is a droplist^
{T
+ World
++ America
+++ Canada
+++ **USA**
++++ __New York__
++++ Boston
+++ Mexico
++ Europe
+++ Italy
+++ Germany
++++ Berlin
++ Africa
}
}
@enduml
~~~~</code></pre>
( run in 0.798 second using v1.01-cache-2.11-cpan-39bf76dae61 )