Installing Asciio in Ubuntu

Several times a year I need to create a diagram - usually a flow chart or network diagram - in a form known as "ASCII art".  This is because I typically use text-only email and for simple diagrams it's easier to include a small piece of "ASCII art" than it is to create an image and attach it to the email.  Let me note that I'm not talking about ASCII art like the ASCII rendering of the Mona Lisa or Barrack Obama. Instead I mean an ASCII diagram like this:

                   .---------------.
         .---------| This is a box |-------.
         |         '---------------'       |
         |                                 |
         |                                 |
         |                                 |
         v                                 v
  .------------.        .-------------------------------------.
  | This is a  |        | This is another child box with even |
  | child box  |        | more text than the first.           |
  '------------'        '-------------------------------------'

It can be tedious to create an ASCII diagram - a lot of typing and revising go into even a simple block diagram.

Fortunately, there is an easy-to-use graphical tool for vreating and editing ASCII diagrams.  It's called Asciio - a play on the name of the Microsoft tool, Visio.  It's not too hard to install Asciio but you do have to delve into the command line to get it installed.  Since you're working in ASCII art, the command line is probably not unfamiliar to you.  Even if you have not installed a program like Asciio from the command line before you'll find it's straightforward and, in this case, rewarding.

Here, then, is a brief guide to installing Asciio.  This is installed in Xubuntu but works just as well for Ubuntu and Kubuntu.

  1. Open a terminal window
  2. Become the root user by typing:
    sudo su -
    and then enter your password.
  3. [Optional] To prevent getting a harmless complaint about YAML not being installed:
    apt-get install libyaml-perl
  4. Start perl's configuration:
    perl -MCPAN -e shell
  5. Start installing Asciio:
    install App::Asciio
  6. Now you will have to watch for about ten minutes as Asciio is installed. You have to watch because every time perl comes to a decision it asks for your approval.  For example:
    N/NK/NKH/Directory-Scratch-Structureed-0.04.tar.gz is just needed temporarily during building or testing. Do you want to install it permanently? [yes]
    The "[yes]" means the default answer is 'yes' so if you just hit 'enter'  you'll get the default.  I just end up hitting 'enter' a dozen (or two dozen) times.
  7. At the successful completion you'll be back to the cpan prompt, cpan[7]> and if there are no errors, Asciio is installed!
  8. Type
    exit
    to get back to the root user shell.
  9. Type
    exit
    to get back to the user shell.

Now that you have Asciio installed it's time to make a sample diagram.