Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
3  
You can draw this kind of diagrams from within vim using the DrawIt plugin. –  dawud Apr 26 at 12:00
7  
"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 at 12:05
    
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 at 15:59

4 Answers 4

up vote 33 down vote accepted

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

share|improve this answer
1  
Very nice tools, thanks. –  A.L Apr 27 at 14:08

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

share|improve this answer
    
+1 Re: "ditaa" So someone might do these by hand so they could be converted to a graphical format... –  goldilocks Apr 26 at 12:18
1  
Yes, ditaa is a great combination with asciio. –  Martijn Heemels Apr 27 at 1:43

I didn't try it but maybe you will be interested by this link: graph-easy. Regards.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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