Metadata-Version: 2.0
Name: RinohType
Version: 0.1.1
Summary: The Python document processor
Home-page: https://github.com/brechtm/rinohtype
Author: Brecht Machiels
Author-email: brecht@mos6581.org
License: UNKNOWN
Keywords: rst xml pdf opentype
Platform: UNKNOWN
Classifier: Environment :: Console
Classifier: Environment :: Other Environment
Classifier: Environment :: Web Environment
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Printing
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Fonts
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Text Processing :: Markup :: XML
Provides: rinoh
Provides: rinohlib
Requires-Dist: docutils
Provides-Extra: bitmap
Requires-Dist: Pillow; extra == 'bitmap'

RinohType
=========

RinohType is a document processor in the style of LaTeX_. This is a preview
release unsuited for production use, but you can use it to explore RinohType's
features and bugs. I'd highly appreciate if you could `create a ticket`_ for any
bugs you encounter.

Currently, RinohType only supports reStructuredText_ input. It ships with the
``rinoh`` command line tool to render basic reStructuredText documents and
a preliminary Sphinx_ builder to render more complex documents. The included
document templates and style sheets are fairly basic but these will be improved
upon in the future.

Please be warned that some PDF readers have trouble displaying the PDFs
generated by RinohType (`issue 2`_). I believe this is due to a bug in these PDF
readers. The following PDF viewers are affected:

- Firefox's built-in PDF viewer (pdf.js)
- Evince and other poppler_-based applications (e.g. Zathura)

.. _LaTeX: http://en.wikipedia.org/wiki/LaTeX
.. _create a ticket: https://github.com/brechtm/rinohtype/issues
.. _reStructuredText: http://docutils.sourceforge.net/rst.html
.. _Sphinx: http://sphinx-doc.org
.. _issue 2: https://github.com/brechtm/rinohtype/issues/2
.. _poppler: http://poppler.freedesktop.org


Requirements
------------

RinohType currently only runs on Python 3.2 and up. It might be back-ported to
Python 2.7 at some point in the future, but this is not certain.

For parsing reStructuredText documents RinohType depends on docutils_. pip_
takes care of this requirement when you install RinohType.

If you want to include bitmap images in document, RinohType requires Pillow_.
Without Pillow, only PDF images are supported.

.. _docutils: http://docutils.sourceforge.net/index.html
.. _pip: https://pip.pypa.io
.. _Pillow: http://python-pillow.github.io


Getting Started
---------------

Command-line reStructuredText renderer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The easiest way to get started with RinohType is to render a reStructuredText
document (such as `demo.txt`_) using the ``rinoh`` command line tool::

   rinoh demo.txt

When the script finishes, you will find ``demo.pdf`` alongside the input file.

``rinoh`` renders the input document using the article template. You can specify
the paper size using the ``--paper`` command line argument.

.. _demo.txt: http://docutils.sourceforge.net/docs/user/rst/demo.txt


Sphinx Builder
~~~~~~~~~~~~~~

To use RinohType to render Sphinx documents, you need to adjust the Sphinx
project's ``conf.py``:

1. add ``rinoh.frontend.sphinx`` to the ``extensions`` list, and
2. set the ``rinoh_documents`` configuration option::

    rinoh_documents = [('index', 'target', 'Document Title, 'Author')]
                       # source start file, target name (without PDF extension),
                       # title, author).


License
-------

All of RinohType's source code is licensed under the `Affero GPL`_, unless
indicated otherwise in the source file (such as ``hyphenator.py``).

My intention is to make RinohType free for non-commercial use and offer a
separate license for commercial use. The AGPL will likely be replaced soon with
another license to better reflect this intention.

Brecht Machiels


.. _Affero GPL: https://www.gnu.org/licenses/agpl-3.0.html


