Giter Site home page Giter Site logo

sphinxcontrib-restbuilder's Introduction

README for reST Builder

Sphinx extension to build reST (reStructuredText) files.

This extension is in particular useful to use in combination with the autodoc extension to automatically generate documentation for use by any rst parser (such as the GitHub wiki).

In itself, the extension is fairly straightforward -- it takes the parsed reST file from Sphinx and outputs it as reST.

Requirements

  • Sphinx 1.0 or later
  • Python 2.6 or later

Installing

Using pip

pip install sphinxcontrib-restbuilder

Manual

hg clone http://bitbucket.org/birkenfeld/sphinx-contrib cd sphinx-contrib/restbuilder python setup.py install

If you want to take a look and have a try, you can put the reST builder in an extension subdirectory, and adjust sys.path to tell Sphinx where to look for it:

  • Add the extensions directory to the path in conf.py. E.g.

    sys.path.append(os.path.abspath('exts'))

Usage

  • Set the builder as a extension in conf.py:

    extensions = ['sphinxcontrib.restbuilder']

  • Run sphinx-build with target rst:

    sphinx-build -b rst -c . build/rst

Configuration

The following four configuration variables are defined by sphinxcontrib.restbuilder:

rst_file_suffix

This is the file name suffix for generated reST files. The default is ".rst".

rst_link_suffix

Suffix for generated links to reST files. The default is whatever rst_file_suffix is set to.

rst_file_transform

Function to translate a docname to a filename. By default, returns docname + rst_file_suffix.

rst_link_transform

Function to translate a docname to a (partial) URI. By default, returns docname + rst_link_suffix.

Further Reading

Feedback

The reST builder is in a preliminary state. It's not (yet) widely used, so any feedback is particularly welcome.

sphinxcontrib-restbuilder's People

Contributors

multimeric avatar skalt avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.