వాడుకరి:Vyzbot/Villagepages.py: కూర్పుల మధ్య తేడాలు
Content deleted Content added
దిద్దుబాటు సారాంశం లేదు |
దిద్దుబాటు సారాంశం లేదు |
||
పంక్తి 4:
"""this is Vyzbot.
"""
import wikipedia, pagegenerators, catlib
import
#login
Line 43 ⟶ 42:
mandalcounter=1
for page in gen:
if
mandalname = page.title()
text = []
Line 49 ⟶ 48:
print text
findpage(text)
Line 61 ⟶ 60:
while lines and not lines[0]: del lines[0] #removing empty lines on top
while lines and not lines[-1]: del lines[-1] #removing empty lines at the bottom
lines = [
#not creating village page for mandalname and removing (mandal) from names
for counter
if "(" in line: lines[counter] = lines[counter].split('(')[0]
if line == mandalname : del lines[counter]
lines = [(u"begin '''"+line+u"''', [["+district_name+u"]] జిల్లా, [["+mandalname+u"]] మండలానికి చెందిన గ్రామము.\n[[వర్గం:"+district_name+u" జిల్లా గ్రామాలు]]\n{{end}} ") for line in lines]
villages = ''.join(
return villages
Line 99 ⟶ 96:
if append == "Top":
old_text = page.get(get_redirect=True)
commenttext_top = commenttext + " - " + msg_top
wikipedia.output(u"Page %s already exists, appending on top!"%title)
Line 121 ⟶ 118:
def main():
getmandals()
|