Metadata-Version: 2.4
Name: wiki2
Version: 4.0.0
Summary: Simple Python Markdown wiki with a web UI
Author-email: Alexander Jung-Loddenkemper <alexander@julo.ch>
License-Expression: BSD-3-Clause
Project-URL: Homepage, https://github.com/alexanderjulo/wiki
Project-URL: Repository, https://github.com/alexanderjulo/wiki
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Flask<4,>=3.1.3
Requires-Dist: Click<9,>=8.4.2
Requires-Dist: Flask-Login<0.7,>=0.6.3
Requires-Dist: Flask-WTF<2,>=1.3.0
Requires-Dist: Markdown<4,>=3.10.3
Requires-Dist: Pygments<3,>=2.20.0
Requires-Dist: WTForms<4,>=3.2.2
Requires-Dist: Werkzeug<4,>=3.1.8
Requires-Dist: python-markdown-math<1,>=0.9
Provides-Extra: test
Requires-Dist: pytest<10,>=9.1.1; extra == "test"
Dynamic: license-file

# wiki2

[![Tests](https://github.com/alexanderjulo/wiki/actions/workflows/tests.yml/badge.svg)](https://github.com/alexanderjulo/wiki/actions/workflows/tests.yml)

## About
As I wanted a wiki that just uses plain markdown files as backend, that is easy
to use and that is written in python, to enable me to easily hack around,
but found nothing, I just wrote this down. I hope that it might help others ,too.

## Features

* Markdown Syntax Editing
* Tags
* Regex Search
* Random URLs
* Web Editor
* Pages can also be edited manually, possible uses are:
	* use the cli
	* use your favorite editor
	* sync with dropbox
	* and many more

### Planned

* Re-introduce support for customizing the theme
* Speed Improvements
	* Code Optimizations
	* Caching
* Settings via the webinterface


## Setup

wiki2 requires Python 3.10 or newer. Install it with:

	python -m pip install wiki2


Afterwards you can create or change into your content directory and create a `config.py` file in it, that contains at least the following:

	# encoding: <your encoding (probably utf-8)
	SECRET_KEY='a unique and long key'
	TITLE='Wiki' # Title Optional

## Usage
Afterwards you can just run `wiki web` in your content directory to start the server.

### Sample wiki

Create generated local content, including a secure development `config.py`, then run it:

	uv run python scripts/create_sample_wiki.py /tmp/wiki2-sample --pages 8
	uv run wiki --directory /tmp/wiki2-sample web

The script refuses to write into a non-empty directory. Pass `--seed NAME` to reproduce the generated page names.

### Create a private-wiki user

Set `PRIVATE = True` in the content directory's `config.py`, then create a user. The script prompts twice for the password and always stores a salted hash:

	uv run python scripts/create_user.py ../wiki-experiments alice

## Development

Clone the repository, then use the committed lockfile to create the test environment:

	uv sync --extra test
	uv run python -m pytest

Alternatively, install with pip using `python -m pip install -e ".[test]"`.

Both methods install the `wiki` CLI in the active environment.

## Contributors

Thank you very much to my two top contributers @walkerh and @traeblain. You two have posted so many issues and especially solved them with so many pull requests, that I sometimes lose track of it! :)
