These are *my own* lines (czech spelling) in one part:
def validXhtml(self, text): text = pywikibot.replaceExcept(text, r'(?i)<br[ /]*>', r'<br />', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, r'<br/>', r'<br />', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, r'<br>', r'<br />', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, r'</br>', r'<br />', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, r'<\br>', r'<br />', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, r'{{DEFAULTSORT: ', r'{{DEFAULTSORT:', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u' m. n. m.', u' m n. m.', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'ceřinn', u'ceřin', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'newyork', u'newyor', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'vikings', u'vikins', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'vikingš', u'vikinš', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'motlit', u'modlit', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'terciální', u'terciární', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'vymítit', u'vymýtit', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u' viz.', u' viz', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u'<references/>', u'<references />', ['comment', 'math', 'nowiki', 'pre']) return text
All lines works ok, but these two with dots are problematic.
2011/8/18 Alaric Favier mystou@gmail.com:
When i try $ python cosmetic_changes.py -lang:cs -page:"Ferrari FF" this return "No changes were necessary in Ferrari FF"
Are you sure your pywikipedia is up to date ?
Alaric FAVIER
2011/8/18 Jan Dudík jan.dudik@gmail.com
in my cosmetic_changes.py I have following lines:
text = pywikibot.replaceExcept(text, u' m. n. m.', u' m n. m.', ['comment', 'math', 'nowiki', 'pre']) text = pywikibot.replaceExcept(text, u' viz.', u' viz', ['comment', 'math', 'nowiki', 'pre'])
I think, that r in the beginning means regular expression, but u means simple text. But bot takes dot like any character, so i got e.g.
revize ->reviz má na mále -> m na mále
http://cs.wikipedia.org/w/index.php?title=Ferrari_FF&action=historysubmi...
How to channge it to correct output?
JAnD
-- Ing. Jan Dudík
Pywikipedia-l mailing list Pywikipedia-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l