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 +--&gt; |       |
|  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=&quot;$EXEC_DIR/plantuml.jar&quot;

INPUT=$1
OUPUT=$2
function show_usage  {
    arg=$1
    err=$2
    if [ &quot;$err&quot; == &quot;&quot; ] ; then
        err=1
    fi
      &quot;Create a UML diagram from an input text file
(see http://plantuml.sourceforge.net/ for reference)
    usage: $0 inputfile outputfile.png
&quot;
    if [ &quot;$arg&quot; != &quot;&quot; ] ; then
        echo &quot;$arg
&quot;
    fi
    exit $err
}
if [ &quot;$INPUT&quot; == &quot;-help&quot; ] ; then
    show_usage &quot;&quot; 0
fi
if [ ! -f &quot;$INPUT&quot; ] ; then
    show_usage &quot;ERROR: Could not find input file $1&quot;
fi
if [ &quot;$OUPUT&quot; == &quot;&quot; ] ; then
    show_usage &quot;ERROR: No output file specified&quot;
fi
# we use the pipe option to control output into the file we want
cat &quot;$INPUT&quot; | java -jar $PLANTUML -nbthread auto -pipe &gt;$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 }
&#39; this is a comment on one line
/&#39; this is a
multi-line
comment&#39;/
Alice -&gt; Bob: Authentication Request
Bob --&gt; Alice: Authentication Response

Alice -&gt; Bob: Another authentication Request
Alice &lt;-- 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
  &quot;Enter text here   &quot;
  ^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 )