In:
+---------+ +---------+ +---------+
| Shape | | Line | | Point |
+---------+ +---------+ 2 +---------+
| draw +<--------+ start +----O+ x |
| move +<-+ | end | | y |
+---------+ \ +---------+ +---------+
\
\ +---------+
+--+ Circle |
+---------+
| center |
| radius |
+---------+
Out:

Seems this is a to-be-released feature of docutils (Python) called aafigure – source available here – also see the README before and after. To install you’d need Python + PIL – after that download the various .py files from here and run aafigure.py --help from the command line. Able to generate svg, png or jpg.
Very cool. It’s not yet quite so clever to handle any old diagram from JavE, which doesn’t necessarily produce clean lines (depends on the drawing tools you used) and Iñtërnâtiônàlizætiøn is problem but this would be very handy for wikis and similar. Just needs porting to PHP…
Related posts:
- 5 Slick Alternatives To Google Image Search Google's Image Search is always a stalwart when it comes...
- Open Source Image Editors … for Designers? Can a designer use an open source image editing application...
- 19 Impressive Online Image Editors There's no reason image editing should break your budget, or...
- Drawing In Illustrator, Part 4: Pen Tool – Straight Lines Jennifer shows you there is nothing to be afraid of...
- How To Resize An Image In Photoshop And Keep It Sharp Knowing which options to choose in Photoshop's Image Size dialog...







umm…
i have python and jave on my other box…
June 28th, 2006 at 6:48 am
-offtopic-
So, when will Sitepoint invest some time into a Python section here on the Sitepoint blogs? It seems we have the talent, experience, and willingness for it. Great addition to keep it still within the PHP topic area though with that last sentence, Harry. ^_^
-offtopic-
This seems like a great tool for rendering diagram-specific models from JavE, but what happens if/when a not-so-perfectly-rendered diagram is sent to this? Does it support error handling methods and exceptions/extendability?
June 28th, 2006 at 7:00 am
Reminds me of the old IBM DOS charset, it had all the funky box drawing characters in it.
How painful is it to actually draw with ASCII tho? If you need a tool to draw it, why not go and use SVG?
June 28th, 2006 at 7:28 am
When posting it needs a “Python” checkbox. And having a real Python blogger would help ;) I guess anyone motived to blog on Python should try here: http://www.sitepoint.com/contact
It seems robust in the sense that I haven’t been able to break it – you still get “something” out of the far end but, for example with dotted lines, they are not interpreted as a line – just a series of dots.
Doing large ASCII diagrams from hand is a pain in terms of filling in / aligning stuff with whitespace. But it is quite popular – emacs has a tool for this, for example. If doing this I tend to start with JavE then fine tune by hand.
The advantage is you can have the image source truly inline with the document (just “plain” text, no browser plugins for non-Firefox users needed). Also Open Source SVG tools aren’t so well evolved – there’s inkscape – http://inkscape.org/ – otherwise I guess dia (http://www.gnome.org/projects/dia/) can export SVG. And tools like visitors (http://www.hping.org/visitors/) produce ASCII reports which could be turned into bar chart images with this.
June 28th, 2006 at 8:11 am
[...] responses to this entry through the RSS 2.0 feed. :) Responses are currently closed, but you can trackback from your ownsite. [...]
June 29th, 2006 at 5:02 am
June 30th, 2006 at 8:51 am
This is kinda cool, but only in a golly gee sort of fashion. I don’t see very many practical uses for this.
July 12th, 2006 at 12:05 pm
Isn’t graphviz a better way to go? dot-markup is really simple, and rather than describe how to render the graph, it describes what the graph should contain (and leaves it to the layout engine to arrange it).
August 1st, 2006 at 11:12 pm
What is the goal of this ascii->graphics conversion? Just for fun?
August 9th, 2006 at 11:34 pm
wow very nice. but the drawing of ascii diagrams takes me much longer than the drawing of an simple image. so i think image to ascii would be better.
November 24th, 2006 at 5:22 am
You could draw these diagams with: http://www.asciidrawer.com
March 8th, 2007 at 12:09 am
This is very cool, I’ve already had a play about with it and I’m hoping for a PHP port very soon. I’d like to use it to make a website to display my family tree.
April 23rd, 2007 at 8:36 am