Skip to main content

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

The installation instructions assume you are using uv.

+++ TODO

⚙️ Configuration

The initial configuration requires to follow the following steps.

  1. Generate a Bot Password in MediaWiki:
    1. Visit https://pzwiki.wdka.nl/mediadesign/Special:BotPasswords
    2. Generate a bot
    3. Save the chosen bot name and its generated password
  2. Run pwb generate_family_file to tell the script that you want to use the XPUB’s wiki as the reference wiki
  3. Run pwb generate_user_files to provide the login credentials retrieved while generating a Bot Password
  4. Run pwb login to establish the connection and to check if everything is working nominally
  5. Create a YAML configuration file in the config directory or in the script’s directory, with the following data:
    • local_directory: path of the directory for the local files
    • wiki_base_path: the path of the main page within which the local files should be synchronized (can be overwritten by permalink_wiki in 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, unless wiki_banner is False in 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 if wiki_styling is True in the frontmatter.

📡 Usage

+++ TODO

🤔 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
    • aliases
    • updated
    • wiki_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
  • Exclude JSON and YAML files from the source directory
  • Test how references and foonotes work
  • Add dict and instructions about how the script works

♻️ License

Everything inside this repository is licensed under the European Union Public License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

poouli-0.1.3.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

poouli-0.1.3-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file poouli-0.1.3.tar.gz.

File metadata

  • Download URL: poouli-0.1.3.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for poouli-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f028e9c3fd884555234c1e99200e5707b6cb50d22c434208ebf15c69ef4dd038
MD5 f48cff5998d6a9b21d96c3aa99d930a3
BLAKE2b-256 ac8954f915f976e3410669d943e498a14383353d90e1498f764ec609042330b0

See more details on using hashes here.

File details

Details for the file poouli-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: poouli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for poouli-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 faa13fa665817063f4ac2da6e5ddfec07321bbe8dee2e690c9bc5d93b11b7343
MD5 242059b650b418cccf194f4efb16c3ba
BLAKE2b-256 422756a9f9aec3f1d244898b21453ec23edcdf92acc4a20b638d8d46765b6c47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page