Code Monkey home page Code Monkey logo

gantt's Introduction

gantt - Gantt chart generator

This tool written in Haskell creates gantt charts from a simple text description, using LaTeX and pgfgantt.

Installation

Dependencies

This program has only been tested on Ubuntu Linux 14.04 and 16.04. It may work on other Unix-like systems; Windows is less likely do to the need to spawn external processes to run LaTeX and

External programs required:

  1. LaTeX, including the pgfgantt package.
  2. ImageMagick's convert tool, for generating PNG files for use in Word (which doesn't seem to deal with PDF very well).

Procedure

The best way to install is using the Haskell stack build tool. The following steps are specific to Ubuntu but should be adaptable to other Linux distributions.

  1. Install Haskell' stack build tool, and upgrade to the latest version

    sudo apt-get install haskell-stack stack upgrade

  2. Install alex and happy; for some reason stack doesn't install these even though they are required for certain libraries.

    sudo apt-get install happy alex

  3. Build gantt. From the root of the gantt workspace, run:

    stack build

  4. Install gantt

    stack install

    will install a command gantt-chart in ~/.local/bin. You can override this by adding local-bin-path: to stack.yaml:

    local-bin-path: path/to/your/bin

Note: stack.yaml is configured for x86_64 architectures; edit the arch: line to change.

Usage

Input file format

A Gantt chart is specified in a text file comprising two parts:

  1. Preamble - this part specifies the project start date, duration, and optionally the input time period size, the output time period size, and the date to be marked as "today" with a green vertical line.

Preamble lines start with a code, followed by ':' and space, then the value. The codes are

  • start: start date, in ISO YYYY-MM-DD format.
  • dur: length of the project, expressed and the number of input time periods.
  • size: the size of the input time period ("days," "weeks," "months," "quarters"). Default is "months"; "weeks" works ok, other sizes have glitches.
  • report: the size of the output time period, as above. Default is "months."
  • today: optional date to mark as the current day, with a vertical green line.
  1. Project components - this part specifies Work Packages, Tasks, Milestones, and Deliverables. Each is specified on a single line, as follows:
  • Work package (or Group)

    G "name" start end [slipped start] [slipped end]

  • Task

    T "name" start end [slipped start] [slipped end]

  • Milestone

    M "name" deadline [slipped deadline]

  • Deliverable

    D "name" deadline [slipped deadline]

Optional slipped start, end, and deadline can be specified to show updated project status; slipped dates later than the original are shown in red, while earlier dates show in green.

Example

The following example specifies a simple 12 month project starting January 1, 2015 and lasting twelve months. There are two work packages ('G'), five tasks ('T'), nine milestones ('M'), and one deliverable ('D').

start: 2015-01-01
dur: 12
today: 2016-08-03

G "WP1 0-6" 0 6
T "T1.1 0-3" 0 3
M "M1 1" 1
M "M2 2" 2
T "T1.2 3-6" 3 6
M "M3 5" 5
M "M4 6" 6
M "M4s 6 sl 8" 6 8
G "WP2 6-12" 6 12
T "T2.1 6-8" 6 8
M "M5 8" 8
T "T2.2 8-10" 8 10
M "M5 10" 10
T "T2.3 10-12" 10 12
M "M5 11" 11
M "M2 12" 12
D "D2 12" 12

Usage

Gantt charts are generated by running gantt-chart from the command line:

gantt-chart example.gantt

will print the LaTeX code to create the Gantt chart specified in example.gantt.

Several command line options can be used to modify the generated chart or override the values in the chart preamble:

   --start=YYYY-MM-DD            Override project start date
   --dur=INT                     Override project duration (periods)
   --winst=YYYY-MM-DD            Restrict output to a 'window' starting at specified date.
   --windur=INT                  Duration of restricted output 'window' (periods)
   --insize=PERIOD               Override input period size.
-m --monthly                     Output report in Monthly periods (default)
   --daily                       Output report in Daily periods
-w --weekly                      Output report in Weekly periods
-q --quarterly                   Output report in Quarterly periods
-y --yearly                      Output report in Yearly periods
   --font=ITEM                   Typeface for printed chart
   --standalone                  Generate standlone latex file, that can be compiled on it's own.  
   --today                       Show today's date as 'today'
-o --outfile=ITEM --opt-outfile  Output file.  Extension ('.latex,' '.pdf' or '.png') determines output format.
   --verbose                     Print diagnostics as well
   --template=ITEM               Template for standalone output
   --chartopts=ITEM              Options for \pgfganttchart
-? --help                        Display help message
-V --version                     Print version information
   --numeric-version             Print just the version number

gantt's People

Contributors

jnoll avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.