https://github.com/danmichaelo/wikipedia-cs1cleanup
Bot that fixes wrongly formatted dates in citation templates at Norwegian Bokmål Wikipedia
https://github.com/danmichaelo/wikipedia-cs1cleanup
Last synced: about 1 year ago
JSON representation
Bot that fixes wrongly formatted dates in citation templates at Norwegian Bokmål Wikipedia
- Host: GitHub
- URL: https://github.com/danmichaelo/wikipedia-cs1cleanup
- Owner: danmichaelo
- Created: 2014-08-01T10:41:40.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2021-02-08T22:41:48.000Z (over 5 years ago)
- Last Synced: 2025-06-20T14:02:27.743Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
.. image:: https://travis-ci.org/danmichaelo/wikipedia-datofeil.svg?branch=master
:target: https://travis-ci.org/danmichaelo/wikipedia-datofeil
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=2009`` → ``dato=28. mai 2009``
* ``Januari 2, 2009`` → ``dato=2. januar 2009``
* ``2. sep 2009]`` → ``dato=2. september 2009``
* ``7-2-2008`` → ``7.2.2008``
* ``15, marts 2010`` → ``15. mars 2010``
* ``July–September 1986`` → ``juli–september 1986``
* ``23-29. februar 2008`` → ``23.–29. februar 2008`` (manglende punktum, og bindestrek — tankestrek)
* ``6AUG2012`` → ``6. august 2012``