Feature Requests item #1777751, was opened at 2007-08-20 09:17
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1777751&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py in categories
Initial Comment:
It would be helpful to add functionality to interwiki.py to work with categories and subcategories, not just with articles contained within, i.e. to treat category pages as they were normal articles. Additional key to existing -cat option or whatever, please.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2007-08-20 14:33
Message:
Logged In: NO
You can already work on categories interwiki. For example : python
interwiki.py -start:Category:Spain
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1777751&group_…
Feature Requests item #1777751, was opened at 2007-08-20 09:17
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1777751&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: interwiki.py in categories
Initial Comment:
It would be helpful to add functionality to interwiki.py to work with categories and subcategories, not just with articles contained within, i.e. to treat category pages as they were normal articles. Additional key to existing -cat option or whatever, please.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1777751&group_…
Revision: 4079
Author: misza13
Date: 2007-08-19 20:29:42 +0000 (Sun, 19 Aug 2007)
Log Message:
-----------
If signature filename is not specified, raise an exception rather than exit() abruptly.
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2007-08-19 19:57:38 UTC (rev 4078)
+++ trunk/pywikipedia/welcome.py 2007-08-19 20:29:42 UTC (rev 4079)
@@ -318,6 +318,9 @@
############################################################################
############################################################################
+class FilenameNotSet(wikipedia.Error):
+ """An exception indicating that a signature filename was not specifed."""
+
# Function stolen from wikipedia.py and modified
def urlname(talk_page, site):
"""The name of the page this Page refers to, in a form suitable
@@ -446,7 +449,7 @@
else:
if fileSignName == None:
wikipedia.output(u'Error! - No fileName!')
- exit()
+ raise FilenameNotSet("No signature filename specified.")
try:
f = codecs.open(wikipediatools.absoluteFilename(fileSignName), 'r', encoding = config.console_encoding)
except:
Revision: 4078
Author: misza13
Date: 2007-08-19 19:57:38 +0000 (Sun, 19 Aug 2007)
Log Message:
-----------
Fix by Filnik (slightly modified) - exit() if no fileName specified.
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2007-08-19 16:02:25 UTC (rev 4077)
+++ trunk/pywikipedia/welcome.py 2007-08-19 19:57:38 UTC (rev 4078)
@@ -178,6 +178,7 @@
savedata = False # should save the signature index or not
filename = 'welcome.data' # file where is stored the random signature index
fileOption = False # check if the user wants to use a file or the wikipage
+fileSignName = None # File name, default: None
# Script users the class wikipedia.translate() to find the right
# page/user/summary/etc so the need to specify language and project have
@@ -435,7 +436,7 @@
else:
return True
-def defineSign(wsite, signPageTitle, fileSignName, fileOption = False):
+def defineSign(wsite, signPageTitle, fileSignName = None, fileOption = False):
#A little function to load the random signatures.
reg = r"^\* ?(.*?)$"
creg = re.compile(reg, re.M)
@@ -443,6 +444,9 @@
signPage = wikipedia.Page(wsite, signPageTitle)
signText = signPage.get()
else:
+ if fileSignName == None:
+ wikipedia.output(u'Error! - No fileName!')
+ exit()
try:
f = codecs.open(wikipediatools.absoluteFilename(fileSignName), 'r', encoding = config.console_encoding)
except:
Revision: 4077
Author: misza13
Date: 2007-08-19 16:02:25 +0000 (Sun, 19 Aug 2007)
Log Message:
-----------
fix bug that would cause the bot to discard remaining threads on a page with only few threads left (introduced in yesterday's updates)
Modified Paths:
--------------
trunk/pywikipedia/archivebot.py
Modified: trunk/pywikipedia/archivebot.py
===================================================================
--- trunk/pywikipedia/archivebot.py 2007-08-19 13:25:51 UTC (rev 4076)
+++ trunk/pywikipedia/archivebot.py 2007-08-19 16:02:25 UTC (rev 4077)
@@ -326,7 +326,8 @@
whys = []
for t in oldthreads:
if len(oldthreads) - self.archivedThreads <= int(self.get('minthreadsleft',5)):
- break #Because there's too little threads left.
+ self.Page.threads.append(t)
+ continue #Because there's too little threads left.
#TODO: Make an option so that unstamped (unsigned) posts get archived.
why = t.shouldBeArchived(self)
if why:
Bugs item #1777175, was opened at 2007-08-19 11:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1777175&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Falk Steinhauer (falk_steinhauer)
Assigned to: Nobody/Anonymous (nobody)
Summary: Bug in wikipedia.py and corresponding fix
Initial Comment:
I am using snapshot 2007-06-19.
There is a bug in wikipedia.py. Function setSite() is just setting local variables, that are never used again.
Original:
def setSite(site):
default_code = site.language
default_family = site.family
I think it should affect the global variables with the same name (that's what I need in a script that should work on several different wikis and compare their contents).
In addtion default_code is a string, not a function-object. So my fixed version of setSite() looks as follows:
def setSite(site):
global default_code, default_family
default_code = site.language()
default_family = site.family
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1777175&group_…