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 | 2.7, 3.4, 3.6 | ||
Windows | 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 |
pip install wikidoc
wikidoc --help
wikidoc build --repo https://github.com/serra/wiki-to-doc.wiki.git --name wiki-to-doc.wiki
ls ~/wiki-to-doc/sites
Developed on OSX, Python version 3.6.
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
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
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.
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 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]