Skip to content

Simple approach to create a readable, searchable and browsable yet offline copy of a github wiki

License

Notifications You must be signed in to change notification settings

serra/wiki-to-doc

Repository files navigation

wiki-to-doc

Simple approach to create an offline, static copy of a github wiki that is:

  • Readable
  • Browsable
  • Searchable

See the wiki for documentation.

OS CI status Python versions Note
Linux Build Status 2.7, 3.4, 3.6
Windows Windows Build status 2.7 See #6 for 3.4 and 3.6 support
OS X N.A. #7 3.6 Developed on OS X, Python 3.6

PyPI Version

Installing

pip install wikidoc
wikidoc --help

Usage

wikidoc build --repo https://github.com/serra/wiki-to-doc.wiki.git --name wiki-to-doc.wiki
ls ~/wiki-to-doc/sites

Developing

Developed on OSX, Python version 3.6.

Prepare environment

Assuming virtualenv 1.7+:

cd [wiki-to-doc repo]
virtualenv -p /usr/local/bin/python3 venv
source venv/bin/activate
pip install -r requirements.txt

Run tests

cd [wiki-to-doc repo]
pytest

I like to run sniffer, so that tests are automatically run when files change:

cd [wiki-to-doc repo]
sniffer

Developing & hacking

Package using pip and setuptools. During development:

. venv/bin/activate
pip install --editable .

This gives you the virtual environment from above, with the wikidoc package installed and editable. This way you can experiment with the cli script from the terminal immediately while developing.

Packaging

Use bumpversion to, well, bump the version. This will update the version information in

  • setup.cfg
  • setup.py
  • wikidoc/_version.py

It will add a version tag to the current commit too.

So to do a patch increment:

git checkout master
git pull
bumpversion patch
git push origin master --tags

Publishing

Publishing is done when a version tag is pushed to Github. This is picked up by Travis, which will do a deploy to PyPI.

Assuming pypi and pypitest configured in ~/pypirc, you can publish from your local machine:

python setup.py register -r [pypi|pypitest]
python setup.py sdist upload -r [pypi|pypitest]

About

Simple approach to create a readable, searchable and browsable yet offline copy of a github wiki

Resources

License

Stars

Watchers

Forks

Packages

No packages published