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 Distribution

File details

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

File metadata

File hashes

Hashes for ubuntudesign.documentation-builder-1.5.3.tar.gz
Algorithm Hash digest
SHA256 4855f189bb2099ede7765f5d8ca36bae1d6229e8cbb9f94ca529e5789087d914
MD5 278a21714f1f50881c48c5d49250defa
BLAKE2b-256 7c7830cf6e8565b796299363c9fab9a7d8eaf86ca8220da1bce408ffcbaaaaa8

See more details on using hashes here.

File details

Details for the file ubuntudesign.documentation_builder-1.5.3-py3.5.egg.

File metadata

File hashes

Hashes for ubuntudesign.documentation_builder-1.5.3-py3.5.egg
Algorithm Hash digest
SHA256 9374c4c668c6692debbbda7da854e13995fb76185596876008304c7d7ee6e1d4
MD5 ec2fb1430c784d6db1bbb3896c499901
BLAKE2b-256 8812aad028c54f1c8f1ef7c4955c994dd3db40f55b33c68052e70b1f87baa117

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