<span class="mw-page-title-main">Llw2lw</span>
Fabrice P. Lauss𝕪's Web

llw2lw

llw2lw (local-laussywiki to laussywiki) is a python script to export to my online laussy.org mediawiki web, changes made on my local copy. I.e., this synchronizes the master copy with its public version. This is not to be confused with syncy which does the opposite but for public 𝕐-tweets (yeets) instead (and only), since by the nature of this snapshoting-of-my-mind tool, I sometime have to yeet online.

A log is kept in ~/comp/lw/llw2lw-log.txt.

Other comparisons can be made through the MediaWiki API in case one suspects this script has not been faithfully importing everything.

Versions

Todo

  • Blogs should be treated specially as not all pages get exported (for unknown reasons).
  • The update should take into account the time of day too, in addition to the calendar date itself. 1.6.0.
  • The date of page creation and modification should be fixed.

Usage

  1. Run llw2lw --doit (run in dry-mode first, maybe).
  2. Use Special:Import with interwiki prefix llw, Assign edits ticked.
  3. Upload files (if any) with Special:BatchUpload.
laussy@azag:~$ ./llw2lw --help
Usage: ./llw2lw.py [--doit] [--verbose] [--no-export=<title1>,<title2>,...] [--help]
Export recent changes from a local MediaWiki to an XML file and download associated files.

Options:
  --doit                Write XML file, download files to FilesToUpload/, and update log file.
  --verbose             Enable debug output to console and llw2lw-debug.log.
  --no-export=<titles>  Comma-separated list of page/file titles to exclude 
                        (e.g., Test4,Template:Test,File:Screenshot_20250717_222636.png).
                        Note: Spaces and underscores in titles are interchangeable.
  --help                Show this help message and exit.

The script prompts for a start date (YYYY-MM-DD). Defaults to the LAST UPDATE date
from ~/comp/lw/llw2lw-log.txt, or yesterday if the log file is missing.