Greenstone Manual Information

Contents

Requirements

To use this package to re-generate the Greenstone tutorial HTML, or generate a workshop, you need to have the following:

Contents of this package

README.html
This file
xml-source directory
Contains all the XML source files and images. Any changes to the Manuals should be made to the source files in this directory. The xml-source directory contains:
  • en, es, fr, ru subdirectories, which hold the source files for English, Spanish, French and Russian respectively. Each subdirectory contains 4 XML files and an images subdirectory. The 4 XML files correspond to the 4 Greenstone manuals: Develop's manual, Installer's manual, User's manual, and From Paper to Collection manual. The images directory contains all the images for every manual.
  • Note: The en folder for English is the primary one. Any changes should be made to this folder and let the translator take care of other languages.

  • manual.dtd: the DTD with the XML files
processing directory
Contains all the XSL files and CSS files for running XSL transform:
  • common.xsl Common XSL templates for use with all transforms.
  • xml-to-one-html.xsl XSL transform file to generate a single HTML page for each manual.
  • xml-to-many-html.xsl XSL transform file to generate individual HTML files for each manual, every chapter is a HTML file.
  • xml-to-index.xsl XSL Transform file to generate an index file for individual chapters of one manual.
  • xml-to-pdf.xsl XSL Transform file to generate a PDF file for every manual.
  • fo-common.xsl Common XSL templates for use with PDF transforms.
  • crossref-inter.xsl, crossref.xsl, crossref-pdf.xsl XSL files for getting the correct link address for links that refer to other chapters, sections, footnotes or other manuals. crossref-inter.xsl is used for generating multiple HTML files, crossref.xsl for generating a single HTML file, and crossref-pdf.xsl for generating PDF file.
generate-html.sh
Shell script that generates all the HTML files
generate-pdf.sh
Shell script that generates all the PDF files
clean-all.sh
Shell script that clean all the generated files

File structure

When generate HTML files and PDF files without using the shell scripts, you should:

  1. First create a build subdirectory here if there isn't one.
  2. For each language, create a subdirectory with the language code (eg. en, fr, es, ru) as the name of the directory, if there isn't one.
  3. cd to the appropriate direcotry, copy the images folder and the style.css file here
  4. Create a HTML and a PDF subdirectory for the generated HTML and PDF files.

If you use the shell scripts, they will create the subdirectories for you.

The file structure of the build directory is like this:

--manuals
  --build    
    --language-code
      --html
        (all the generated html files)
      --pdf
        (all the generated pdf files)
      --images
      style.css

Generating HTML files

  1. Run source setup.bash in the top level directory of your Greenstone installation
  2. Create a subdirectory named build, if there isn't one. cd to the build directory, create a subdirectory named with the language_code if there isn't one, for example, en for English language.
  3. cd to the language_code directory, create a html subdirectory
  4. copy the images folder and style.css file here

The generate-html.sh scripts are shell scripts that carry out a lot of these commands for you.

Generataing PDF files

  1. Run source setup.bash in the top level directory of the Greenstone installation
  2. Unzip the fop.zip file under shared directory
  3. Generate the PDF file:
    export CLASSPATH=$CLASSPATH:../shared/fop/build/fop.jar:../shared/fop/lib
    ./../shared/fop/fop.sh -xsl processing/xml-to-pdf.xsl -xml xml-source/language-code/manual-name_language-code.xml -pdf build/language-code/pdf/manual-name_language-code.pdf

The generate-pdf.sh scripts are shell scripts that carry out a lot of these commands for you.

The current status of the manuals

Developer's manual
Greesntone 2.50, translated in Mar. 2004
User's manual
Greenstone 2.70, translated in Mar. 2006
Installer's manual
Greenstone 2.50, translated in Mar. 2004
From Paper to Collection
Greenstone 2.50, translated in Mar. 2004

The XML Format

Develop_en.xml, User_en.xml, Install_en.xml and Paper_en.xml in the en directory are the main files. Make modifications in those. The translator takes care of the other languages.

All <Text> elements need a unique id, and all need to be on their own lines, with no other tags (apart from tags inside the text).

All <Chapter>, <Section>, <Subsection>, <Part>, <Table>, <Figure> elements need a unique id.

See the DTD file for more information.

Translate into other languages

To tranlate these manuals into other languages, use Greenstone Translator to do this, see here.

The "module-name" for the manuals are devmanual, installmanual, papermanual and usermanual.

Known problems and TODO list

  1. Automatic texts
    Texts like button names should be automatic generated, like in greenstone tutorials, but currently we didn't do this because the manuals are supposed to be rewritten soon, but this shall be done after the reversion.
  2. PDF fonts
    The XML to PDF transform require for a correct font set for a specific language.
  3. Images in PDF files
    Sometimes when images contain unusual fonts and characters, the conversion of the XML to PDF might broke down.
  4. Navigation buttons
    Add navigation buttons in the html pages.