<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    逝者如斯夫

    靜而思之
    數據加載中……

    ditaa

    ?

    ditaa is a small command-line utility written in Java, that can
    convert diagrams drawn using ascii art ('drawings' that contain
    characters that resemble lines like | / - ), into proper
    bitmap graphics. This is best illustrated by the following
    example -- which also illustrates the benefits of using ditaa in
    comparison to other methods :)

        +--------+   +-------+    +-------+
        |        | --+ ditaa +--> |       |
        |  Text  |   +-------+    |diagram|
        |Document|   |!magic!|    |       |
        |     ewacwmu|   |       |    |       |
        +---+----+   +-------+    +-------+
            :                         ^
            |       Lots of work      |
            +-------------------------+
    
    After conversion using ditaa, the above
    file becomes:
    round 		corner demo

    ditaa interprets ascci art as a series of open and closed
    shapes, but it also uses special markup syntax to increase the
    possibilities of shapes and symbols that can be rendered.

    ditaa is open source and free software (free as in free
    speech), since it is released under the GPL license.

    BUT WHY? Does this thing have any real use?

    There are several reasons why I did this:

    1. Simply for hack value. I wanted to know if/how it could be
      done and how easily.
    2. Aesthetic reasons and legacy formats: there are
      several old FAQs with ascii diagrams lying out there. At this
      time and age ascii diagrams make my eyes hurt due to their
      ugliness. ditaa can be used to convert them to something
      nicer. Although ditaa would not be able to convert all of them
      (due to differences in drawing 'style' in each case), it could
      prove useful in the effort of modernising some of those
      documents without too much effort. I also know a lot of people
      that can make an ascii diagram easily, but when it gets to using
      a diagram program, they don't do very well. Maybe this utility
      could help them make good-looking diagrams easily/quickly.
    3. Embedding diagrams to text-only formats: There is a
      number of formats that are text-based (html, docbook, LaTeX,
      programming language comments), but when rendered by other
      software (browsers, interpreters, the javadoc tool etc), they
      can contain images as part of their content. If ditaa was
      intergrated with those tools (and I'm planning to do the javadoc
      bit myself soon), then you would have readable/editable diagrams
      within the text format itself, something that would make things
      much easier. ditaa syntax can currently be embedded to HTML.
    4. Reusability of "code": Suppose you make a diagram in
      ascii art and you render it with version 0.6b of ditaa. You keep
      the ascii diagram, and then version 0.8 comes out, which
      features some new cool effects. You re-render your old diagram
      with the new version of ditaa, and it looks better, with zero
      effort! In that sense ditaa is a diagram markup language, with
      very loose syntax.


    Download

    (((-intro-))) (((-download-))) (((-usage and syntax-))) (((-friends-))) (((-contact-)))

    The latest version of ditaa can be obtained from its SourceForge project page.

    You can checkout the code using:

    ???svn co https://ditaa.svn.sourceforge.net/svnroot/ditaa ditaa

    You can also browse the code online.


    Usage and syntax

    (((-intro-))) (((-download-))) (((-usage and syntax-))) (((-friends-))) (((-contact-)))

    Command line

    You need the latest Java runtimes (JRE) to use ditaa. The best
    anti-aliasing can be achieved using Java 1.5 or higher.

    To start from the command line, type (where XXX is the version number):

    java -jar ditaaXXX.jar

    You will be presented with the command-line options help:

     -A,--no-antialias          Turns anti-aliasing off.
     -d,--debug                 Renders the debug grid over the resulting
                                image.
     -E,--no-separation         Prevents the separation of common edges of
                                shapes. You can see the difference below:
    
    +---------+
    | cBLU    |
    |         |
    |    +----+
    |    |cPNK|
    |    |    |
    +----+----+
    			
    Before processingCommon edge
    separation (default)
    No separation
    (with the -E option)
     -e,--encoding <ENCODING>   The encoding of the input file.
     -h,--html                  In this case the input is an HTML file. The
                                contents of the <pre class="textdiagram"> tags
                                are rendered as diagrams and saved in the
                                images directory and a new HTML file is
                                produced with the appropriate <img> tags.
                                See the HTML section.
        --help                  Prints usage help.
     -o,--overwrite             If the filename of the destination image
                                already exists, an alternative name is chosen.
                                If the overwrite option is selected, the image
                                file is instead overwriten.
     -r,--round-corners         Causes all corners to be rendered as round
                                corners.
     -s,--scale <SCALE>         A natural number that determines the size of
                                the rendered image. The units are fractions of
                                the default size (2.5 renders 1.5 times bigger
                                than the default).
     -S,--no-shadows            Turns off the drop-shadow effect.
     -t,--tabs <TABS>           Tabs are normally interpreted as 8 spaces but
                                it is possible to change that using this
                                option. It is not advisable to use tabs in
                                your diagrams.
     -v,--verbose               Makes ditaa more verbose.
    

    Syntax

    Round corners

    If you use / and \ to connect corners, they are rendered as
    round corners:

    /--+
    |  |
    +--/
    		  
    round corner demo
    Before processingRendered

    Color

    Color codes can be used to add color to the diagrams. The
    syntax of color codes is

    cXXX

    where XXX is a hex number. The first digit of the number
    represents the red compoment of the color, the second digit
    represents green and the third blue (good ol' RGB). See below for
    an example of use of color codes:

    /----\ /----\
    |c33F| |cC02|
    |    | |    |
    \----/ \----/
    
    /----\ /----\
    |c1FF| |c1AB|
    |    | |    |
    \----/ \----/
    		  
    color demo
    Before processingRendered

    This can become a bit tedious after a while, so there are (only
    some for now) human readable color codes provided:

    Color codes
    /-------------+-------------\
    |cRED RED     |cBLU BLU     |
    +-------------+-------------+
    |cGRE GRE     |cPNK PNK     |
    +-------------+-------------+
    |cBLK BLK     |cYEL YEL     |
    \-------------+-------------/
    
    color code
    Before processingRendered

    As you can see above, if a colored shape contains any text, the
    color of the text is adjusted according to the underlying
    color. If the undelying color is dark, the text color is changed
    to white (from the default black).

    Note that color codes only apply if they are within closed
    shapes, and they have no effect anywhere outside.

    Tags

    ditaa recognises some tags that change the way a rectangular
    shape is rendered. All tags are between { and }. See the table below:

    NameOriginalRenderedComment
    Document
    +-----+
    |ysekuua  |
    |     |
    |     |
    +-----+
    		  
    Symbol representing a document.
    Storage
    +-----+
    |{s}  |
    |     |
    |     |
    +-----+
    		  
    Symbol representing a form of storage,
    like a
    database or a hard disk.
    Input/Output
    +-----+
    |{io} |
    |     |
    |     |
    +-----+
    		  
    Symbol representing input/output.

    Dashed lines

    Any lines that contain either at least one = (for horizontal
    lines) or at least one : (for vertical lines) are rendered as
    dashed lines. Only one of those characters can make a whole line
    dashed, so this feature "spreads". The rationale behind that is
    that you only have to change one character to switch from normal
    to dashed (and vice versa), rather than redrawing the whole
    line/shape. Special symbols (like document or storage symbols) can
    also be dashed. See below:

    ----+  /----\  +----+
        :  |    |  :    |
        |  |    |  |{s} |
        v  \-=--+  +----+
    
    Before processingRendered

    Point markers

    If * is encountered on a line (but not at the end of the
    line), it is rendered as a special marker, called the point
    marker (this feature is still experimental). See below:

    *----*
    |    |      /--*
    *    *      |
    |    |  -*--+
    *----*
    
    point marker demo
    Before processingRendered

    Text handling

    (This section is still being written)

    If the pattern ' o XXXXX' is encountered, where XXXXX is any
    text, the 'o' is interpreted and rendered as a bullet point. Note
    that there must be a space before the 'o' as well as after it. See
    below:

    /-----------------\
    | Things to do    |
    | cGRE            |
    | o Cut the grass |
    | o Buy jam       |
    | o Fix car       |
    | o Make website  |
    \-----------------/
    
    bullet point demo
    Before processingRendered

    ?

    HTML mode

    When ditaa is run using the --html option, the input
    is an HTML file. The contents of the <pre
    class="textdiagram">
    tags are rendered as diagrams and
    saved in the images directory and a new HTML file is
    produced with the appropriate <img> tags.

    If the id parameter is present in the
    <pre> tag, its value is used as the filename of the
    rendered png. Otherwise a filename of the form
    ditaa_diagram_X.png is used, where X is a
    number. Similarly, if there is no output filename specified, the
    converted html file is named in the form of
    xxxx_processed.html, where xxxx is the filename of the
    original file.

    In this mode, files that exist are not generated again, they
    are just skipped. You can force overwrite of the files using the
    --overwrite option.

    posted on 2013-11-03 15:21 ideame 閱讀(520) 評論(0)  編輯  收藏


    只有注冊用戶登錄后才能發表評論。


    網站導航:
     
    主站蜘蛛池模板: 可以免费看黄视频的网站| 女同免费毛片在线播放| 中文字幕影片免费在线观看| 亚洲精品无码永久在线观看你懂的| 精品国产一区二区三区免费看| 亚洲精品乱码久久久久久下载| 羞羞视频免费网站含羞草| 免费无遮挡无码视频网站| 亚洲精品国产高清在线观看| 久久爰www免费人成| 亚洲午夜精品久久久久久人妖| 无码专区AAAAAA免费视频| 伊人久久亚洲综合影院| 亚洲日韩在线视频| 97热久久免费频精品99| 亚洲乱码国产一区网址| 亚洲日本一线产区和二线| 国产网站免费观看| 一级a性色生活片久久无少妇一级婬片免费放| 亚洲高清偷拍一区二区三区| 手机永久免费的AV在线电影网| 国产成人综合亚洲AV第一页| 精品一卡2卡三卡4卡免费视频| 又黄又爽一线毛片免费观看| 亚洲国产成人久久| 精品久久免费视频| CAOPORN国产精品免费视频| 亚洲日本精品一区二区| 少妇高潮太爽了在线观看免费| 国产午夜亚洲精品不卡| 国产亚洲精品无码成人| 野花高清在线电影观看免费视频| 亚洲成av人无码亚洲成av人| 久久亚洲AV无码西西人体| 麻豆成人久久精品二区三区免费 | 日韩免费视频在线观看| 青青草97国产精品免费观看| 亚洲AV无码不卡在线播放| 成人毛片手机版免费看| eeuss免费影院| 亚洲人成影院在线高清|