Skip to content

Instantly share code, notes, and snippets.

@vssun
Created February 20, 2012 04:16
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/1867818 to your computer and use it in GitHub Desktop.
Save vssun/1867818 to your computer and use it in GitHub Desktop.
ഉപതാളുകളിലെ തിരുത്തലുകളുടെ എണ്ണത്തിനനുസരിച്ച് ഒരു പട്ടികയുണ്ടാക്കാൻ (പ്രത്യേകിച്ചും, ഒറ്റത്തിരുത്ത് മാത്രം വന്ന താളുകളെ കണ്ടെത്താൻ)
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
ഉപതാളുകളിലെ തിരുത്തലുകളുടെ എണ്ണത്തിനനുസരിച്ച് ഒരു പട്ടികയുണ്ടാക്കാൻ (പ്രത്യേകിച്ചും, ഒറ്റത്തിരുത്ത് മാത്രം വന്ന താളുകളെ കണ്ടെത്താൻ)
നിർമ്മിച്ചത്: സുനിൽ വി.എസ്.,
തിയതി: 2012-02-20
ശ്രദ്ധിക്കുക: ഫലം സ്ക്രീനിൽത്തന്നെയാണ് കിട്ടുക
"""
import wikipedia
import pagegenerators
#import catlib
#പ്രധാന പ്രോഗ്രാം ഇവിടെ തുടങ്ങുന്നു.
#ആവശ്യത്തിനനുസരിച്ച് മാറ്റങ്ങൾ ഇതിനു താഴെ വരുത്തുക
siteFamily = 'wikisource'
siteLangCode = 'ml'
workingPage = u'താൾ:Dharmaraja.djvu' #ഏതുതാളിന്റെ ഉപതാളുകൾ നോക്കണം?
numberOfRevisions = 1 #എത്ര തിരുത്തുള്ള താളുകൾ‌ മാത്രം
#ആവശ്യത്തിനനുസരിച്ച് മാറ്റങ്ങൾ ഇതിനു മുകളിൽ വരുത്തുക
wikiSite = wikipedia.Site(code=siteLangCode, fam=siteFamily)
myText=u""
for myPage in pagegenerators.PrefixingPageGenerator(workingPage+"/"):
myLength=len(myPage.getVersionHistory(revCount=5000))
if myLength==numberOfRevisions:
myText=myText+ myPage.title()+"\n"
wikipedia.output(myText)
wikipedia.stopme()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment