- PHP 52.2%
- Python 44.6%
- Shell 3.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| download_assets.py | ||
| gen_config.py | ||
| generate_dokuwiki.py | ||
| itemtags.php | ||
| README.md | ||
| requirements.txt | ||
| update.local.sh.example | ||
| update.sh | ||
beetlegame_wikier
Generate DokuWiki content (pages + media + item tag config) from Remilia beetle card data.
This project automates a full pipeline for a Beetle Game wiki:
- Download latest beetle JSON + image assets from
remilia.net - Generate DokuWiki page files grouped by category and rarity
- Generate
itemtags.phpconfig for the DokuWikiitemtagsplugin - (Optional) Deploy everything to a remote DokuWiki server via
rsync
What this repo contains
-
download_assets.py
Downloadsbeetles.jsonand all referenced images (icon/background/character) intoassets/.- Includes trinkets/trophies
- Skips shelves (separate game system)
-
generate_dokuwiki.py
Builds DokuWiki page text files indokuwiki_pages/:- item pages by category (
beetle/,junk/,trinket/,trophy/, etc.) - category index pages (
start.txt) - rarity pages (
rarity/*.txt, includingrarity/trophy.txt) - skips shelves
- item pages by category (
-
gen_config.py
Generates:itemtags.php(plugin config)itemtag_docs.txt(wiki docs page listing all available tags)- includes trinket/trophy tags and links
- skips shelves
-
update.sh
End-to-end script: run generators, then sync pages/media/config to a remote DokuWiki host and rebuild index/cache. -
beetles.json
Latest downloaded beetle data snapshot. -
itemtags.php
Generated plugin configuration output.
Requirements
System
- Python 3.10+
rsync,ssh(for deployment)- Access to a Chromium profile containing valid
remilia.netcookies (used bybrowser_cookie3)
Python
requirements.txt includes:
requests>=2.31.0browser-cookie3>=0.20.1
Install:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Quick start
1) Download data and assets
python download_assets.py
Outputs:
beetles.jsonassets/...(mirrored image structure)
2) Generate DokuWiki pages
python generate_dokuwiki.py
Output root:
dokuwiki_pages/
3) Generate itemtags plugin config + docs
python gen_config.py
Outputs:
itemtags.phpitemtag_docs.txt
One-command update + deploy
update.sh runs all generation steps and then deploys to a configured remote host.
./update.sh
By default, update.sh uses placeholder values and will stop until configured.
Recommended setup:
cp update.local.sh.example update.local.sh
# edit update.local.sh with your host/user/path settings
Default path assumptions (can be overridden):
- DokuWiki path:
/var/www/dokuwiki/
It will:
- upload
itemtags.phpto/var/www/dokuwiki/conf - sync
dokuwiki_pages/todata/pages/ - sync
assets/todata/media/ - clear cache + run DokuWiki indexer
⚠️
update.local.shis gitignored so you can keep deploy host/user details out of the repo.
Output structure
Typical generated tree:
dokuwiki_pages/
artifact/
beetle/
cheese/
flower/
hammer/
junk/
trinket/
trophy/
unique/
rarity/
itemtag_docs.txt
assets/
images/
icons/
backgrounds/
characters/
Notes
- Item/tag naming has special handling for keys like
hammer*,junk_cube*, andpollen*(uses label-based tags/page names). - Supports newer item categories including Trinkets and Trophies.
- Shelves (category
10) are intentionally excluded from asset/page/config generation. - Paths are generated for DokuWiki namespace/media syntax (
:namespace:pagestyle). - Generated files are intended to be re-generated from source data;
assets/,dokuwiki_pages/, andbeetles.jsonare gitignored.
Typical workflow
# 1) refresh data/media
python download_assets.py
# 2) regenerate pages + plugin config
python generate_dokuwiki.py
python gen_config.py
# 3) deploy
./update.sh
If you want a safer deploy flow, run steps manually first and inspect generated output before syncing to production.