| 1 |
Metadata-Version: 2.4 |
| 2 |
Name: docutils |
| 3 |
Version: 0.22.4 |
| 4 |
Summary: Docutils -- Python Documentation Utilities |
| 5 |
Author-email: David Goodger <[email protected]> |
| 6 |
Maintainer-email: docutils-develop list <[email protected]> |
| 7 |
Requires-Python: >=3.9 |
| 8 |
Description-Content-Type: text/x-rst |
| 9 |
Classifier: Development Status :: 4 - Beta |
| 10 |
Classifier: Environment :: Console |
| 11 |
Classifier: Intended Audience :: Developers |
| 12 |
Classifier: Intended Audience :: End Users/Desktop |
| 13 |
Classifier: Intended Audience :: Information Technology |
| 14 |
Classifier: Intended Audience :: Other Audience |
| 15 |
Classifier: Intended Audience :: System Administrators |
| 16 |
Classifier: License :: Public Domain |
| 17 |
Classifier: License :: OSI Approved :: BSD License |
| 18 |
Classifier: License :: OSI Approved :: GNU General Public License (GPL) |
| 19 |
Classifier: Operating System :: OS Independent |
| 20 |
Classifier: Programming Language :: Python |
| 21 |
Classifier: Programming Language :: Python :: 3 |
| 22 |
Classifier: Programming Language :: Python :: 3 :: Only |
| 23 |
Classifier: Programming Language :: Python :: 3.9 |
| 24 |
Classifier: Programming Language :: Python :: 3.10 |
| 25 |
Classifier: Programming Language :: Python :: 3.11 |
| 26 |
Classifier: Programming Language :: Python :: 3.12 |
| 27 |
Classifier: Programming Language :: Python :: 3.13 |
| 28 |
Classifier: Programming Language :: Python :: 3.14 |
| 29 |
Classifier: Topic :: Documentation |
| 30 |
Classifier: Topic :: Software Development |
| 31 |
Classifier: Topic :: Software Development :: Documentation |
| 32 |
Classifier: Topic :: Text Editors :: Documentation |
| 33 |
Classifier: Topic :: Text Processing |
| 34 |
Classifier: Topic :: Text Processing :: General |
| 35 |
Classifier: Topic :: Text Processing :: Markup |
| 36 |
Classifier: Topic :: Text Processing :: Markup :: HTML |
| 37 |
Classifier: Topic :: Text Processing :: Markup :: LaTeX |
| 38 |
Classifier: Topic :: Text Processing :: Markup :: Markdown |
| 39 |
Classifier: Topic :: Text Processing :: Markup :: reStructuredText |
| 40 |
Classifier: Topic :: Text Processing :: Markup :: XML |
| 41 |
Classifier: Topic :: Utilities |
| 42 |
Classifier: Natural Language :: English |
| 43 |
Classifier: Natural Language :: Afrikaans |
| 44 |
Classifier: Natural Language :: Arabic |
| 45 |
Classifier: Natural Language :: Catalan |
| 46 |
Classifier: Natural Language :: Catalan (Valencian) |
| 47 |
Classifier: Natural Language :: Chinese (Simplified) |
| 48 |
Classifier: Natural Language :: Chinese (Traditional) |
| 49 |
Classifier: Natural Language :: Czech |
| 50 |
Classifier: Natural Language :: Danish |
| 51 |
Classifier: Natural Language :: Dutch |
| 52 |
Classifier: Natural Language :: Esperanto |
| 53 |
Classifier: Natural Language :: Finnish |
| 54 |
Classifier: Natural Language :: French |
| 55 |
Classifier: Natural Language :: Galician |
| 56 |
Classifier: Natural Language :: Georgian |
| 57 |
Classifier: Natural Language :: German |
| 58 |
Classifier: Natural Language :: Hebrew |
| 59 |
Classifier: Natural Language :: Italian |
| 60 |
Classifier: Natural Language :: Japanese |
| 61 |
Classifier: Natural Language :: Korean |
| 62 |
Classifier: Natural Language :: Latvian |
| 63 |
Classifier: Natural Language :: Lithuanian |
| 64 |
Classifier: Natural Language :: Persian |
| 65 |
Classifier: Natural Language :: Polish |
| 66 |
Classifier: Natural Language :: Portuguese (Brazilian) |
| 67 |
Classifier: Natural Language :: Russian |
| 68 |
Classifier: Natural Language :: Slovak |
| 69 |
Classifier: Natural Language :: Spanish |
| 70 |
Classifier: Natural Language :: Swedish |
| 71 |
Classifier: Natural Language :: Ukrainian |
| 72 |
License-File: COPYING.rst |
| 73 |
License-File: licenses/BSD-0-Clause.rst |
| 74 |
License-File: licenses/BSD-2-Clause.rst |
| 75 |
License-File: licenses/gpl-3-0.txt |
| 76 |
Project-URL: Changelog, https://docutils.sourceforge.io/HISTORY.html |
| 77 |
Project-URL: Code, https://sourceforge.net/p/docutils/code/ |
| 78 |
Project-URL: Documentation, https://docutils.sourceforge.io/docs/ |
| 79 |
Project-URL: Download, https://pypi.org/project/docutils/ |
| 80 |
Project-URL: Homepage, https://docutils.sourceforge.io |
| 81 |
Project-URL: Issue tracker, https://sourceforge.net/p/docutils/bugs/ |
| 82 |
|
| 83 |
========================= |
| 84 |
README: Docutils 0.22.4 |
| 85 |
========================= |
| 86 |
|
| 87 |
:Author: David Goodger |
| 88 |
:Contact: [email protected] |
| 89 |
:Date: $Date: 2025-12-18 19:44:54 +0100 (Do, 18. Dez 2025) $ |
| 90 |
:Web site: https://docutils.sourceforge.io/ |
| 91 |
:Copyright: This document has been placed in the public domain. |
| 92 |
|
| 93 |
:Abstract: Docutils is a modular system for processing documentation into |
| 94 |
useful formats, such as HTML, XML, and LaTeX. |
| 95 |
For input Docutils supports reStructuredText, an easy-to-read, |
| 96 |
what-you-see-is-what-you-get plaintext markup syntax. |
| 97 |
|
| 98 |
.. contents:: |
| 99 |
|
| 100 |
|
| 101 |
Quick-Start |
| 102 |
=========== |
| 103 |
|
| 104 |
This is for those who want to get up & running quickly. |
| 105 |
|
| 106 |
1. Docutils requires **Python**, available from |
| 107 |
https://www.python.org/. |
| 108 |
See Dependencies_ below for details. |
| 109 |
|
| 110 |
2. Install the latest stable release from PyPi with pip_:: |
| 111 |
|
| 112 |
pip install docutils |
| 113 |
|
| 114 |
For alternatives and details, see section `Installation`_ below. |
| 115 |
|
| 116 |
3. Use the `front-end scripts`_ to convert reStructuredText documents. |
| 117 |
Try for example:: |
| 118 |
|
| 119 |
docutils FAQ.rst FAQ.html |
| 120 |
|
| 121 |
See Usage_ below for details. |
| 122 |
|
| 123 |
|
| 124 |
Purpose |
| 125 |
======= |
| 126 |
|
| 127 |
The purpose of the Docutils project is to provide a set of tools for |
| 128 |
processing plaintext documentation into useful formats, such as HTML, |
| 129 |
LaTeX, troff (man pages), OpenOffice, and native XML. Support for the |
| 130 |
following sources has been implemented: |
| 131 |
|
| 132 |
* Standalone files. |
| 133 |
|
| 134 |
* `PEPs (Python Enhancement Proposals)`_. |
| 135 |
|
| 136 |
Support for the following sources is planned or provided by |
| 137 |
`third party tools`_: |
| 138 |
|
| 139 |
* Inline documentation from Python modules and packages, extracted |
| 140 |
with namespace context. |
| 141 |
|
| 142 |
* Email (RFC-822 headers, quoted excerpts, signatures, MIME parts). |
| 143 |
|
| 144 |
* Wikis, with global reference lookups of "wiki links". |
| 145 |
|
| 146 |
* Compound documents, such as multiple chapter files merged into a |
| 147 |
book. |
| 148 |
|
| 149 |
* And others as discovered. |
| 150 |
|
| 151 |
.. _PEPs (Python Enhancement Proposals): |
| 152 |
https://peps.python.org/pep-0012 |
| 153 |
.. _third party tools: docs/user/links.html#related-applications |
| 154 |
|
| 155 |
|
| 156 |
Dependencies |
| 157 |
============ |
| 158 |
|
| 159 |
To run the code, Python_ must be installed. |
| 160 |
(Python is pre-installed with most Linux distributions.) |
| 161 |
|
| 162 |
* Since version 0.21, Docutils requires Python 3.9 or later. |
| 163 |
* Docutils versions 0.19 to 0.20.1 require Python 3.7 or later. |
| 164 |
* Docutils versions 0.16 to 0.18 require Python 2.7 or 3.5+. |
| 165 |
|
| 166 |
The **type hints** added in version 0.22 use Python 3.10 syntax. |
| 167 |
However, the Python interpreter treats them as annotations |
| 168 |
unless ``typing.TYPE_CHECKING`` is set to ``True``. |
| 169 |
|
| 170 |
.. _Python: https://www.python.org/. |
| 171 |
|
| 172 |
|
| 173 |
Recommendations |
| 174 |
--------------- |
| 175 |
|
| 176 |
Docutils uses the following packages for enhanced functionality, if they |
| 177 |
are installed: |
| 178 |
|
| 179 |
* The recommended installer is pip_, setuptools_ works, too. |
| 180 |
|
| 181 |
* The `Python Imaging Library`_ (PIL) is used for some image |
| 182 |
manipulation operations. |
| 183 |
|
| 184 |
* The `Pygments`_ package provides syntax highlight of "code" directives |
| 185 |
and roles. |
| 186 |
|
| 187 |
* The `myst`_, `pycmark`_, or `recommonmark`_ parsers can be used to |
| 188 |
parse input in "Markdown" (CommonMark_) format. |
| 189 |
|
| 190 |
The `Docutils Link List <docs/user/links.html>`__ records projects that |
| 191 |
users of Docutils and reStructuredText may find useful. |
| 192 |
|
| 193 |
.. _pip: https://pypi.org/project/pip/ |
| 194 |
.. _setuptools: https://pypi.org/project/setuptools/ |
| 195 |
.. _Python Imaging Library: http://www.pythonware.com/products/pil/ |
| 196 |
.. _Pygments: https://pypi.org/project/Pygments/ |
| 197 |
.. _myst: https://pypi.org/project/myst-docutils/ |
| 198 |
.. _pycmark: https://pypi.org/project/pycmark/ |
| 199 |
.. _recommonmark: https://github.com/rtfd/recommonmark |
| 200 |
.. _CommonMark: https://spec.commonmark.org/0.30/ |
| 201 |
|
| 202 |
|
| 203 |
Installation |
| 204 |
============ |
| 205 |
|
| 206 |
The `Python Packaging User Guide`_ gives details how to |
| 207 |
`use pip for installing`_. |
| 208 |
|
| 209 |
* The simplest way is to install the latest *stable release* from PyPi:: |
| 210 |
|
| 211 |
pip install docutils |
| 212 |
|
| 213 |
* To install a *pre-relase*, append the option ``--pre``. |
| 214 |
|
| 215 |
* To install a `development version`_ *from source*: |
| 216 |
|
| 217 |
1. Open a shell |
| 218 |
|
| 219 |
2. Go to the directory containing the ``pyproject.toml`` file. |
| 220 |
|
| 221 |
3. Install the package with **one** of the following commands:: |
| 222 |
|
| 223 |
pip install -e . # editable install |
| 224 |
pip install . # regular install |
| 225 |
|
| 226 |
or do a `"manual" install`_. |
| 227 |
|
| 228 |
4. Optional steps: |
| 229 |
|
| 230 |
* `Running the test suite`_ |
| 231 |
* `Converting the documentation`_ |
| 232 |
|
| 233 |
See also the OS-specific installation instructions below and |
| 234 |
the `Docutils version repository`_ documentation. |
| 235 |
|
| 236 |
* To install for a *specific Python version*, use this version in the |
| 237 |
setup call, e.g. :: |
| 238 |
|
| 239 |
python3.11 -m pip install docutils |
| 240 |
|
| 241 |
If the python executable isn't on your path, you'll have to specify the |
| 242 |
complete path, such as ``/usr/local/bin/python3.11``. |
| 243 |
|
| 244 |
To install for different Python versions, repeat step 3 for every |
| 245 |
required version. The last installed version will be used for the |
| 246 |
``docutils`` command line application. |
| 247 |
|
| 248 |
.. _Python Packaging User Guide: https://packaging.python.org/en/latest/ |
| 249 |
.. _use pip for installing: |
| 250 |
https://packaging.python.org/en/latest/tutorials/installing-packages/ |
| 251 |
#use-pip-for-installing |
| 252 |
.. _"editable" install: |
| 253 |
https://pip.pypa.io/en/stable/topics/local-project-installs/ |
| 254 |
#editable-installs |
| 255 |
.. _"manual" install: docs/dev/repository.html#manual-install |
| 256 |
|
| 257 |
|
| 258 |
GNU/Linux, BSDs, Unix, Mac OS X, etc. |
| 259 |
------------------------------------- |
| 260 |
|
| 261 |
* Use ``su`` or ``sudo`` for a system-wide |
| 262 |
installation as ``root``, e.g.:: |
| 263 |
|
| 264 |
sudo pip install docutils |
| 265 |
|
| 266 |
|
| 267 |
Windows |
| 268 |
------- |
| 269 |
|
| 270 |
* The Python FAQ explains `how to run a Python program under Windows`__. |
| 271 |
|
| 272 |
__ https://docs.python.org/3/faq/windows.html |
| 273 |
#how-do-i-run-a-python-program-under-windows |
| 274 |
|
| 275 |
* Usually, pip_ is automatically installed if you are using Python |
| 276 |
downloaded from https://python.org. If not, see the |
| 277 |
`pip documentation <https://pip.pypa.io/en/stable/installation/>`__. |
| 278 |
|
| 279 |
* The command window should recognise the word ``py`` as an instruction to |
| 280 |
start the interpreter, e.g. |
| 281 |
|
| 282 |
py -m pip install docutils |
| 283 |
|
| 284 |
If this does not work, you may have to specify the full path to the |
| 285 |
Python executable. |
| 286 |
|
| 287 |
|
| 288 |
Usage |
| 289 |
===== |
| 290 |
|
| 291 |
Start the "docutils" command line application with:: |
| 292 |
|
| 293 |
docutils [options] [<source> [<destination>]] |
| 294 |
|
| 295 |
The default action is to convert a reStructuredText_ document to HTML5, |
| 296 |
for example:: |
| 297 |
|
| 298 |
docutils test.rst test.html |
| 299 |
|
| 300 |
Read the ``--help`` option output for details on options and arguments and |
| 301 |
`Docutils Front-End Tools`_ for the full documentation of the various tools. |
| 302 |
|
| 303 |
For programmatic use of the `docutils` Python package, read the |
| 304 |
`API Reference Material`_ and the source code. |
| 305 |
Remaining questions may be answered in the `Docutils Project |
| 306 |
Documentation`_ or the Docutils-users_ mailing list. |
| 307 |
|
| 308 |
Contributions are welcome! |
| 309 |
|
| 310 |
.. _reStructuredText: https://docutils.sourceforge.io/rst.html |
| 311 |
.. _front-end scripts: |
| 312 |
.. _Docutils Front-End Tools: docs/user/tools.html |
| 313 |
.. _API Reference Material: /docs/index.html |
| 314 |
#api-reference-material-for-client-developers |
| 315 |
.. _Docutils Project Documentation: /docs/index.html |
| 316 |
|
| 317 |
|
| 318 |
Project Files & Directories |
| 319 |
=========================== |
| 320 |
|
| 321 |
* README.rst: You're reading it. |
| 322 |
|
| 323 |
* COPYING.rst: Public Domain Dedication and copyright details for |
| 324 |
non-public-domain files (most are PD). |
| 325 |
|
| 326 |
* FAQ.rst: Frequently Asked Questions (with answers!). |
| 327 |
|
| 328 |
* RELEASE-NOTES.rst: Summary of the major changes in recent releases. |
| 329 |
|
| 330 |
* HISTORY.rst: A detailed change log, for the current and all previous |
| 331 |
project releases. |
| 332 |
|
| 333 |
* BUGS.rst: Known bugs, and how to report a bug. |
| 334 |
|
| 335 |
* THANKS.rst: List of contributors. |
| 336 |
|
| 337 |
* pyproject.toml: Project metadata. |
| 338 |
See "Installation" above. |
| 339 |
|
| 340 |
* docutils: The project source directory, installed as a Python |
| 341 |
package. |
| 342 |
|
| 343 |
* docs: The project documentation directory. Read ``docs/index.rst`` |
| 344 |
for an overview. |
| 345 |
|
| 346 |
* docs/user: The project user documentation directory. Contains the |
| 347 |
following documents, among others: |
| 348 |
|
| 349 |
- docs/user/tools.rst: Docutils Front-End Tools |
| 350 |
- docs/user/latex.rst: Docutils LaTeX Writer |
| 351 |
- docs/user/rst/quickstart.rst: A ReStructuredText Primer |
| 352 |
- docs/user/rst/quickref.html: Quick reStructuredText (HTML only) |
| 353 |
|
| 354 |
* docs/ref: The project reference directory. |
| 355 |
``docs/ref/rst/restructuredtext.rst`` is the reStructuredText |
| 356 |
reference. |
| 357 |
|
| 358 |
* licenses: Directory containing copies of license files for |
| 359 |
non-public-domain files. |
| 360 |
|
| 361 |
* tools: Directory for Docutils front-end tools. See |
| 362 |
``docs/user/tools.rst`` for documentation. |
| 363 |
|
| 364 |
* test: Unit tests. Not required to use the software, but very useful |
| 365 |
if you're planning to modify it. See `Running the Test Suite`_ |
| 366 |
below. |
| 367 |
|
| 368 |
|
| 369 |
Development version |
| 370 |
=================== |
| 371 |
|
| 372 |
While we are trying to follow a "release early & often" policy, |
| 373 |
features are added frequently. |
| 374 |
We recommend using a current snapshot or a working copy of the repository. |
| 375 |
|
| 376 |
Repository check-out: |
| 377 |
To keep up to date on the latest developments, |
| 378 |
use a `working copy`__ of the `Docutils version repository`_. |
| 379 |
|
| 380 |
Snapshots: |
| 381 |
To get a repository _`snapshot`, go to |
| 382 |
https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/ |
| 383 |
and click the download snapshot button. |
| 384 |
|
| 385 |
Unpack in a temporary directory, |
| 386 |
**not** directly in Python's ``site-packages``. |
| 387 |
|
| 388 |
See the `Installation`_ instructions above. |
| 389 |
|
| 390 |
__ docs/dev/repository.html#checking-out-the-repository |
| 391 |
.. _Docutils version repository: docs/dev/repository.html |
| 392 |
.. _sandbox: https://docutils.sourceforge.io/sandbox/README.html |
| 393 |
|
| 394 |
|
| 395 |
Converting the documentation |
| 396 |
============================ |
| 397 |
|
| 398 |
After unpacking and installing the Docutils package, the following |
| 399 |
shell commands will generate HTML for all included documentation:: |
| 400 |
|
| 401 |
cd <archive_directory_path> |
| 402 |
tools/buildhtml.py . |
| 403 |
|
| 404 |
On Windows systems, type:: |
| 405 |
|
| 406 |
cd <archive_directory_path> |
| 407 |
py tools\buildhtml.py .. |
| 408 |
|
| 409 |
The final directory name of the ``<archive_directory_path>`` is |
| 410 |
"docutils" for snapshots. For official releases, the directory may be |
| 411 |
called "docutils-X.Y.Z", where "X.Y.Z" is the release version. |
| 412 |
|
| 413 |
Some files may generate system messages (warnings and errors). The |
| 414 |
``docs/user/rst/demo.rst`` file (under the archive directory) contains |
| 415 |
five intentional errors. (They test the error reporting mechanism!) |
| 416 |
|
| 417 |
|
| 418 |
Running the Test Suite |
| 419 |
====================== |
| 420 |
|
| 421 |
The test suite is documented in `Docutils Testing`_ (docs/dev/testing.rst). |
| 422 |
|
| 423 |
To run the entire test suite, open a shell and use the following |
| 424 |
commands:: |
| 425 |
|
| 426 |
cd <archive_directory_path>/test |
| 427 |
./alltests.py |
| 428 |
|
| 429 |
Under Windows, type:: |
| 430 |
|
| 431 |
cd <archive_directory_path>\test |
| 432 |
python alltests.py |
| 433 |
|
| 434 |
|
| 435 |
You should see a long line of periods, one for each test, and then a |
| 436 |
summary like this:: |
| 437 |
|
| 438 |
Ran 1744 tests in 5.859s |
| 439 |
|
| 440 |
OK (skipped=1) |
| 441 |
Elapsed time: 6.235 seconds |
| 442 |
|
| 443 |
The number of tests will grow over time, and the times reported will |
| 444 |
depend on the computer running the tests. |
| 445 |
Some test are skipped, if optional dependencies (`recommendations`_) |
| 446 |
are missing. |
| 447 |
The difference between the two times represents the time required to set |
| 448 |
up the tests (import modules, create data structures, etc.). |
| 449 |
|
| 450 |
A copy of the test output is written to the file ``alltests.out``. |
| 451 |
|
| 452 |
If any of the tests fail, please `open a bug report`_ or `send an email`_ |
| 453 |
(see `Bugs <BUGS.html>`_). |
| 454 |
Please include all relevant output, information about your operating |
| 455 |
system, Python version, and Docutils version. To see the Docutils |
| 456 |
version, look at the test output or use :: |
| 457 |
|
| 458 |
docutils --version |
| 459 |
|
| 460 |
.. _Docutils Testing: https://docutils.sourceforge.io/docs/dev/testing.html |
| 461 |
.. _open a bug report: |
| 462 |
https://sourceforge.net/p/docutils/bugs/ |
| 463 |
.. _send an email: mailto:[email protected] |
| 464 |
?subject=Test%20suite%20failure |
| 465 |
.. _web interface: https://sourceforge.net/p/docutils/mailman/ |
| 466 |
|
| 467 |
|
| 468 |
Getting Help |
| 469 |
============ |
| 470 |
|
| 471 |
All documentation can be reached from the `Project Documentation |
| 472 |
Overview`_. |
| 473 |
|
| 474 |
The SourceForge `project page`_ has links to the tracker, mailing |
| 475 |
lists, and code repository. |
| 476 |
|
| 477 |
If you have further questions or need assistance with Docutils or |
| 478 |
reStructuredText, please post a message to the Docutils-users_ mailing |
| 479 |
list. |
| 480 |
|
| 481 |
.. _Project Documentation Overview: docs/index.html |
| 482 |
.. _project page: https://sourceforge.net/p/docutils |
| 483 |
.. _Docutils-users: docs/user/mailing-lists.html#docutils-users |
| 484 |
|
| 485 |
|
| 486 |
.. Emacs settings |
| 487 |
|
| 488 |
Local Variables: |
| 489 |
mode: indented-text |
| 490 |
mode: rst |
| 491 |
indent-tabs-mode: nil |
| 492 |
sentence-end-double-space: t |
| 493 |
fill-column: 70 |
| 494 |
End: |
| 495 |
|