cur.execute("delete from categories where title = '%s'" % title) cur.execute("delete from participants where title = '%s'" % title) cur.execute("delete from reports where title = '%s'" % title) conn.commit() try: text = exp.get() except: #skip redirects print "is redirect." continue if "[[Category:Retro meetup]]" in text: print "is retro." continue if "[[Category:Not reached - Did not attempt]]" in text: print "was not attempted." continue if "[[Category:Expedition planning]]" in text: print "is planning." continue cur.execute("insert into reports values ('%s', '%s')" % (title.replace("'", "''"), text.replace("'", "''"))) conn.commit() print "inserted", title meta = Category(site, subcat) recurseCategory(meta)
def __init__(self): self.site = pywikibot.Site("en", "wikipedia") self.categories = [ Category(self.site, "Category:Pages with citations having wikilinks embedded in URL titles"), ] self.doTaskPage = pywikibot.Page(self.site, 'User:Hazard-Bot/DoTask/21')
last.append(best) resorted.append(best) places.remove(best) if len(last)>10: last.pop(0) return resorted graticules = GraticuleDatabase() def gratName(place): lat, lon = place.split(" ") return graticules.getLatLon(lat, lon)[0] site = wikipedia.getSite() meta = Category(site, "Category:Meetup by location") locations = meta.subcategories() data = [] try: data = load("meetupchart.data") pass except: print "No meetup chart data is available. We'll have to fetch everything from the wiki. This will take a good while." pass # these are the ones we can't fix currently addfails = [("John", "2008-06-07", "30 -84")] skipfails = [("NWoodruff", "2009-08-31", "50 11"), ("archchancellor", "2008-06-01", "37 -121"), ("Tom Wuttke", "2008-06-16", "37 -122"),