Skip to main content

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

https://api.travis-ci.org/GaretJax/sphinx-autobuild.png https://pypip.in/v/sphinx-autobuild/badge.png https://coveralls.io/repos/GaretJax/sphinx-autobuild/badge.png?branch=develop

Installation

You can use pip to install the package along with its requirements:

pip install sphinx-autobuild

Usage

The package installs a single executable script, named sphinx-autobuild. The script takes the same arguments as the sphinx-build command installed by Sphinx plus the following options:

  • -p/--port option to specify the port on which the documentation shall be served (default 8000)

  • -H/--host option to specify the host on which the documentation shall be served (default 127.0.0.1)

  • -i/--ignore multiple allowed, option to specify file ignore glob expression when watching changes, for example: *.tmp

To build a classical Sphinx documentation set, issue the following command:

sphinx-autobuild docs docs/_build/html

And then visit the webpage served at http://127.0.0.1:8000. Each time a change to the documentation source is detected, the HTML is rebuilt and the browser automatically reloaded.

To stop the server simply press ^C.

Makefile integration

To integrate the sphinx-autobuild command in the Makefile generated by Sphinx, add the following target:

livehtml:
    sphinx-autobuild -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

Then run with:

make livehtml

0.4.0 2014/12/23

  • Added -i, –ignore command line argument to ignore files by the glob expression.

  • Added basic tests for the entry point script.

  • PEP 257 improvements.

  • Automated tests on travis integration and coverage reporting.

  • Compatibility with livereload >= 2.3.0.

  • Compatibility with Python 2.6 and 2.7.

  • Provisional compatibility with Python 3.3 and 3.4.

0.3.0 - 2014/08/21

0.2.3 - 2013/12/25

  • Ignore the paths indicated by the -w and -d arguments when watching for changes to the documentation.

0.2.1 - 2013/12/25

  • Catch subprocess PTY reading errors.

0.2.0 - 2013/12/25

  • Explicitly parse sphinx-build arguments for better compatibility.

0.1.0 - 2013/12/25

  • Initial release.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sphinx-autobuild-0.4.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_autobuild-0.4.0-py27-none-any.whl (8.5 kB view details)

Uploaded Python 2.7

File details

Details for the file sphinx-autobuild-0.4.0.tar.gz.

File metadata

File hashes

Hashes for sphinx-autobuild-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f60976e0b5ed8ccb3fcbe591582b2c9cdec018083762f5d493babd186dbd5b85
MD5 0a20147623238e562195e098ebadc89f
BLAKE2b-256 5e4c152d7eaaece568bbb5afb7c54eb07bf233dcb38a113c300e351f14ee63f4

See more details on using hashes here.

File details

Details for the file sphinx_autobuild-0.4.0-py27-none-any.whl.

File metadata

File hashes

Hashes for sphinx_autobuild-0.4.0-py27-none-any.whl
Algorithm Hash digest
SHA256 2a5a3aaff19c53400d45ced01cebcf13a548256da5dcd19c185e59746edfed0d
MD5 1b502710180dd974e84b38070c9c36bf
BLAKE2b-256 fd986c9774c0d47bc23599d3cb745783179a865d2fa0d828e2b1898efa5999d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page