Hacker News new | past | comments | ask | show | jobs | submit login
Ditaa: DIagrams Through Ascii Art (sourceforge.net)
34 points by vmorgulis on Feb 15, 2016 | hide | past | web | favorite | 18 comments



Well, OK, but usually I want to go the other way. How about something that can take a drawing produced in some sort of reasonable drawing tool and produce ASCII art that I can include in some kind of ASCII-only file (like program source.) Originating a drawing in ASCII-art is about as fun as a poke in the eye with a sharp stick.

Certainly, there is value on ASCII-art to nice-graphics mark-up, but only to the extent that the ASCII-art is used as an intermediate, human readable, common-demoninator storage format. Authoring in ASCII-art just needs to stop.


Migrated to github:

https://github.com/stathissideris/ditaa

(SF.net lists 2011 as SVN trunk date, github lists "13 days ago")

In related work, see also my Go port at:

https://github.com/akavel/ditaa

(side by side comparison: http://akavel.github.io/ditaa/)


Aw. I wrote a UNIX filter to do that around 1980. It looked at lines of text three lines at a time, and converted "+", "-", "_", and "|" characters used together to line drawing characters to make clean boxes, lines, and joins.

    ┏━━━━━━━━━━┓       ┏━━━━━━━━━━┓
    ┃Like this.┣━━━━━━━┫          ┃
    ┗━━━━┳━━━━━┛       ┗━━━━━━━━━━┛ 
         ┃
         ┃             ┏━━━━━━━━━━┓
         ┗━━━━━━━━━━━━━┫          ┃
                       ┗━━━━━━━━━━┛


It's perfect!

How did you do that?


Unicode line drawing characters in a Markdown monospace code block.


Markdeep from Morgan McGuire can do something like this too: https://casual-effects.com/markdeep/


From their examples:

    +--------+   +-------+    +-------+
    |        | --+ ditaa +--> |       |
    |  Text  |   +-------+    |diagram|
    |Document|   |!magic!|    |       |
    |     {d}|   |       |    |       |
    +---+----+   +-------+    +-------+
        :                         ^
        |       Lots of work      |
        +-------------------------+
Typing this out is a lot more work than creating it in Visio...


Agreed. But check out artist mode on Emacs...


Seconded, artist mode is great for this stuff.

Separately, check out plantuml for diagrams from text http://plantuml.com/


ok.. maybe this is only a value add for Emacs users?


org-mode certainly supports it, which is a big plus.


Related: http://monodraw.helftone.com is a beautiful ASCII Diagramming Tool for Mac.


There used to be ditaa.org which provided access to ditaa via a simple HTTP API. Unfortunately it seems to have vanished.


My fault. It was running on a free Amazon ec2 instance and I forgot to transition it to paid when the time ran out. If anyone wants to get it running again I've still got the domain and can point it to the right place.

I'm on vacation now but this gives me a good reason to get it working again!


An idea (don't know if it's feasible) is to compile to JS with GWT and put that to GitHub pages.


> a small command-line utility written in Java

That somehow sounds wrong. Other than that, very cute. I remember when i wrote a task tracker for myself in school projects and suddenly there was a requirement to print them out. Creating a ASCII representation was the most fun part.


Better up your varnish game


not to be confused with DITA: The Darwin Information Typing Architecture[1].

[1]. http://dita.xml.org/




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: