Convert <figure> and <xr> tags from deprecated MediaWiki extension to a new supported format.
Project description
RegiSoup: Just Reg(Ex)ular and Beautiful Soup
A tool to convert <figure> and <xr> tags from deprecated MediaWiki extension to a new supported format as specified in the extension Figures available on:
https://www.mediawiki.org/wiki/Extension:Figures.
It was developed to mass modify pages via modifying the Wiki's .xml dump but it turns out that that is not a viable approach since <text> blocks inside the
.xml dump are hashed with sha1 and additionally have a size in bytes specified. It was simpler to create a MediaWiki API wrapper for RegiSoup so the original use case
for RegiSoup has translated StewChef but RegiSoup remains a standalone package.
Usage:
Usage of RegiSoup is simple and easy. If at any point in time, you need a reminder of what anything means do not forget about:
regisoup --help
where a lot of information about the tool is gathered. Basic usage is as follows:
regisoup [input_file] [output_file]
RegiSoup should find and replace all <figure> and <xr> tags inside the input page. All the required information for the replacement MediaWiki parser functions is extracted from the existing tags or RegiSoup at least attempts to do so. One of the issues you may commonly run into is pages not specifying which page they are referencing. This can be quickly fixed by supplying the extra field for page title. For example:
regisoup [input_file] [output_file] 'Some Page Title'
Note the use of quotation marks! Another issue you can run into is captions being improperly specified. By default RegiSoup uses captions to generate the replacement parser functions. You can override this by supplying --no-caption. Some Wiki pages contain unescaped HTML characters, RegiSoup gets around this by doing a bit of encoding "magic". If this produces undesirable results you can try and supply the --no-magic flag and see if that works out better. Additionally for debugging support RegiSoup can be forced to not delete it's temporary files with --no-clean-up and be made more verbose with --verbose.
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 regisoup-0.1.9.tar.gz.
File metadata
- Download URL: regisoup-0.1.9.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.11.2 Linux/6.2.8-200.fc37.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec060e1b0425f13e4977a1aa8929412a9f6f97b2d2083ad13242bd06973e1c7f
|
|
| MD5 |
0f3bd7edb375610e54df2f08b089e966
|
|
| BLAKE2b-256 |
3680b5ce65a1adaecbba3e326f79c58e776bba6a266a86be5d02b2e44497f167
|
File details
Details for the file regisoup-0.1.9-py3-none-any.whl.
File metadata
- Download URL: regisoup-0.1.9-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.1 CPython/3.11.2 Linux/6.2.8-200.fc37.x86_64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f69e9c2bf7d1446408a78b7f4f1c29390abddab6d941e05930705393d21b4f6
|
|
| MD5 |
b8d020cdf0204be974b49f4eee11413e
|
|
| BLAKE2b-256 |
3984f89f2828506569348fddf12d6465bc3b5dd8fe80763d3f10df1799527395
|