Organise GitHub wiki Home and _Sidebar pages by owner or category.
Project description
spreen-wiki (Python)
The PyPI implementation of spreen-wiki: generates Home.md and _Sidebar.md for a GitHub wiki grouped by the Owner/Category declared on the first line of each page, and exports reports of the pages whose owner or category is unknown.
1. Installation
$ pipx install spreen-wiki
(or pip install spreen-wiki into a virtual environment). Requires Python 3.10+.
2. CLI Usage
$ cd path/to/your-repo.wiki
$ spreen update --path . --org your-org --repo your-repo
Updated Home.md and _Sidebar.md.
Check them out at 'https://github.com/your-org/your-repo/wiki' !!
$ spreen count-report --path .
Unknown Owner nor Necessity: 1
Unowned but Necessary: 1
Unowned: 10
Exported the unknown wiki count report to './unknown_wiki_count_list_by_namespace.txt'.
$ spreen llm-export --path .
Exported the unknown wiki list for LLM to './unknown_wiki_list_for_llm.txt'.
Common flags (see spreen <command> --help): --group-by Owner|Category, --language English|Japanese, --overflow (split Home into per-namespace pages under wikis-by-owner/), --template-dir, --config, --exclude, --output, --wiki-url.
Persistent settings, custom labels and additional languages go into a .spreen.yml at the wiki root.
3. Library Usage
from spreen_wiki import (
Home, Sidebar, UnknownWikiCountListExporter, UnknownWikiListExporterForLLM,
)
Home.run(base_path='.', organisation='your-org', repository='your-repo')
Sidebar.run(base_path='.', organisation='your-org', repository='your-repo')
UnknownWikiCountListExporter.run(base_path='.', output='report.txt')
UnknownWikiListExporterForLLM.run(base_path='.', group_by='Category', language='Japanese')
All classes accept base_path, group_by, language, home_overflow plus the configuration keywords organisation, repository, wiki_url, owner_base_url, template_dir, excluded_dirs, config_path (and output on the exporters). The package ships py.typed.
4. Development
4-1. Environment
- Python 3.14.6
- pip 26.x
$ pip install -r requirements.txt
4-2. Interactive Invoke Tasks (this repository's own automation)
These stdin-prompted tasks pin this repository's settings and read ORGANISATION_NAME from the environment.
$ invoke update_wiki_list_on_home_and_sidebar
$ invoke export_unknown_wiki_count_list_by_namespace
$ invoke export_unknown_wiki_list_for_llm
4-3. Unit Tests
$ invoke
============================= test session starts ==============================
platform linux -- Python 3.14.6, pytest-9.0.3, pluggy-1.6.0
rootdir: spreen-wiki/PyPI
configfile: pyproject.toml
collected 46 items
test/test_application.py .... [ 8%]
test/test_configuration.py .............. [ 39%]
test/test_home.py ...... [ 52%]
test/test_sidebar.py .... [ 60%]
test/test_unknown_wiki_count_list_exporter.py .............. [ 91%]
test/test_unknown_wiki_list_exporter_for_llm.py .... [100%]
============================== 46 passed in 3.81s ==============================
4-4. Static Code Analysis
$ flake8 --max-complexity=10 --max-line-length=127 .
$ autoflake8 --in-place --remove-duplicate-keys --remove-unused-variables --recursive .
$ autopep8 --in-place --aggressive --aggressive --recursive .
4-5. Type Checks
$ mypy .
Success: no issues found in 16 source files
4-6. Build & Release
$ python -m build
$ twine check dist/*
$ twine upload dist/*
Releases are tagged python-vX.Y.Z; update CHANGELOG.md with every release.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spreen_wiki-0.1.0.tar.gz.
File metadata
- Download URL: spreen_wiki-0.1.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a59508eea871b0cc4cc74f8c94cb6b4e7b49fe3c5f39aecb490bd57a5e68202
|
|
| MD5 |
b15a2fdce5fb779f4d066e4bd44b3f99
|
|
| BLAKE2b-256 |
a8f31513cd8e257c58f913a9852d6b1887e3befeecf18b1f94f24aa1e564226f
|
File details
Details for the file spreen_wiki-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spreen_wiki-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
425ff0bca738a3b239730536678df3b6436268f9bf178a287fc078eb1dec537c
|
|
| MD5 |
3fcaf3d9c48dcf903432dffdcbf96a62
|
|
| BLAKE2b-256 |
a509f06bc1d8d26146e534898b087bab8b49b8b9e839cf94417a2fc43c80a31d
|