* org and taskjuggler
@ 2008-11-16 20:36 Shelagh Manton
2008-12-15 10:37 ` Christian Egli
0 siblings, 1 reply; 3+ messages in thread
From: Shelagh Manton @ 2008-11-16 20:36 UTC (permalink / raw)
To: emacs-orgmode
I am enrolled in a course that teaches methods of project administration
and I'm using org for my personal notes. One of the set tasks for the
project scenario is to produce a Gantt chart.
It can be simply a spreadsheet or something from a program like planner
or msproject. I vaguely remember a thread a fair while ago about a
exporter to taskjuggler format and I was wondering if that had gone any
further than thought? Or perhaps someone knows another way to get a Gantt
chart out of org-mode data.
Any suggestions that don't require too much scripting would be
appreciated. I'm just trying to get out of reentering all the work I've
done in org into planner or ooo-calc.
Shelagh
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org and taskjuggler
2008-11-16 20:36 org and taskjuggler Shelagh Manton
@ 2008-12-15 10:37 ` Christian Egli
2008-12-16 3:52 ` Shelagh Manton
0 siblings, 1 reply; 3+ messages in thread
From: Christian Egli @ 2008-12-15 10:37 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1327 bytes --]
Shelagh Manton <shelagh.manton@gmail.com> writes:
> One of the set tasks for the project scenario is to produce a Gantt
> chart.
>
> Or perhaps someone knows another way to get a Gantt chart out of
> org-mode data.
I'm using a very hackish "works-for-me" python script that converts a
tsv export from an org-mode file to a taskjuggler file. Probably has
lots of implizit assumptions which not even I remember.
The basic work-flow is to create your hierarchy of tasks, add some effort
estimates and some other properties, export this to a csv and run the
attached python script on it. This will generate a taskjuggler include
file (tji) which can be used in a main taskjuggler file (tjp).
You could use the following Makefile snippet to automate the process:
projectPlan.csv: projectPlan.org
$(EMACS) -batch \
-eval "(progn (find-file \"$<\") (re-search-forward \"^| Task\") (org-table-export \"$@\"))" -kill
projectPlan.tji: projectPlan.csv
$(CSV2TASKJUGGLER) < $< > $@
projectPlan.taskreport.html: projectPlan.tjp projectPlan.tji
$(TASKJUGGLER) $<
Attached is the python script, an example org file and an example for a
tjp file. Let me know if this works for you.
I meant to write a tutorial about this but you know how it is. Maybe you
could write one as you get this to work :-)
Hope this helps
Christian
[-- Attachment #2: Example project plan (org-mode) --]
[-- Type: text/plain, Size: 13170 bytes --]
# -*- mode: org; coding: utf-8 -*-
#+TITLE: XMLP Project Plan
#+LANGUAGE: en
#+OPTIONS: H:2 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:nil skip:t d:nil tags:not-in-toc
#+PROPERTY: Effort_ALL 0.5 1.0 2.0 3.0 5.0 8.0 10.0 15.0 20.0 25.0 40.0 50.0 150.0 200.0
#+PROPERTY: Complete_ALL 0 50 100
#+PROPERTY: NoDepends_ALL True False
#+COLUMNS: %40ITEM(Task) %Effort(Estimated Effort) %Allocate %Account %Start %NoDepends %3Complete(Percent Complete) %Note %Priority
* XML-Project
:PROPERTIES:
:ID: XML-Project
:Account: project_costs
:Start: 2008-09-01
:END:
** Fasttrack
:PROPERTIES:
:Allocate: team
:END:
*** Iteration (Basics)
**** Specification
:PROPERTIES:
:Effort: 1.0
:Complete: 100
:END:
**** Plan
:PROPERTIES:
:Effort: 0.5
:Complete: 100
:END:
**** Admin
***** Setup svn
:PROPERTIES:
:Effort: 1.0
:Complete: 0
:END:
**** Generate large print
***** Install Daisy pipeline
:PROPERTIES:
:Effort: 1.0
:Complete: 100
:END:
***** Enhance DTBook2Latex with variable font size
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** Enhance DTBook2Latex with language handling
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** Customize layout
If the layout created by the Daisy pipeline converter is not
what people want then this needs to be adjusted
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:Note: Canceled, To be done at a later stage
:END:
***** Test
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** Documentation
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** Contribute improvements back to Daisy
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
**** Generate XHTML
***** Install Daisy pipeline
:PROPERTIES:
:Effort: 1.0
:Complete: 100
:END:
***** Run the DTBook to XHTML converter
:PROPERTIES:
:Effort: 0.5
:Complete: 100
:END:
***** Test the result
:PROPERTIES:
:Effort: 1.0
:Complete: 100
:END:
***** Customize layout
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:Note: Canceled, To be done at a later stage
:END:
**** Generate DTBs
***** Install narrator from Daisy pipeline
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** Install TTS
:PROPERTIES:
:Complete: 100
:END:
***** Test
:PROPERTIES:
:Effort: 1.0
:Complete: 100
:END:
***** Documentation
:PROPERTIES:
:Effort: 1.0
:Complete: 100
:END:
**** Generate Braille (hard copy, grade 0 only)
***** Install liblouis + liblouisxml
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** adapt grade 0 table for swiss german
:PROPERTIES:
:Effort: 3.0
:Complete: 100
:END:
***** adapt the semantic action file for DTBook
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** Test
:PROPERTIES:
:Effort: 3.0
:Complete: 100
:END:
***** Documentation
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
***** Contribute improvements back to liblouis
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
**** Primitive Web GUI
***** Implement
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:Note: Canceled. Was for demo and test purposes only. Replaced by Daisy Pipeline
:END:
***** Test
:PROPERTIES:
:Effort: 1.0
:Complete: 100
:Note: Canceled. Was for demo and test purposes only. Replaced by Daisy Pipeline
:END:
**** Review/Presentation/Demo
:PROPERTIES:
:Effort: 2.0
:Complete: 100
:END:
**** Reporting
:PROPERTIES:
:Effort: 0.5
:Complete: 100
:END:
* Export
:PROPERTIES:
:TABLE_EXPORT_FORMAT: orgtbl-to-tsv
:END:
#+BEGIN: columnview :hlines 1 :id "XML-Project"
| Task | Estimated Effort | Allocate | Account | Start | NoDepends | Percent Complete | Note | Priority |
|----------------------------------------------------+------------------+----------+---------------+------------+-----------+------------------+---------------------------------------------------------------------------+----------|
| * XML-Project | | | project_costs | 2008-09-01 | | | | |
| ** Fasttrack | | team | | | | | | |
| *** Iteration (Basics) | | | | | | | | |
| **** Specification | 1.0 | | | | | 100 | | |
| **** Plan | 0.5 | | | | | 100 | | |
| **** Admin | | | | | | | | |
| ***** Setup svn | 1.0 | | | | | 0 | | |
| **** Generate large print | | | | | | | | |
| ***** Install Daisy pipeline | 1.0 | | | | | 100 | | |
| ***** Enhance DTBook2Latex with variable font size | 2.0 | | | | | 100 | | |
| ***** Enhance DTBook2Latex with language handling | 2.0 | | | | | 100 | | |
| ***** Customize layout | 2.0 | | | | | 100 | Canceled, To be done at a later stage | |
| ***** Test | 2.0 | | | | | 100 | | |
| ***** Documentation | 2.0 | | | | | 100 | | |
| ***** Contribute improvements back to Daisy | 2.0 | | | | | 100 | | |
| **** Generate XHTML | | | | | | | | |
| ***** Install Daisy pipeline | 1.0 | | | | | 100 | | |
| ***** Run the DTBook to XHTML converter | 0.5 | | | | | 100 | | |
| ***** Test the result | 1.0 | | | | | 100 | | |
| ***** Customize layout | 2.0 | | | | | 100 | Canceled, To be done at a later stage | |
| **** Generate DTBs | | | | | | | | |
| ***** Install narrator from Daisy pipeline | 2.0 | | | | | 100 | | |
| ***** Install TTS | | | | | | 100 | | |
| ***** Test | 1.0 | | | | | 100 | | |
| ***** Documentation | 1.0 | | | | | 100 | | |
| **** Generate Braille (hard copy, grade 0 only) | | | | | | | | |
| ***** Install liblouis + liblouisxml | 2.0 | | | | | 100 | | |
| ***** adapt grade 0 table for swiss german | 3.0 | | | | | 100 | | |
| ***** adapt the semantic action file for DTBook | 2.0 | | | | | 100 | | |
| ***** Test | 3.0 | | | | | 100 | | |
| ***** Documentation | 2.0 | | | | | 100 | | |
| ***** Contribute improvements back to liblouis | 2.0 | | | | | 100 | | |
| **** Primitive Web GUI | | | | | | | | |
| ***** Implement | 2.0 | | | | | 100 | Canceled. Was for demo and test purposes only. Replaced by Daisy Pipeline | |
| ***** Test | 1.0 | | | | | 100 | Canceled. Was for demo and test purposes only. Replaced by Daisy Pipeline | |
| **** Review/Presentation/Demo | 2.0 | | | | | 100 | | |
| **** Reporting | 0.5 | | | | | 100 | | |
#+END:
[-- Attachment #3: Example taskjuggler main project plan --]
[-- Type: text/plain, Size: 704 bytes --]
project foo "FOO" "1.0" 2008-09-01 - 2010-12-31
account project_costs "Project Costs" cost {
}
resource team "The team" {
resource jane "Jane" {}
resource joe "Joe" {}
}
include "projectPlan.tji"
taskreport "Gantt Chart" {
headline "Project Gantt Chart"
columns hierarchindex, name, note, start, end, effort, duration, cost, chart
timeformat "%Y-%m-%d"
loadunit days
hideresource 1
}
resourcereport "Resource Graph" {
headline "Resource Allocation Graph"
columns no, name, chart
}
htmltaskreport "projectPlan.taskreport.html"{
timeformat "%Y-%m-%d"
columns hierarchindex, name, note, effort, completed, duration, start, end
}
htmlstatusreport "projectPlan.statusreport.html"{
}
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: Script to convert csv to taskjuggler --]
[-- Type: text/x-python, Size: 1937 bytes --]
#! /usr/bin/env python
import csv
import re
import sys
def openTask(id, name, effort, depends, allocate, account, start, complete, note, priority):
print """task id%s "%s" {""" % ( id, name)
if effort:
print " effort %sd" % (effort)
if depends:
print " depends !id%s" % (depends)
if allocate:
print " allocate %s" % (allocate)
if account:
print " account %s" % (account)
if start:
print " start %s" % (start)
if complete:
print " complete %s" % (complete)
if note:
print " note \"%s\"" % (note)
if priority:
print " priority %s" % (priority)
def closeTask():
print "}"
reader = csv.reader(sys.stdin, delimiter='\t', quoting=csv.QUOTE_NONE)
id = 1
oldLevel = 0
predecessors = range(10)
p = re.compile("(\*+) (.*)\Z")
for row in reader:
task, effort, allocate, account, start, doDepends, complete, note, priority = row
m = p.match(task)
if m == None:
continue
level, taskName = m.groups()
level = len(level)
if level > oldLevel:
openTask(id, taskName, effort, None, allocate, account, start, complete, note, priority)
if not doDepends:
predecessors[level] = id
elif level == oldLevel:
closeTask()
openTask(id, taskName, effort,
(None if doDepends else predecessors[level]),
allocate, account, start, complete, note, priority)
if not doDepends:
predecessors[level] = id
else:
while oldLevel >= level:
closeTask()
oldLevel -= 1
openTask(id, taskName, effort,
(None if doDepends else predecessors[level]),
allocate, account, start, complete, note, priority)
if not doDepends:
predecessors[level] = id
oldLevel = level
id += 1
while level > 0:
closeTask()
level -= 1
[-- Attachment #5: Type: text/plain, Size: 204 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org and taskjuggler
2008-12-15 10:37 ` Christian Egli
@ 2008-12-16 3:52 ` Shelagh Manton
0 siblings, 0 replies; 3+ messages in thread
From: Shelagh Manton @ 2008-12-16 3:52 UTC (permalink / raw)
To: emacs-orgmode
On Mon, 15 Dec 2008 11:37:07 +0100, Christian Egli wrote:
> Shelagh Manton <shelagh.manton@gmail.com> writes:
>
>> One of the set tasks for the project scenario is to produce a Gantt
>> chart.
>>
>> Or perhaps someone knows another way to get a Gantt chart out of
>> org-mode data.
>
> I'm using a very hackish "works-for-me" python script that converts a
> tsv export from an org-mode file to a taskjuggler file. Probably has
> lots of implizit assumptions which not even I remember.
>
> The basic work-flow is to create your hierarchy of tasks, add some
> effort estimates and some other properties, export this to a csv and run
> the attached python script on it. This will generate a taskjuggler
> include file (tji) which can be used in a main taskjuggler file (tjp).
>
> You could use the following Makefile snippet to automate the process:
>
> projectPlan.csv: projectPlan.org
> $(EMACS) -batch \
> -eval "(progn (find-file \"$<\") (re-search-forward \"^|
Task\")
> (org-table-export \"$@\"))" -kill
>
> projectPlan.tji: projectPlan.csv
> $(CSV2TASKJUGGLER) < $< > $@
>
> projectPlan.taskreport.html: projectPlan.tjp projectPlan.tji
> $(TASKJUGGLER) $<
>
> Attached is the python script, an example org file and an example for a
> tjp file. Let me know if this works for you.
>
> I meant to write a tutorial about this but you know how it is. Maybe you
> could write one as you get this to work :-)
>
> Hope this helps
> Christian
Oh very interesting. I know it will take me a while but I will look at
this closely to understand what is happening.
Another think I'm slowly working through is to understand etask which
uses LaTeX and pstricks to make a Gantt chart.
Shelagh
[snip]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-16 3:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-16 20:36 org and taskjuggler Shelagh Manton
2008-12-15 10:37 ` Christian Egli
2008-12-16 3:52 ` Shelagh Manton
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).