- Installing Sphinx (mandatory)
- Submitting Your Work
- Check out the latest code
- Documentation Tasks
- reStructuredText and Using Sphinx
- Windows Help Files
In OpenLP we use reStructuredText to form all of the documentation using the Sphinx build tool to build the documentation. For information on reStructuredText go to the editing reStructuredText primer. For info on the Sphinx Python Documentation Generator visit their site.
mandatory)Installing Sphinx (
You will first need to install Python on your system. Download and install the Python Windows Installer from Python download page. You need to install Python 3.4.
The recommended way to install additional Python dependencies in Windows
pip. You can do this easily using
Once pip-Win is installed, select your Python executable (usually
C:\Python34\python.exe) and type the following into the *Command*
pip install Sphinx
Mac OS X
To install Sphinx on Mac OS X, you need to already have MacPorts or Homebrew installed. Once MacPorts or Homebrew are installed, you can install Sphinx.
$ sudo port install py34-sphinx
$ brew install sphinx-doc
To install Sphinx in Ubuntu, install it from the Ubuntu repositories:
$ sudo apt-get install python3-sphinx
To install Sphinx in Fedora, install it from the Fedora repositories:
# yum install python-sphinx
To install Sphinx in openSUSE, install it from the openSUSE repositories:
$ sudo zypper install python-sphinx
To install Sphinx in Arch Linux, install it from the Arch Linux repositories:
# pacman -S python2-sphinx
pip on Linux
If Sphinx is unavailable for your platform, you can install it via
pip. It is recommended to make a virtual environment and then install
Sphinx in there.
virtualenv from your package manager. Then create a
$ virtualenv --system-site-packages --python=python3 venv
pip for you, so now you can install Sphinx:
$ ./venv/bin/pip install Sphinx
Submitting Your Work
Submitting documentation for OpenLP follows the same workflow as for those submitting code to be used in OpenLP. Being a programmer is not required to write documentation for OpenLP but we will be using some of the same tools as they do to submit documentation.
For full details on how to get your work submitted and approved please see the section on Development Workflow.
Check out the latest code
OpenLP uses the Bazaar DVCS (read more about Bazaar) and the main branch is hosted at Launchpad.net. Do the following to set up your local branch:
- Identify yourself to Bazaar: $ bzr whoami "Raoul Snyman firstname.lastname@example.org"
- Log in to Launchpad: $ bzr launchpad-login raoul-snyman
- Create a shared repository: $ bzr init-repo ~/openlp-docs
- Checkout the latest code: $ bzr checkout lp:openlp/documentation ~/openlp-docs/trunk
When a new feature is added or a bug fixed which requires a change in the documentation, the developers will often assign the bug report to the documentation bug queue. This is a good place to look for documentation that needs to be written.
reStructuredText and Using Sphinx
For information on the formatting for reStructuredText please see the reStructuredText primer
For information on using and building documentation with Sphinx, please check out the Sphinx documentation.
Windows Help Files
If you are planning to make Windows help files (.CHM) or plan on preforming a Windows build you will need to install HTML Help Workshop.
To create the Windows help files, you need to run Sphinx with the htmlhelp option. Then run hhc_exe (the help compiler) pointing to the output folder created by the Sphinx command.
If you are using the OpenLP Windows builder script (windows-builder.py), these steps will be performed for you.