Revision: 8460
Author: purodha
Date: 2010-08-26 10:54:49 +0000 (Thu, 26 Aug 2010)
Log Message:
-----------
version.py was looking in wrong directory for .svn/entries
which only exists in the program source directory, if at all.
Was searching in the data directory given by the -dir: parameter.
Corrected.
Modified Paths:
--------------
trunk/pywikipedia/version.py
Modified: trunk/pywikipedia/version.py
===================================================================
--- trunk/pywikipedia/version.py 2010-08-26 10:50:35 UTC (rev 8459)
+++ trunk/pywikipedia/version.py 2010-08-26 10:54:49 UTC (rev 8460)
@@ -9,7 +9,6 @@
import os
import time
import sys
-import wikipediatools
import config
cache = None
@@ -47,7 +46,10 @@
return cache
def getversion_svn():
- entries = open(os.path.join(wikipediatools.get_base_dir(), '.svn/entries'))
+ _program_dir = os.path.normpath(os.path.dirname(sys.argv[0]))
+# if not os.path.isabs(_program_dir):
+# _program_dir = os.path.normpath(os.path.join(os.getcwd(), _program_dir))
+ entries = open(os.path.join(_program_dir, '.svn/entries'))
for i in range(4):
entries.readline()
tag = entries.readline().strip()
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':