Skip to content

Instantly share code, notes, and snippets.

@vssun
Created September 8, 2011 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vssun/1203657 to your computer and use it in GitHub Desktop.
Save vssun/1203657 to your computer and use it in GitHub Desktop.
ഇല്ലാത്തിരുത്ത് വരുത്താൻ (മീഡിയാവിക്കി) - To make null edits (Mediawiki)
#!/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