Revision: 7491 Author: alexsh Date: 2009-10-17 17:51:49 +0000 (Sat, 17 Oct 2009)
Log Message: ----------- main().takesettings(): make regex to view easy
Modified Paths: -------------- trunk/pywikipedia/checkimages.py
Modified: trunk/pywikipedia/checkimages.py =================================================================== --- trunk/pywikipedia/checkimages.py 2009-10-17 16:26:48 UTC (rev 7490) +++ trunk/pywikipedia/checkimages.py 2009-10-17 17:51:49 UTC (rev 7491) @@ -649,7 +649,7 @@ # You can use this function also to find only the user that # has upload the image (FixME: Rewrite a bit this part) if put: - reportPageObject.put(reportPageText + self.newtext, comment = self.commImage, minorEdit = True) + reportPageObject.put(reportPageText + self.newtext, comment = self.commImage) # paginetta it's the image page object. try: if reportPageObject == self.image and self.uploader: @@ -1058,8 +1058,14 @@ self.settingsData = list() try: testo = wikiPage.get() - rxp = r"<------- ------->\n*[Nn]ame ?= ?['"](.*?)['"]\n*([Ff]ind|[Ff]indonly)=(.*?)\n*[Ii]magechanges=(.*?)\n*[Ss]ummary=['"](.*?)['"]\n*[Hh]ead=['"](.*?)['"]\n*[Tt]ext ?= ?['"](.*?)['"]\n*[Mm]ex ?= ?['"]?([^\n]*?)['"]?\n" - r = re.compile(rxp, re.UNICODE|re.DOTALL) + r = re.compile(r"<------- ------->\n" + "*[Nn]ame ?= ?['"](.*?)['"]\n" + "*([Ff]ind|[Ff]indonly)=(.*?)\n" + "*[Ii]magechanges=(.*?)\n" + "*[Ss]ummary=['"](.*?)['"]\n" + "*[Hh]ead=['"](.*?)['"]\n" + "*[Tt]ext ?= ?['"](.*?)['"]\n" + "*[Mm]ex ?= ?['"]?([^\n]*?)['"]?\n", re.UNICODE|re.DOTALL) number = 1
for m in r.finditer(testo):
pywikipedia-svn@lists.wikimedia.org