Download Latest
timeline 0.02
Ruby
You must have this software installed before you can use timeline
SourceForge.net Logo

Homepage | Example | Documentation | Project SF Page | Download | Em português

This page aims to explain how to write a source file for timeline. Be sure to take a look at the Example link above, it'll make your life easier.

All the commands can be written in uppercase or lowercase. The end of line marks the end of the command. If a string (the name of an event, for example) uses more than one word, then it must be between quotation marks.

Header

Here will be the data that'll refer to the whole timeline.

year_gap y

The number of the year will appear each y years. For example, if you choose year_gap 15, then the years shown will be 1900, 1915, 1930, 1945, etc... The default value for this property is 10.

year_pixels p

Each year on the table will be p pixels high. So, if you use year_gap 50 and year_pixels 2, each row in the table will be 100 pixels high. The default value for this property is 1.

year_name name

Defines the word that'll be on the top left cell on the timeline. It is used if you want to use a different language. year name "Ano" will put the word "Ano" on the top left cell. The default value is "Year".

start year
end year

The start and end define the first and the last year of the timeline, respectively. If the properties are set start -400 and end 1800 the timeline will show from 400 B.C. to 1800 D.C. The default values for start and end are 1900 and 2000, respectively.

description timeline_description

Description of the timeline. It'll be the title of the timeline. Example:
description "The Great Empires of the World"

Grouping

You must create groups if you want to put your events in separeted columns. Each group will have its own color. You must create at least one group. The events lines must follow the group line.

group group_name

This creates a new group. The group_name is the word that'll be on the title of the column. If you'd want to create a group called "Greece", you'd issue the command:
group "Greece"

color Red Green Blue

This sets the group color. The Red, Green and Blue will blend into one color, the background for this column. The higher the number, the higher the amount of this color. The minimum is 0 and the maximum is 100. To set a light blue backgroud (100% blue, 70% red and 70% green), you'd write:
color 70 70 100

Events

The events are the heart of the timeline. The events that follow a group declaration will belong to that group.

event event_name start_year end_year

Creates a new event. event_name is - obviously - the name of the event. start_year and end_year will be the starting and the ending year of this event, respectively. It's very important that two events don't overlap each other in the same group! Example of a event:
event "World War II" 1939 1945

image filename [width height]

Puts an image before the name of the event. You can also set the width and the height of the image. To add a image called "war.png", with 30x40, you could write one of these:
image "war.png"
image "war.png" 30 40

description "text"

Adds a description to the name of the event. The description will be visible if the mouse is putted over the name of the event. Example:
description "The Cold War divided the world between USA and URSS."

color Red Green Blue

This sets the event color. The Red, Green and Blue will blend into one color, the background for this column. The higher the number, the higher the amount of this color. The minimum is 0 and the maximum is 100. To set a light blue backgroud (100% blue, 70% red and 70% green), you'd write:
color 70 70 100

Comments

You can put comments that won't appear in the final timeline by putting a # or a ; before them. Example:
event "Farropilha Revolution" 1835 1845 # this is a comment