help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Off topic: ganttProject->xfig converter


From: A S Hodel
Subject: Off topic: ganttProject->xfig converter
Date: Fri, 7 May 2004 12:09:20 -0500

I sent this to the ganttProject mailing list, but I think it's appropriate here too. Some of you may find this useful if you would like to have project planning software.

Begin forwarded message:

From: A S Hodel <address@hidden>
Date: Fri May 7, 2004  11:53:58 AM US/Central
To: address@hidden
Subject: ganttProject->xfig converter

I am new to ganttProject, but have found the program very useful. One issue that caused me problems is that the graphical output of ganttProjectis not scalable - it's converted directly to .png files and does not copy well.

In an attempt to start to fix this problem, I've written an octave m-file script, myfig.m (should probably call it "gan2fig" instead), that reads ganttProject xml .gan files and translates the Gantt chart to xfig format.

xfig is a drawing tool that is used under Linux, Mac OS X, and allows its output to be translated to
        - LaTeX  (scalable)
        - postscript (scalable)
        - .eps  (scalable)
        - .pdf (scalable)
        - many other things.

The m-file and an example of its use are at
        http://www.eng.auburn.edu/users/hodelas/LaTeX/LaTeX_tf.html
under the link "On using Gantt charts in LaTeX." There are also links to xfig, etc., which I installed under Mac OS X using fink (I've also used it under Linux, but I'm now using only Mac OS X.)

I'd like to see these functions incorporated into GanttProject itself, but there are two problems:
(1) I don't know JAVA, and
(2) Alexandre Thomas doesn't know octave/MATLAB.

So, we would like to ask this mailing list if anyone can take my few days worth of work and help to incorporate the features into ganttProject. I'd prefer to see the functions directly incorporated into ganttProject in order to maintain maximum portability.

Below is an english translation of my (badly written) french description of mychart.m to Mr. Thomas:

On Friday, May 7, 2004, at 02:12 AM, Alexandre THOMAS wrote:
Ok
I've never heard about the octave language.
Perhaps you can pass a mail to the mailing list of the developers
(address@hidden)
and can explain what you've done..Perhaps someone know java/octave both...

That's a good idea.

I'll try to look at your programm and try to convert it into Java..
By the way, could you explain the goal of the program.

If I understand, it convert the xml project file directly into a eps of fig
file?? isn't it

You are correct.

The subroutines "getProject", "getProjectTextWidth," "concatenateTasks", and "fixTaskDates" make a data structure that contains all tasks. Your Java program has no need of these subroutines since it begins with such a data structure.

The subroutine "xfigheader" begins to write an xfig file with color definitions, etc.

The subroutine "set ProjectPlotTimes" converts the start dates and durations into data structures of boxes and lines for xfig by calling the subroutine "task2box." Notice that the word "box" is incorrect; in xfig anything that is made with lines is a "polyline" object, type 2, and so perhaps I should write "task2polyline." setProjectPlotTimes also calls "task2text," which makes a text data structure object for xfig.

Finally, the subroutine "drawtask" writes the parameters in the xfig file that come from the data structures that were made in setProjectPlotTimes. This is done by calling subroutines "drawtask" and "drawtext." Following this, drawtask writes the lines and arrows for the dependencies.

All of these subroutines use a data structure notation that is very similar to C++ et C, except that there is no need to write the class definitions.

One important difference is cell arrays, which are written with braces {} instead of parenthesis (). A cell is an object that can be anything - it's perhaps similar to a "union" in C/C++. Thus, if I write
        task = tasklist{ii};
that means to "put a copy of object ii in task list into variable task."


I've another idea...Why not create another external tool (external from
ganttproject) that can take the xml file and convert it into a pdf document..
Can be another solution....

Oui! Je peut le faire après je suis satisfié avec myfig (je dois changer le nom à "gan2fig").


in fact I like your work
merci! - ce n'est pas très élégant, mais il marche assez bien pour maintenant.

kind regards
alexandre

Selon A S Hodel <address@hidden>:

Je ne connais pas le JAVA, alors j'ai écrit les fonctionnes en Octave -
c'est un peu semblable à MATLAB/C++.
Pour maintenant, peut-être c'est assez de mettre un "link" a mon
web-page de LaTeX à
        http://www.eng.auburn.edu/users/hodelas/LaTeX
J'ai mit un exemple là aujourd'hui.  Puis, s'il y aurais quelqu'un qui
connais tous les deux d' Octave et Java,
il/elle peut ajouter les fonctionnes directment dans ganttProject.

La source pour mychart.m est attaché au desous.

Ça va avec vous?

merci beaucoup pour ganttProject - c'est très utile!

Scotte


A. S. Hodel Dept. ECE, 200 Broun Hall, Auburn University AL 36849-5201
(334) 844-1854/fax(334) 844-1809, http://www.eng.auburn.edu/users/hodelas , address@hidden



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]