Home | Docs | Issue Tracker | FAQ | Download | |
Author: | Howard Butler |
---|---|
Contact: | hobu.inc at gmail.com |
Author: | Jeff McKenna |
Contact: | jmckenna at gatewaygeomatics.com |
Last Updated: | 2013-01-02 |
Table of Contents
The current structure of the MapServer documentation process is for developers to maintain their documents in reStructuredText format, and submit their changes through GitHub pull requests; you will first need to create a free personal account at GitHub. The Sphinx documentation generator is used to convert the reStructuredText files to html, and the live website is then automatically updated once every 2 hours, on the hour.
Documentation files are stored in the /docs sub-project on GitHub at: https://github.com/mapserver/docs
Always submit pull requests on the latest branch (such as branch-6-2), not on master
See GitHub’s help guidelines to install Git locally
Useful git commands:
clone branch locally:
git clone -b branch-6-2 git@github.com:mapserver/docs.git mapserver-docs-git-branch-6-2
update local files:
git pull
add file to repository (need to commit after this):
git add <file>
commit file to repository:
git commit -m "my message" <files>
MapServer instead of mapserver, map server, Map Server, mapServer or map Server.
MapScript instead of mapscript, Mapscript, or map script.
PostGIS instead of postgis.
HowTo instead of howto or HOWTO.
Email addresses should be manually spam protected:
hobu.inc at gmail.com instead of hobu.inc@gmail.com
All text should be hard breaks at or around the 80 column mark, just as the source code.
No .. sectnum:: in the contents directives
All external links should live at the bottom of your document, under the heading:
.. #### rST Link Section ####
Always include the :Revision: and :Date: lines (as-is) at the top of your document, such as:
:Revision: $Revision$
:Date: $Date$
Note
As of 2010-06-01 the MapServer site requires Sphinx 1.0. You can browse the versions of the Sphinx packages here, and then install the exact version such as:
easy_install Sphinx==1.0.7
On Windows:
install Python 2.X
download setuptools
make sure that the ‘C:/Python2X/Scripts’ directory is your path
execute the following at commandline:
easy_install Sphinx
...you should see message: “Finished processing dependencies for Sphinx”
Note
Make sure you install Sphinx 1.0 or more recent. See note above.
inside the /docs directory, execute:
make html
or
make latex
the HTML output will be written to the _build/html sub-directory.
On Linux:
make sure you have the Python dev and setuptools packages installed. On Ubuntu:
sudo apt-get install python-dev
sudo apt-get install python-setuptools
install sphinx using easy_install:
sudo easy_install Sphinx
Note
Make sure you install Sphinx 1.0 or more recent. See note above.
to process the docs, from the MapServer /docs directory, run:
make html
or
make latex
the HTML output will be written to the build/html sub-directory.
Note
If there are more than one translation, the above commands will automatically build all translations.
On OS X:
install sphinx using easy_install:
sudo easy_install Sphinx
Note
Make sure you install Sphinx 1.0 or more recent. See note above.
# install MacTex from http://www.tug.org/mactex/2009/ if you want to build pdfs
to process the docs, from the MapServer /docs directory, run:
make html
or
make latex
the HTML output will be written to the build/html sub-directory.
Note
If there are more than one translation, the above commands will automatically build all translations.
Note
To start a new translation, copy the directories images and include from docs/en to docs/<lang>, where <lang> is one of the country codes. You also should copy the docs/en/documentation.txt and docs/en/index.txt files into your <lang> directory (the build process requires these files...you are free to edit them as you wish for your own language).
Note
One way to monitor changes is to subscribe the RSS feed through Github: in the docs repository, click on the “Commits” tab and look for a subscription link for these commit changes, for example: see “Commit History” at https://github.com/mapserver/docs/commits/branch-6-2
You have to define which languages are available by setting TRANSLATIONS in the Makefile or make.bat:
TRANSLATIONS = en de
The build script will then process the subdirectories en and de. If they are not accessible, an error message will be returned.
You can regenerate the reference labels by issuing:
make labels
from the docs directory like when you are building the html or latex versions