Created
September 8, 2011 15:20
-
-
Save vssun/1203657 to your computer and use it in GitHub Desktop.
ഇല്ലാത്തിരുത്ത് വരുത്താൻ (മീഡിയാവിക്കി) - To make null edits (Mediawiki)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
നൾ എഡിറ്റുകൾ ചെയ്യാൻ | |
നിർമ്മിച്ചത്: സുനിൽ വി.എസ്. | |
തിയതി: 2011-09-01 | |
അവസാനം തിരുത്തിയത്: 2011-09-0 | |
""" | |
import wikipedia | |
import pagegenerators | |
import pywikibot | |
#പ്രധാന പ്രോഗ്രാം ഇവിടെ തുടങ്ങുന്നു. | |
#ആവശ്യത്തിനനുസരിച്ച് മാറ്റങ്ങൾ ഇതിനു താഴെ വരുത്തുക | |
siteFamily = 'wiktionary' | |
siteLangCode = 'ml' | |
startingPage = ur'!' #ഏതു താളിൽ പണിയാരംഭിക്കണം? | |
editSummary = ur"ചില്ലുകളും മറ്റും ശരിയാക്കുന്നതിനുള്ള ഇല്ലാത്തിരുത്ത്" | |
#ആവശ്യത്തിനനുസരിച്ച് മാറ്റങ്ങൾ ഇതിനു മുകളിൽ വരുത്തുക | |
wikiSite = wikipedia.Site(code=siteLangCode, fam=siteFamily) | |
for myNamespace in (5,6,7,9,10,11,12,13,14,15): #ആവശ്യമുള്ള നാമമേഖലകൾ ഇവിടെക്കൊടുക്കുക | |
wikipedia.output("Running on namespace " + str(myNamespace)) | |
for myPage in pagegenerators.AllpagesPageGenerator(start=startingPage,namespace=myNamespace): | |
wikipedia.output(myPage.title()) | |
try: | |
myPage.put(myPage.get(get_redirect=True),comment=editSummary) | |
except (pywikibot.NoUsername, pywikibot.LockedPage): | |
wikipedia.output("Sysop access is required to edit this page") | |
wikipedia.stopme() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment