Requirements¶
Python version 3.5 or newer.
If it is missing on your machine, you can get it from http://www.python.org/download/
This release will not work with Python2.
Download¶
PyLit¶
- pylit.py
- There are no file releases yet. You get the most up to date version from the GitHub repository.
- pylit
- A simple starter and configuration wrapper (see installation).
- pylit_test.py
- unit tests for the pylit module
Tools¶
- Docutils or Sphinx for conversion of reStructuredText to HTML or PDF (not strictly required by PyLit but needed for “pretty printing” the text source)
- Editor Support for reStructuredText
- pylit functions for the JED editor
Installation¶
As PyLit is a pure Python module, installation is straightforward:
Put pylit.py in Python’s Module Search Path.
You can now call the script with
python3 -m pylit OPTIONS INFILE [OUTFILE]
or
python3 -m pylit --help
Easier invocation is possible with a small executable wrapper in the PATH. On Unix you can use a script like pylit:
#!/usr/bin/env python3 # Load the pylit module:: import pylit # Configure default settings, e.g. :: ## pylit.defaults.code_block_marker['c++'] = '.. code-block:: c++' # call the text <--> code converter:: pylit.main()
This has two advantages:
- Command line use is simplified.
- Default settings can be customised without changing the module file.