Skip to main content

A command-line tool for building documentation from repositories into HTML files. Initially based on https://github.com/juju/docs/blob/master/tools/mdbuild.py.

Project description

build status code coverage

A tool for building a set of documentation files in HTML format, from a remote git repository containing markdown files.

Installation

The best way to install documentation-builder is with snap:

sudo snap install documentation-builder

If you don’t have snap on your system, you can also install it with pip3:

pip3 install ubuntudesign.documentation-builder

For more information see the documentation.

Development

documentation-builder is a Python module. The main application code lives in ubuntudesign/documentation_builder. Updates to the markup or styling should be made in the default template.

Checking changes

To check your changes to documentation-builder, it’s probably easiest to install the module locally, in editable mode, within an encapsulated environment:

python3 -m venv env3 && source env3/bin/activate  # Create encapsulated environment
pip install -e .  # Install the module in editable mode

documentation-builder --source-folder docs  # build the documentation-builder's own documentation
xdg-open build/en/index.html  # Open up the documentation page

Watching for changes

On Ubuntu et al. you can use inotifywait to watch for changes to the source files, and rebuild when something changes as follows:

sudo apt install inotify-tools  # Ensure inotifywait is installed

# Force rebuild docs when anything changes in the source folder
while inotifywait -r -e close_write "./ubuntudesign"; do bin/documentation-builder --force --source-folder docs; done

Tests

To run tests:

./setup.py test

Debugging

To run a specific test:

./setup.py test --addopts tests/test_operations.py::test_find_files

You can debug tests by adding a debugger to the code and running the test again.

Project details


Download files

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

Source Distribution

Built Distributions

ubuntudesign.documentation_builder-1.6.0-py2.py3-none-any.whl (52.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ubuntudesign.documentation-builder-1.6.0.tar.gz.

File metadata

File hashes

Hashes for ubuntudesign.documentation-builder-1.6.0.tar.gz
Algorithm Hash digest
SHA256 aaf4589fa6dd0e45da8855b3daa09a3c4999dfabd32fb3b841536c8c0e606234
MD5 f0651b6ea8df5104ddbc43e7cbc243ed
BLAKE2b-256 ccff5529ea193e3236ba4d32777172683a3f1bfbaff4a8def599284850210075

See more details on using hashes here.

File details

Details for the file ubuntudesign.documentation_builder-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ubuntudesign.documentation_builder-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d641074da7f8b1146c87e7918c6b0ca0d46270b3e4a813dca78ee55022f903c
MD5 ea7baa028e5bbe18e678e31cf80bd560
BLAKE2b-256 1498477d54bc810ccdf7a372d6e396823b3a9a16496dc5a67cfc853c47537d9b

See more details on using hashes here.

File details

Details for the file ubuntudesign.documentation_builder-1.6.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ubuntudesign.documentation_builder-1.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 40991e1a5dfb53b6e95c9a4256c9e03db870a718eaaff907b0f427d01cbcca37
MD5 9b8ed24d200f36892d4aed0951fe7367
BLAKE2b-256 ce4ef685647046d765e19b7f007b8875c99aaf74151911a0018f2f644ca6d09e

See more details on using hashes here.

Supported by

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