Revision: 8456 Author: xqt Date: 2010-08-25 11:26:47 +0000 (Wed, 25 Aug 2010)
Log Message: ----------- place templates on top of interwiki links per default since interwiki.py could not handle placing -side and I heard from some trouble while placing next o the corresponding link.
Modified Paths: -------------- trunk/pywikipedia/featured.py
Modified: trunk/pywikipedia/featured.py =================================================================== --- trunk/pywikipedia/featured.py 2010-08-25 06:01:46 UTC (rev 8455) +++ trunk/pywikipedia/featured.py 2010-08-25 11:26:47 UTC (rev 8456) @@ -15,9 +15,9 @@
-after:zzzz process pages after and including page zzzz
--top use -top if you want to move all {{Link FA|lang}} to the top - of the interwiki links. Default is placing {{Link FA|lang}} - next to the corresponding interwiki link. +-side use -side if you want to move all {{Link FA|lang}} next to the + corresponding interwiki links. Default is placing + {{Link FA|lang}} on top of the interwiki links.
-count Only counts how many featured/good articles exist on all wikis (given with the "-fromlang" argument) or @@ -30,7 +30,8 @@
-good use this script for good articles.
--former use this script for removing {{Link FA|xx}} from former fearured articles +-former use this script for removing {{Link FA|xx}} from former + fearured articles
-quiet no corresponding pages are displayed.
@@ -261,7 +262,7 @@ 'kn': (BACK,u"ವಿಶೇಷ ಲೇಖನ"), 'ko': (CAT, u"알찬 글"), 'ksh':(CAT, u"Exzälenter Aatikkel"), - 'kv': (CAT, u"Википедия:Бур гижӧдъяс"), + 'kv': (CAT, u"Википедия:Бур гижӧдъяс"), 'la': (CAT, u"Paginae mensis"), 'li': (CAT, u"Wikipedia:Sjterartikele"), 'lmo':(CAT, u"Articol ben faa"), @@ -488,19 +489,13 @@ templates+= template_good['_default'] except KeyError: templates = template_good['_default'] - elif pType == 'former': - try: - templates = template[lang] - templates+= template['_default'] - except KeyError: - templates = template['_default'] elif pType == 'list': try: templates = template_lists[lang] templatest+= template_lists['_default'] except KeyError: templates = template_lists['_default'] - else: + else: #pType in ['former', 'featured'] try: templates = template[lang] templates+= template['_default'] @@ -610,11 +605,9 @@ cc[a.title()]=atrans.title() except wikipedia.PageNotSaved, e: wikipedia.output(u"Page not saved") -
- if __name__=="__main__": - template_on_top = False + template_on_top = True featuredcount = False fromlang=[] processType = 'featured' @@ -634,8 +627,8 @@ doAll = True elif arg.startswith('-after:'): afterpage=arg[7:] - elif arg == '-top': - template_on_top = True + elif arg == '-side': + template_on_top = False elif arg == '-count': featuredcount = True elif arg == '-good':
pywikipedia-svn@lists.wikimedia.org