[Raleigh-talk] Autodia patches
Daniel Sterling
dan at lost-habit.com
Thu Oct 18 18:57:57 PDT 2007
I told some people that I would send my Autodia patches out.
They are here:
http://dog.lost-habit.com/~eqhmcow/Autodia.patches.warning.very.very.ugly.and.hackish
Warning: the code I wrote is awful! Its only saving grace is that it works.
The patches apply against the Autodia 2.00 package from Debian, which is
available at http://packages.debian.org/testing/x11/autodia .
Here is some more information:
== Autodia ==
Autodia is a program that automatically generates horrible looking Dia
diagrams of objects (object modeling).
== MI Autodia ==
MI's Autodia is a complete rewrite of the plotting algorithm so that it
generates much less horrible Dia diagrams, as well as HTML files
detailing the classes.
=== Features: ===
* Automatic generation of Dia diagrams that have the potential to be
quite large but do properly diagram class relationships with lines that
line up right and classes that don't overlap each other. To print, set
Dia print options to 25% and landscape. Printing is currently not
recommended. If you do print, print to a file first and use GhostView to
examine and print. Do not ignore this advice.
* Automatic generation of HTML pages that detail objects. Inheritance
path, children, dependencies, attributes, and methods are listed. Links
to other objects are created where applicable. An index of objects is
created.
=== HOWTO ===
To create the Dia xml as well as the HTML pages, run autodia.pl with
options similar to these:
<pre>
cd ~/codebase
autodia.pl -d 'lib/perl another/lib/perl' -r
</pre>
In this example, autodia will recurse through those directories and
create a diagram and HTML pages that detail all the classes in the
lib/perl and another/lib/perl directories.
The diagram itself would be output as <code>autodia.out.xml</code>, and
you can use Dia to open this file and look at the Diagram.
The HTML pages are all written out in the <code>autohtml</code>
directory, so you can point your browser to
~/codebase/autohtml/index.html to get a look at those.
=== TODO: ===
* Printing: better compact diagram so it's not so enormous; better
arrange classes with no children; don't split an object vertically
across pages
* Parse Class::MethodMaker attributes
* Put POD into the HTML pages
* Show inherited methods
* Show line numbers
* Possibly link to code
* Add setting to generate Dias designed to print either portrait or
landscape (the code for either is there, but landscape is hard-coded as
the current)
* Merge upstream/with upstream
=== Codebase ===
MI Autodia forked from Autodia version 2.00. The latest Autodia is 2.03,
but it has no major improvements that MI Autodia does not already have.
MI Autodia does need a good rewrite, but the amount of code that can be
merged from upstream is fairly minimal.
==== Divergence ====
At this point, MI Autodia is completely different than any other
version. Core components have been rewritten, so at this time it should
be considered a highly divergent fork that has not been properly merged
with any upstream. Consequently, no part of MI Autodia can be "upgraded"
via CPAN or other upstream packages. MI's plotting algorithm is IMO
better than upstream, and recent upstream improvements such as better
Perl parsing have also been independently coded and tested. There is a
possibility that some Perl parsing code could fairly easily be merged,
but no work has begun in that area.
==== Detailed Differences to Upstream 2.00 ====
* The plotting algorithm's complete rewrite means that MI Autodia is
essentially a completely different program.
* The code to generate HTML files detailing objects is hardcoded into
the new plotting algorithm.
Changed files:
* The majority of the rewrite is in Autodia/Diagram.pm. This contains
the plotting algorithm itself as well as the code that sets up "nodes"
for the plotting algorithm to work with.
* Autodia/Diagram/Class.pm has code to sort attributes and methods
* Autodia/Diagram/Inheritance.pm has code that properly draws lines
between objects to show inheritance
* Autodia/Handler/Perl.pm has code that properly reads multi-line use
base and @INC directives (upstream recently added similar functionality
which I should look at merging)
More information about the Raleigh-talk
mailing list