emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org-babel python/shell or gantt charts with gnuplot from w


From: Eric Schulte
Subject: Re: [Orgmode] org-babel python/shell or gantt charts with gnuplot from within org-mode
Date: Tue, 13 Apr 2010 12:51:10 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Erik Butz <address@hidden> writes:

> Hi all,
>
> I have been playing around with org-mode and have been thinking about
> the possibility to create gantt charts with org-mode. I did not find
> anything in the archives, and todays thread about taskjuggler brought
> me back to the subject.
>
> This is a python script hovering around the web (gantt.py) which
> enables gant charts with gnuplot. I played around with this a bit so
> as to have it accept ISO timestamps (%Y-%m-%dT%H:%M:%S) and or
> durations. Now I am looking for a way to execute this from within
> org-mode probably using org-babel
>
> The (bash) syntax would be something like
>
> python gantt.py -t "Title" -i input.txt | gnuplot -persist
>
> I would like to pass an org table to the script instead of the input
> file so the equivalent of doing
>
> cat input | python gantt.py -t "Title" | gnuplot -persist
>
> The input structure is (e.g.)
>
> Task 1        2010-4-2T12:00:00       1       validate
> Task 2        2010-4-5T12:00:00       5.25      something
> Task 3        2010-4-5T12:00:00       2010-4-10T0:00:00       otherthing
> Task 4        5.5                     yet another thing
> which could well be the column mode representation of a file probably.
>

something like the following in will allow you to pass a table to a
series of shell commands

  #+tblname: tasks
  | Task 1 | 2010-4-2T12:00:00 |                 1 | validate   |
  | Task 2 | 2010-4-5T12:00:00 |              5.25 | something  |
  | Task 3 | 2010-4-5T12:00:00 | 2010-4-10T0:00:00 | otherthing |

  #+begin_src sh :var tasks=tasks
    echo "$tasks" |wc
  #+end_src

  #+results:
  : 3      15     130

you can also use a gnuplot block to accept the output of gantt.py, and
once everything is working it can be packaged up into a library of babel
[1] function which could then be called with a short line like.

#+call: gantt(tasks=my-task-table)

Hope that helps, let me know if you have any more questions. -- Eric

>
> I am sorry should this be a bit vague.
>
> Please let me know if I can provide any more information to clarify the 
> problem
>
> Cheers and thanks,
>
> Erik
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Footnotes: 
[1]  http://orgmode.org/worg/org-contrib/babel/library-of-babel.php





reply via email to

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