Revision: 8356 Author: multichill Date: 2010-07-13 18:25:51 +0000 (Tue, 13 Jul 2010)
Log Message: ----------- Fix regexes, now also works on PD-self without a date.
Modified Paths: -------------- trunk/pywikipedia/imagecopy_enwp.py
Modified: trunk/pywikipedia/imagecopy_enwp.py =================================================================== --- trunk/pywikipedia/imagecopy_enwp.py 2010-07-12 17:38:30 UTC (rev 8355) +++ trunk/pywikipedia/imagecopy_enwp.py 2010-07-13 18:25:51 UTC (rev 8356) @@ -115,9 +115,9 @@ licenseTemplates = [(u'{{(self|self2)|([^}]+)}}', u'{{Self|\2|author=[[:%(lang)s:User:%(author)s|%(author)s]] at [http://%(lang)s.%(family)s.org %(lang)s.%(family)s]}}'), (u'{{(GFDL-self|GFDL-self-no-disclaimers)|([^}]+)}}', u'{{Self|GFDL|\2|author=[[:%(lang)s:User:%(author)s|%(author)s]] at [http://%(lang)s.%(family)s.org %(lang)s.%(family)s]}}'), (u'{{GFDL-self-with-disclaimers|([^}]+)}}', u'{{Self|GFDL-with-disclaimers|\1|author=[[:%(lang)s:User:%(author)s|%(author)s]] at [http://%(lang)s.%(family)s.org %(lang)s.%(family)s]}}'), - (u'{{PD-self(|date=[^}]+)}}', u'{{PD-user-w|%(lang)s|%(family)s|%(author)s}}'), + (u'{{PD-self(|date=[^}]+)?}}', u'{{PD-user-w|%(lang)s|%(family)s|%(author)s}}'), #Multilicense replacing placeholder - (u'{{Multilicense replacing placeholder new(|class=[^}]+)}}', u'{{Self|GFDL|Cc-by-sa-3.0,2.5,2.0,1.0|author=[[:%(lang)s:User:%(author)s|%(author)s]] at [http://%(lang)s.%(family)s.org %(lang)s.%(family)s]}}'), + (u'{{Multilicense replacing placeholder new(|class=[^}]+)?}}', u'{{Self|GFDL|Cc-by-sa-3.0,2.5,2.0,1.0|author=[[:%(lang)s:User:%(author)s|%(author)s]] at [http://%(lang)s.%(family)s.org %(lang)s.%(family)s]}}'), ]
sourceGarbage = [u'== Summary ==',
pywikipedia-svn@lists.wikimedia.org