Version 1.3

Unreleased (changes)

  • SQL database:
    • Implemented a subset of MediaWiki API querie. Lists: allpages, alldeletedrevisions, allrevisions, logevents, protectedtitles, recentchanges; props: deletedrevisions, revisions, pageprops, info; including generator, titles and pageids parameters. See the GitHub issue for more information:
    • Implemented synchronization of the latest revisions contents.
    • Fixed many bugs in the synchronization process.
  • Removed ws.cache.LatestRevisions module. Scripts use the SQL database for caching.
  • Merged several smaller scripts into
  • Implemented the ws.client.api.API.move() method to rename pages on the wiki.
  • Implemented recursive template expansion using mwparserfromhell and the SQL database. See ws.parser_helpers.wikicode.expand_templates().

Version 1.2

Released December 31, 2017 (changes)

  • Large refactoring: ws.core renamed to ws.client, created ws.utils, ws.statistics, ws.interlanguage
  • Added, ws.client.user and ws.client.redirects modules, ws.client.api.API has attributes with the appropriate instances for the current wiki.
  • Improved parsing of page titles – fixed many bugs, extended test suite, added checking of legal characters, handling of namespace aliases.
  • Added ws.autopage submodule.
  • Switched from nose to pytest for testing.
  • Added ws.db module for the synchronization of a remote wiki into a local PostgreSQL database. See the GitHub issue for more information: This also means multiple new dependencies, see the README file for details.
  • Transparent automatic conversion of timestamp strings into the Python’s datetime.datetime objects. As a result, manual calls to the ws.utils.parse_date() and ws.utils.format_date() functions should not be necessary when working with the API.

Version 1.1

Released March 6, 2016 (changes)

  • Fixed handling of csrftoken, it is now cached and automatically renewed as indicated by the server responses.
  • Partial interlanguage support for localized templates “Broken package link” and “aur-mirror” are respected.
  • Added the ws.parser_helpers.title module for parsing titles into (iwprefix, namespace, pagename, sectionname) and easy manipulation with the parts.
  • Removed ws.core.api.API.detect_namespace() in favour of the new Title parser.
  • Improved exception logging in API.edit(). Both ws.core.api.API.edit() and ws.interactive.edit_interactive() now take an additional title parameter representing the title of the page being edited.
  • Added support for WikEdDiff, an inline-style diff engine with block move support and splitting optimized for MediaWiki markup. pygments is now used only as a fallback.
  • The script has been improved to consider the DISPLAYTITLE property of pages and links to sections are checked base on the sections existing on the target page.
  • Added --connection-max-retries and --connection-timeout options.
  • Added script to update the “Table of contents” page on the wiki.

Version 1.0

Released August 19, 2015 (changes)

  • Major reorganization of the project structure: common code shared between the scripts has been moved to the ws module and the original MediaWiki module has been renamed to ws.core, some of its parts were moved directly to ws.
  • Reorganization of the ws.parser_helpers submodule, added ws.parser_helpers.encodings.
  • Expanded documentation, fixed many typos in docstrings.
  • Expanded test suite, at least for parts not depending on the MediaWiki API.
  • Generalized the ws.core.connection.Connection class to handle also the index.php entry point.
  • Created the ws.core.lazy.LazyProperty decorator and made ws.core.api.API.is_loggedin, ws.core.api.API.user_rights and ws.core.api.API.namespaces proper properties.
  • Started using the logging module for messages.
  • New unified configuration interface for all scripts, using the ws.config submodule. See Configuration for details.
    • Basically all scripts were modified to use the ws.config interface.
    • Default cookie path was changed from $XDG_CACHE_HOME to $XDG_CACHE_HOME/wiki-scripts.
    • Some command line arguments were renamed because of global configuration in a config file.
  • Added also assert=bot to all bot editing queries.
  • Fixed bugs:
    • formatting of streak timestamps in the script
    • namespace prefix parsing in ws.core.api.API.detect_namespace()
    • extraction of header elements in case they are nested inside e.g. <noinclude> tags
    • whitespace squashing in the ws.parser_helpers.wikicode.remove_and_squash() function
    • query-continuation algorithm (used to fail with generator queries with multiple values in the prop query parameter)
    • JSON serialization of non-str keys
    • exception catching for opening cookies
  • Improved scripts:
    • (minor bug fixes)
    • (heavy refactoring)
    • (warn if user pages are categorized)
    • (improved detection of redirects with broken fragments by comparing dot-encoded fragments)
    • (deduplicated against ws.core.connection.Connection)
  • New scripts: