The Flamenco Project

Flamenco Documentation

Example Instance

An example collection is provided in the example directory of the Flamenco distribution. This collection contains information about the winners of the Nobel Prizes from 1901 to 2004, derived from webpages at See the example screenshots

You can examine the TSV files in the example directory to see how the data needs to be formatted. As can be seen in the items.tsv file, each item is a winner of the Nobel Prize. As can be seen in the facets.tsv file, the facets consist of: gender, home country, affiliation, year awarded, and type of prize. As can be seen in the attrs.tsv file, the attributes consist of usual name (e.g.,Max Planck"), long name (e.g., Max Karl Ernst Ludwig Planck"), year of birth, year of death, url to photo, url to biography, and url to lecture. (Note that the last three attributes link to urls at the website.)

The two files facets.tsv and attrs.tsv were written by hand. The file nobel.txt was produced by the script getnobel, which gathers information from webpages at The file nobel.txt was then edited by hand to make the affiliation names more consistent. The script makefacets processed nobel.txt to produce all the other *.tsv files in this directory. Running target/bin/flamenco import on this directory will use the *.tsv files to create a new Flamenco instance for the Nobel Prize dataset. Note that the file text.tsv, if present in the data directory when the instance is created, will cause a keyword index to be created automatically. If text.tsv is not present in the data directory, the target/bin/flamenco index command must be run (after the target/bin/flamenco import command) in order to create the keyword index. Note that the automatic text index is done using the MySQL indexing whereas the index command invokes the java-based Lucene indexing facility.

If you already have one or more flamenco instances installed, the nobel instance should be ready immediately after running target/bin/flamenco import example.

If this is the first instance you have built, you first must be sure you've installed the flamenco code (see installation section). After you have installed the code, you need to be sure to copy target/bin/flamenco.cgi to the directory from which your Web server can run CGI scripts.

If everything is working correctly, clicking this link should activate the instance. To see how the results should appear, see the example screenshots

Note that this example has a customized file in the data directory. The import script automatically copies the file from the data diretory into the instance directory if one exists; if not, a default file is placed in the instance directory.

Customizations for the nobel instance have been made to control which attribute is shown to represent the item in the middlegame, by modifying the itemdisplay() method (in this case, a link to the 'photo' attribute using a python html generation command to show images ('img') as well as code to show the standard name and the birthyear and deathyear of each laureate). There is also code to control the view of the item in the endgame, by modifying the itemlisting() method. This code also hides all attributes that contain links to the external nobel website, in the __init__() method.

Continue to the next section: File Layout and Permissions.