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