A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://sourceforge.net/p/docutils/code/HEAD/tree/trunk/docutils/ below:

Docutils: Documentation Utilities / Code

Menu Tree [r10184] / trunk / docutils /  History
Read Me README: Docutils 0.22rc6.dev Author: David Goodger Contact: goodger@python.org Date: $Date$ Web site: https://docutils.sourceforge.io/ Copyright: This document has been placed in the public domain. Abstract: Docutils is a modular system for processing documentation into useful formats, such as HTML, XML, and LaTeX. For input Docutils supports reStructuredText, an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax. Quick-Start

This is for those who want to get up & running quickly.

  1. Docutils requires Python, available from https://www.python.org/. See Dependencies below for details.

  2. Install the latest stable release from PyPi with pip:

    pip install docutils
    

    For alternatives and details, see section Installation below.

  3. Use the front-end scripts to convert reStructuredText documents. Try for example:

    docutils FAQ.rst FAQ.html
    

    See Usage below for details.

Purpose

The purpose of the Docutils project is to provide a set of tools for processing plaintext documentation into useful formats, such as HTML, LaTeX, troff (man pages), OpenOffice, and native XML. Support for the following sources has been implemented:

Support for the following sources is planned or provided by third party tools:

Dependencies

To run the code, Python must be installed. (Python is pre-installed with most Linux distributions.)

The type hints added in version 0.22 use Python 3.10 syntax. However, the Python interpreter treats them as annotations unless typing.TYPE_CHECKING is set to True.

Installation

The Python Packaging User Guide gives details how to use pip for installing.

Usage

Start the "docutils" command line application with:

docutils [options] [<source> [<destination>]]

The default action is to convert a reStructuredText document to HTML5, for example:

docutils test.rst test.html

Read the --help option output for details on options and arguments and Docutils Front-End Tools for the full documentation of the various tools.

For programmatic use of the docutils Python package, read the API Reference Material and the source code. Remaining questions may be answered in the Docutils Project Documentation or the Docutils-users mailing list.

Contributions are welcome!

Project Files & Directories Converting the documentation

After unpacking and installing the Docutils package, the following shell commands will generate HTML for all included documentation:

cd <archive_directory_path>
tools/buildhtml.py .

On Windows systems, type:

cd <archive_directory_path>
py tools\buildhtml.py ..

The final directory name of the <archive_directory_path> is "docutils" for snapshots. For official releases, the directory may be called "docutils-X.Y.Z", where "X.Y.Z" is the release version.

Some files may generate system messages (warnings and errors). The docs/user/rst/demo.rst file (under the archive directory) contains five intentional errors. (They test the error reporting mechanism!)

Running the Test Suite

The test suite is documented in Docutils Testing (docs/dev/testing.rst).

To run the entire test suite, open a shell and use the following commands:

cd <archive_directory_path>/test
./alltests.py

Under Windows, type:

cd <archive_directory_path>\test
python alltests.py

You should see a long line of periods, one for each test, and then a summary like this:

Ran 1744 tests in 5.859s

OK (skipped=1)
Elapsed time: 6.235 seconds

The number of tests will grow over time, and the times reported will depend on the computer running the tests. Some test are skipped, if optional dependencies (recommendations) are missing. The difference between the two times represents the time required to set up the tests (import modules, create data structures, etc.).

A copy of the test output is written to the file alltests.out.

If any of the tests fail, please open a bug report or send an email (see Bugs). Please include all relevant output, information about your operating system, Python version, and Docutils version. To see the Docutils version, look at the test output or use

docutils --version

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4