|
1 | 1 | Supported Input Formats |
2 | 2 | ======================= |
3 | 3 |
|
4 | | -Currently, the following input formats are supported: |
| 4 | +Currently, ``doc2dash`` supports two documentation formats: |
5 | 5 |
|
6 | | -- Sphinx_’s HTML output (nearly every single Python project out there) |
7 | | -- pydoctor_’s HTML output (Twisted_!) |
| 6 | +- :ref:`Sphinx-sec` |
| 7 | +- :ref:`pydoctor-sec` |
8 | 8 |
|
9 | 9 | Feel free to help adding more! While ``doc2dash`` is implemented in Python, the scope for the supported documentation types is unlimited. |
10 | 10 | So go on and submit a parser for your favourite Ruby, Haskell, Lisp, Erlang, JavaScript, … format! |
11 | 11 |
|
12 | 12 |
|
| 13 | +.. _Sphinx-sec: |
| 14 | + |
| 15 | +Sphinx |
| 16 | +------ |
| 17 | + |
| 18 | +Sphinx_ is a very common documentation format in the Python world and beyond. |
| 19 | + |
| 20 | +``doc2dash`` offers two approaches to parsing it. |
| 21 | +The preferable one is used whenever a machine-readable intersphinx_ index file is present and it results in very precise and reliable parsing. |
| 22 | + |
| 23 | +If none is found, ``doc2dash`` attempts to parse the HTML API index file (``genindex.html`` or ``genindex-all.html``). |
| 24 | +Simply point ``doc2dash`` at Sphinx's HTML output (usually ``_build/html`` if you built it yourself) and it will do the right thing. |
| 25 | + |
| 26 | + |
| 27 | +.. _pydoctor-sec: |
| 28 | + |
| 29 | +pydoctor |
| 30 | +-------- |
| 31 | + |
| 32 | +Contrary to Sphinx, pydoctor_ is not a complete documentation format. |
| 33 | +Instead, it's focused on creating API documentation from Python docstrings. |
| 34 | +The most popular project employing is Twisted_ and its ecosystem. |
| 35 | + |
| 36 | +Since pydoctor alas does not emit a machine-readable file, the ``nameIndex.html`` is always parsed. |
| 37 | +Fortunately, no theming is common in the pydoctor world, so the parsing is reliable nonetheless. |
| 38 | + |
| 39 | + |
13 | 40 | .. _Twisted: https://twistedmatrix.com/ |
14 | 41 | .. _pydoctor: https://launchpad.net/pydoctor |
15 | 42 | .. _Sphinx: http://sphinx-doc.org/ |
| 43 | +.. _intersphinx: http://sphinx-doc.org/latest/ext/intersphinx.html |
0 commit comments