Bot that fixes wrongly formatted dates in citation templates at Norwegian Bokmål Wikipedia
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cs1cleanup
tests
.gitignore
.travis.yml
README.rst
config.dist.json
pytest.ini
requirements-test.txt
run.py
setup.py
tool-labs.crontab
tool-labs.sh

README.rst

https://travis-ci.org/danmichaelo/wikipedia-datofeil.svg?branch=master

Bot that tries to fix wrongly formatted dates in citation templates at Norwegian Bokmål Wikipedia. It uses mwclient with mwtemplates for parsing and editing the templates.

A list of changes done by the bot can be found here:

https://no.wikipedia.org/wiki/Bruker:DanmicholoBot/Datofikslogg

Install:

virtualenv --python=/usr/bin/python3 ENV
. ENV/bin/activate
pip install -e .
cp config.dist.json config.json

Crontab:

crontab tool-labs.crontab

Add your Wikimedia credentials to config.json and run python run.py

Run tests:

py.test

Examples:

  • [[30.8.09]]30.8.2009
  • dato=28.mai, år=2009dato=28. mai 2009
  • Januari 2, 2009dato=2. januar 2009
  • 2. sep 2009]dato=2. september 2009
  • 7-2-20087.2.2008
  • 15, marts 201015. mars 2010
  • July–September 1986juli–september 1986
  • 23-29. februar 200823.–29. februar 2008 (manglende punktum, og bindestrek — tankestrek)
  • 6AUG20126. august 2012