Plain ascii diagram
$> perl asciio.pl
This gtk2-perl application allows you to draw \s-1ASCII\s0 diagrams in a modern (but simple) graphical application. The \s-1ASCII\s0 graphs can be saved as \s-1ASCII\s0 or in a format that allows you to modify them later.
Thanks to all the Perl-QA hackathon 2008 in Oslo for pushing me to do an early release.
Special thanks go to the Muppet and the gtk-perl group, Ga\*'bor Szabo\*' for his help and advices.
Adam Kennedy coined the cool name.
Sometimes a diagram is worth a lot of text in a source code file. It has always been painfull to do \s-1ASCII\s0 diagrams by hand.
.-----------------------------------------------------------------. | Asciio | |-----------------------------------------------------------------| | ............................................................... | | ..............-------------..------------..--------------...... | | .............| stencils > || asciio > || box |..... | | .............| Rulers > || computer > || text |..... | | .............| File > || people > || wirl_arrow |..... | grid---------->.......'-------------'| divers > || axis |..... | | ............................'------------'| boxes > |..... | | ......................^...................| rulers > |..... | | ......................|...................'--------------'..... | | ......................|........................................ | | ......................|........................................ | | ......................|........................................ | | ......................|........................................ | '-----------------------|-----------------------------------------' | | context menu
The context menu allows to access to asciio commands. \s-1ASCII\s0 is used to insert \s-1ASCII\s0 elements.
All the keyboad commands definitions can be found under asciio/setup/actions/. Among the commands implemented are:
select all
delete
undo
group/ungroup
open / save
local clipboard operations
A window displaying the currently available commands is displayed if you press K.
There but a few elements implemented at the moment.
wirl arrow
An arrow that tries to do what you want. Try rotating the end clockwise then counter clockwise to see how it acts
^ | | --------. | | '------- | | O-------------X / | / | / | / v / / v
box and text
Both are implemented within the same code. Try double clicking on a box to see what you can do with it.
.----------. | title | .----------. |----------| ************ | | | body 1 | * * '----------' | body 2 | ************ '----------' anything in a box (\_/) | edit_me (O.o) <------------' (> <)
your own stencils
Take a look at setup/stencils/computer for a stencil example. Stencils lites in setup/setup.ini will be loaded when Asciio starts.
your own element type
For simple elemnts, put your design in a box. that should cover 90% of anyone's needs. You can look in lib/stripes for element implementation examples.
You can export to a file in \s-1ASCII\s0 format but using the .txt extension.
Exporting to the clipboard is done with ctl + e.
User code ^ ^ OS code \ / \ / \ / User code <----Mode----->OS code / \ / \ / \ User code v v OS code
.---. .---. .---. .---. .---. .---. OS API '---' '---' '---' '---' '---' '---' | | | | | | v v | v | v .------------. | .-----------. | .-----. | Filesystem | | | Scheduler | | | MMU | '------------' | '-----------' | '-----' | | | | v | | v .----. | | .---------. | IO |<----' | | Network | '----' | '---------' | | | v v v .---------------------------------------. | HAL | '---------------------------------------'
.---------. .---------. | State 1 | | State 2 | '---------' '---------' ^ \ ^ \ / \ / \ / \ / \ / \ / \ / \ / \ / v v ****** ****** ****** * T1 * * T2 * * T3 * ****** ****** ****** ^ ^ / \ \ / \ \ / \ \ / stimuli \ \ / \ \ v \ .---------. '--------| State 3 | '---------'
gnome libraries, gtk, gtk-perl, perl
Undoubtedly many as I wrote this as a fun little project where I used no design nor 'methodic' whatsoever.
Khemir Nadim ibn Hamouda CPAN ID: NKH mailto:[email protected]
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
I run gentoo, packages to install gtk-perl exist. Install Ascii with cpan.
FreeBSD users can now install asciio either by package:
$ pkg_add -r asciio
or from source (out of the ports system) by:
$ cd /usr/ports/graphics/asciio $ make install clean
Thanks to Emanuel Haupt.
Ports are on the way.
AsciiO is part of camelbox and can be found here: <http://code.google.com/p/camelbox/>. Install, run AsciiO from the 'bin' directory.
.-------------------------------. / /| / camelbox for win32 / | / / | / / | .-------------------------------. | | _\|_\|_\|_\|_\|_\\_, | | | (_. _ o_ _/ | | | '-' \_. / | | | / / | | | / / .--. .--. | | | ( ( / '' \/ '' \ " | | | \ \_.' \ ) | | | || _ './ | | | |\ \ _\|_\|_.'\ / | | | '-./ .' \ |/ | | | \| / )|\ | | | |/ // \\ | . | |\ _\|_// \\_\|_ | / | //\\ /_\|_/ mrf\_\|_| | / | .--_/ \_--. | / | /_\|_/ \_\|_\ |/ '-------------------------------'
camelbox is a great distribution for windows. I hope it will merge with X-berry series of Perl distributions.
This works too (and I have screenshots to prove it :). I don't own a mac and the mac user hasn't send me how to do it yet.
\s-1YMMV\s0, install gtk-perl and AsciiO from cpan.
http://www.jave.de http://search.cpan.org/~osfameron/Text-JavE-0.0.2/JavE.pm http://ditaa.sourceforge.net/ http://www.codeproject.com/KB/macros/codeplotter.aspx http://search.cpan.org/~jpierce/Text-FIGlet-1.06/FIGlet.pm http://www.fossildraw.com/?gclid=CLanxZXxoJECFRYYEAodnBS8Dg (doesn't always respond)
http://www.ascii-art.de (used some entries as base for the network stencil) http://c2.com/cgi/wiki?UmlAsciiArt http://www.textfiles.com/art/ http://www2.b3ta.com/_bunny/texbunny.gif
*\o_ _o/* / * * \ <\ *\o/* /> ) o/* / > *\o <\ /> _\|_o */\ /\* o_\|_ * /> <\ * /\* _\|_o_ _o_\|_ */\ * / * * \ * <\ /> *\o/* ejm97 _\|_)_\|_