Syncronize local files with MediaWiki
Project description
🗃️ Pöuli 🐙
Synchronize local files with MediaWiki instances.
ℹ️ About
This tool was originally conceived by Tommi to upload a subset of their personal knowledge repository, the Jam, with their Personal Reader, PaJamas. Hopefully, it can flourish beyond this specific use-case, and be helpful for other XPUB students or wiki adventurers.
✨ Meaning
The name “Pöuli” (equivalent of PoOuli) stands for:
- Practically Often Used Lovely Interface
- Petty yet Outstanding Utility Leading to Integration
- Phenomenal Optimistic Useful Lovely Idea
- Paradoxically Obscure but Unstoppable Link Ignitor
It is the anagram of Oulipo, an eclectic, mad, and maddening collective of artists formed in the ’60s.
+++ IDEA: Writing machine name generator
⏬ Installation
Install poouli’s Python package from the Python Package Index (PyPI), however you prefer.
- By using uv:
uv pip install poouli - By using pip:
pip install poouli - By cloning the source code
- using SSH:
git clone ssh://git@codeberg.org/tommi/poouli.git - using HTTPS:
git clone https://codeberg.org/tommi/poouli.git
- using SSH:
⚙️ Configuration
The initial configuration requires to follow the following steps. It’s cumbersome, I know. If you have tips on how to make it simpler and easier, please open a PR!
- Generate a Bot Password in MediaWiki:
- Visit https://pzwiki.wdka.nl/mediadesign/Special:BotPasswords
- Generate a bot
- Save the chosen bot name and its generated password
- Run
pwb generate_family_fileto tell the script that you want to use the XPUB’s wiki as the reference wiki - Run
pwb generate_user_filesto provide the login credentials retrieved while generating a Bot Password - Run
pwb loginto establish the connection and to check if everything is working nominally - Create a YAML configuration file in the config directory or in the script’s directory. Here is an example. Add the following data:
local_directory: path of the directory for the local fileswiki_base_path: the path of the main page within which the local files should be synchronized (can be overwritten bypermalink_wikiin each note’s front matter)banner(optional): path to an HTML file to include at the end of all wiki pages published via Pöuli, unlesswiki_bannerisFalsein the frontmatter.styling(optional): path to an HTML file to include at the end of all wiki pages published via Pöuli, if and only ifwiki_stylingisTruein the frontmatter.
📡 Usage
Run the script with uv run poouli or just poouli
+++ TODO
Source code
The source code is published in three different forges, all synchronized among themselves.
- The main repository is on 🗻 Codeberg, where you can share any feedback or propose changes to the code.
- A mirror is on the XPUB git forge
- Another mirror is on GitHub
♻️ License
Everything inside this repository is licensed under the European Union Public License.
🤔 To-do list
An unsorted list of things to do. Everything will be moved to proper issue tracking after the first release.
- Handle images
- Get configuration settings from command line arguments, overriding config file instructions
- Links management and testing
- local → local private
- local → local public (on tommi.space)
- local → local synchronized
- local → Wiki (as a regular https link)
- Wiki → Jam (as a regular https link to tommi.space)
- Wiki → Wiki (not part of Pajamas)
- Wiki → Wiki
- Anchor links
- same page
- another page
- Deal with Categories (see below)
- Note metadata
aliasesupdatedwiki_categories
- Move the Wiki information and credentials to the YAML configuration file. Ideally, no scripts or commands should be required to run before the main one.
- test on Windows
- Get wiki pages that are in the specified subpage but are not found locally
- Transclusion
- transform
<includeonly>(and similar) to<div id=includeonly>in Markdown - How to transform anchor transclusions in MediaWiki? It’s not supported
- transform
- Exclude JSON and YAML files from the source directory
- Test how references and foonotes work
- Add
dictand instructions about how the script works
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 poouli-0.2.0a1.tar.gz.
File metadata
- Download URL: poouli-0.2.0a1.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
271a576a8d26ad75e35c90f3eb31690cbd90ee5d790fa0abb2434dee64c7e043
|
|
| MD5 |
e73cbb9c70b01c051d2e33d144413afa
|
|
| BLAKE2b-256 |
142521932ca660e81a8a1256d808027b098d7be3b8999a2ce41d8fa8a396c612
|
File details
Details for the file poouli-0.2.0a1-py3-none-any.whl.
File metadata
- Download URL: poouli-0.2.0a1-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f9453a1f2a49d5e43fdde35335c45a79204e27229ddcc9a82e06853fd28408b
|
|
| MD5 |
f3c0a32c08da05e1598d89d595aa74d7
|
|
| BLAKE2b-256 |
27b16f99eadf654308a2e4379b90ba2fe47b1cc879e6afb72350b23e57a22413
|