annotate docs/index.rst @ 33:7c39da93a0ce

docs: Add logo, do a few text changes.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 16 Jan 2017 21:49:48 -0800
parents 9ae14e9615e6
children 093bf35461ba
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1
33
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
2 .. image:: _static/jouvence.jpg
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
3
33
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
4 Jouvence is a Python package for parsing and rendering `Fountain`_ documents.
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
5
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
6 Jouvence supports:
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
7
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
8 * Most of the Fountain specification (see limitations below).
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
9 * Rendering to HTML and terminals.
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
10
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
11 .. _fountain: http://fountain.io/
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
12
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
13
33
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
14 Quickstart
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
15 ==========
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
16
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17 Installation
33
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
18 ------------
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20 As with many Python packages, it's recommended that you use `virtualenv`_,
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21 but since Jouvence doesn't have many dependencies, you should be fine.
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
22
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
23 You can install Jouvence the usual way::
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
24
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
25 pip install jouvence
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27 If you want to test that it works, you can feed it a Fountain screenplay and
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
28 see if it prints it nicely in your terminal::
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
29
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
30 jouvence <path-to-fountain-file>
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32 You should then see the Fountain file rendered with colored and indented
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
33 styles.
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
34
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
35 .. _virtualenv: https://virtualenv.pypa.io/en/stable/
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
36
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
37
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
38 Usage
33
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
39 -----
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
40
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41 The Jouvence API goes pretty much like this::
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
42
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43 from jouvence.parser import JouvenceParser
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
44 from jouvence.html import HtmlDocumentRenderer
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
45
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
46 parser = JouvenceParser()
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
47 document = parser.parse(path_to_file)
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
48 renderer = HtmlDocumentRenderer()
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
49 with open(path_to_output, 'w') as fp:
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
50 renderer.render_doc(document, fp)
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
51
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
52
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
53
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
54 Limitations
33
7c39da93a0ce docs: Add logo, do a few text changes.
Ludovic Chabant <ludovic@chabant.com>
parents: 31
diff changeset
55 -----------
31
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
56
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
57 Jouvence doesn't support the complete Fountain syntax yet. The following things
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
58 are not implemented:
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
59
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
60 * Dual dialogue
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
61 * Proper Unicode support (although Fountain's spec greatly assumes English screenplays, sadly).
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
62
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
63
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
64
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
65 Documentation
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
66 =============
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
67
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
68 .. toctree::
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
69 :maxdepth: 2
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
70
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
71 api
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
72
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
73
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
74 If you can't find what you're looking for, have a look here:
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
75
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
76 * :ref:`genindex`
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
77 * :ref:`modindex`
9ae14e9615e6 docs: Add Sphynx documentation and code docstrings.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
78 * :ref:`search`