Revision: 4263 Author: wikipedian Date: 2007-09-13 08:46:41 +0000 (Thu, 13 Sep 2007)
Log Message: ----------- added 'isbn' fix
Modified Paths: -------------- trunk/pywikipedia/fixes.py
Modified: trunk/pywikipedia/fixes.py =================================================================== --- trunk/pywikipedia/fixes.py 2007-09-13 08:46:31 UTC (rev 4262) +++ trunk/pywikipedia/fixes.py 2007-09-13 08:46:41 UTC (rev 4263) @@ -262,6 +262,19 @@ u'[[17. Juni 1953]]', u'[[11. September 2001]]', ] - }, + 'isbn': { + 'regex': True, + 'msg': { + 'de': u'Bot: Korrigiere ISBN-Format', + 'en': u'Robot: Fixing ISBN format', + }, + 'replacements': [ + (r'ISBN (\d+) (\d+) (\d+) (\d+) (\d)', r'ISBN \1-\2-\3-\4-\5'), # missing hyphens in ISBN13 + (r'ISBN (\d+) (\d+) (\d+) (\d|X|x)', r'ISBN \1-\2-\3-\4'), # missing hyphens in ISBN10 + (ur'ISBN (\d+)–(\d+)–(\d+)–(\d+)–(\d)', r'ISBN \1-\2-\3-\4-\5'), # dashes instead of hyphens in ISBN13 + (ur'ISBN (\d+)–(\d+)–(\d+)–(\d|X|x)', r'ISBN \1-\2-\3-\4'), # dashes instead of hyphens in ISBN10 + (r'ISBN: (\d+)', r'ISBN \1'), # colon + ], + }, }