Zelphir Kaltstahl 0f1f0782b8 remove rst files | 6 лет назад | |
---|---|---|
static | 6 лет назад | |
templates | 6 лет назад | |
.gitignore | 6 лет назад | |
Dockerfile | 6 лет назад | |
FileReader.py | 6 лет назад | |
LICENSE | 6 лет назад | |
Link.py | 6 лет назад | |
README.md | 6 лет назад | |
RSTRenderer.py | 6 лет назад | |
WikiProcessor.py | 6 лет назад | |
__init__.py | 6 лет назад | |
log.conf | 6 лет назад | |
rst_directive.py | 6 лет назад | |
server.py | 6 лет назад |
Zwiki is a static wiki system based on reStructuredText files.
Rendering reStructuredText files is a very flexible approach to generating wiki pages, because of reStructuredText's expressiveness and extensibility. It's expressive ways to write references (see http://docutils.sourceforge.net/docs/user/rst/quickref.html#hyperlink-targets) surpass those of basic Markdown's (see https://daringfireball.net/projects/markdown/syntax#link) by far. In context of wiki systems especially document internal links and wiki internal links are of importance.
Depending on how you wish to run Zwiki, dependencies vary. If you want to run Zwiki as a Docker container, the dependency will be Docker. In an uncontainerized setup the requirements will include libraries Zwiki depends on.
Zwiki depends on the following libraries:
docutils
-- for translating reStructuredText to HTMLjinja2
-- for translating Jinja 2 templates to HTML pagesgunicorn
-- for running WSGI containersfalcon
-- for implementing the APIpygments
-- for rendering code blocks in Zwiki pagesThis project requires a few libraries to work. I recommend creating a fresh environment to run Zwiki:
$ conda create --name zwiki python=3.7 docutils jinja2 gunicorn pygments
$ source activate zwiki
$ conda install falcon -c conda-forge
With the environment activated, you can run Zwiki using the following command:
$ gunicorn -b 0.0.0.0:5000 main:api --log-config log.conf
(If you are developing running gunicorn
, you might consider using --reload
to have it automatically watch files of Zwiki and reload, so that no restarting is necessary to see changes.)
Then access Zwiki in your browser at http://localhost:5000/.
Simply build an image using the provided Dockerfile
and run it:
docker run -d <your-image-name>
Then access Zwiki in your browser at http://localhost:5000/.
If you run Zwiki as a Docker container, be aware of either having to rebuild the Docker image or having to modifying the Zwiki content inside the Docker container, while it is running.