146

I am looking for a program which I can use to create ASCII diagrams such these:

    +---------+
    |         |                        +--------------+
    |   NFS   |--+                     |              |
    |         |  |                 +-->|   CacheFS    |
    +---------+  |   +----------+  |   |  /dev/hda5   |
                 |   |          |  |   +--------------+
    +---------+  +-->|          |  |
    |         |      |          |--+
    |   AFS   |----->| FS-Cache |
    |         |      |          |--+
    +---------+  +-->|          |  |
                 |   |          |  |   +--------------+
    +---------+  |   +----------+  |   |              |
    |         |  |                 +-->|  CacheFiles  |
    |  ISOFS  |--+                     |  /var/cache  |
    |         |                        +--------------+
    +---------+

It should preferably be a package available in Debian. The wonderful diagram displayed above is taken from the Linux kernel documentation. I cannot believe they were created by hand. There must be some tool to create them.

  • 6
    You can draw this kind of diagrams from within vim using the DrawIt plugin. – dawud Apr 26 '14 at 12:00
  • 12
    "I cannot believe they were created by hand. There must be some tool to create them." I can easily believe they were created by hand, especially if you were, e.g., working from a sketch or other source for the diagram. That wouldn't take more than 5 minutes. – goldilocks Apr 26 '14 at 12:05
  • 2
    I can quite easily believe they were created by hand because they're actually quite easy to do if you use a bit of common sense and visualise it in your head first. Of course, it takes a few minutes longer than it would with Asciio or something. – Miles Rout May 4 '14 at 15:59
143

asciio

I've used asciio for several years. Many of the diagrams on this site I've created using asciio.

example

  vncviewer         .-,(  ),-.    
   __  _         .-(          )-.           gateway           vncserver 
  [__]|=|  ---->(    internet    )-------> __________ ------> ____   __ 
  /::/|_|        '-(          ).-'        [_...__...°]       |    | |==|
                     '-.( ).-'                               |____| |  |
                                                             /::::/ |__|

The GUI looks like this.

           ss of asciio

NOTE: Everything is driven from the right click menu as well as short-cut keys.

DrawIt

Using vim along with the DrawIt plugin you can also create basic diagrams. A good overview of how to install and use it is available here in this article titled: How To Create ASCII Drawings in Vim Editor (Draw Boxes, Lines, Ellipses, Arrows Inside Text File).

asciiflow

There's a website called asciiflow which is probably the easiest way to draw these types of diagrams.

   ss #2

JavE

Another tool, JavE, written in Java that can create ascii diagrams like this as well.

                                 ,'''''''''''''|
                                 | Controller  |
                                 |             |
                                 '`'i''''''''''
                                  ,'        `.
                                ,'            `.
                               -                -
                     ,'''''''''''''|      ,''''''''''''`.
                     |    Model    |______|    View     |
                     |             |      |             |
                      `''''''''''''       '`'''''''''''''

The GUI looks like this:

   ss #2

Resources

  • 1
    You could add diiagrams.com if you want – I3ck Dec 17 '17 at 16:41
  • The Windows installer for asciio from the link no longer works. The installer says it got a 404 error and then aborts. I just used asciiflow instead. – Joseph238 Jul 30 '18 at 22:05
  • 1
    @Joseph238 - thanks for the feedback, given this is Unix & Linux website I'm not sure most passer-by's will care all that much. If you come across a link to it pls let us know. – slm Jul 30 '18 at 22:23
  • 3
    Maybe add a note about: textik.com. – Isaac Oct 11 '18 at 6:51
  • 1
    I recently created AsciiGrid which uses Svgbob to render diagrams. Here is the diagram from the original question – mbarkhau Dec 30 '19 at 22:41
31

Have a look at artist-mode or picture-mode for Emacs (see also this screencast). You might also want to check out ditaa.

  • +1 Re: "ditaa" So someone might do these by hand so they could be converted to a graphical format... – goldilocks Apr 26 '14 at 12:18
  • 2
    Yes, ditaa is a great combination with asciio. – Martijn Heemels Apr 27 '14 at 1:43
  • The screencast link is dead. – jcubic Dec 17 '18 at 8:20
25

I found another answer; I am not sure it is fully usable, but remember that GNU roff (groff) has a processor for the Pic language as well as an ascii postprocessor; thus you may have a try at something like that (if you use Linux, everything should probably already be installed). Write a file called test.roff containing:

.PS
box "box1";
line
box "box2";
.PE

Then type: groff -Tascii -p test.roff, and you should get:

+------+     +------+
|      +-----|      |
| box1 |     |box2  |
+------+     +------+

Regards.

17

Maybe you will be interested in graph-easy.

Example:

   echo "[ Bonn ] -- car --> [ Berlin ], [ Ulm ]" | graph-easy

produces:

    +--------+  car   +-----+
    |  Bonn  | -----> | Ulm |
    +--------+        +-----+
      |
      | car
      v
    +--------+
    | Berlin |
    +--------+

You can install it with the following commands:

wget http://search.cpan.org/CPAN/authors/id/T/TE/TELS/graph/Graph-Easy-0.64.tar.gz
tar -xzf Graph-Easy-0.64.tar.gz
cd Graph-Easy-0.64
perl Makefile.PL
make test
sudo make install
PATH=$PATH:/opt/local/libexec/perl5.12/sitebin/graph-easy

(Note the version numbers in the two uppermost and the last line - they may change)

Some nice screenshots are available on the pages of lddot and dothost (because both tools are wrappers for graph-easy).

  • 1
    Looks like the latest version is now hosted on Github: github.com/ironcamel/Graph-Easy – Sridhar Sarnobat Jun 18 '17 at 1:47
  • 1
    I guess this works a lot like Graphviz, but Graphviz doesn't have ASCII output which is a shame. – Sridhar Sarnobat Jun 18 '17 at 1:49
  • graph-easy uses the DOT language, the same as Graphviz – ivarec Jan 25 '19 at 16:43
0

For anyone using a Mac (not the original poster) there's a very nice tool called Monodraw. Of course you're going to pay a few bucks for the fact that it's highly polished and powerful and intuitive, but if this is something you do often, it's a handy tool to have available and $10 is peanuts compared to the time you'll save. If you don't do this often, there's a free trial available, so you're all set. It can even export to SVG

No, I don't work for the company. I'm just a happy user.

Not the answer you're looking for? Browse other questions tagged or ask your own question.