Bugs item #1797503, was opened at 2007-09-19 00:05
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=1797503&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: DarkoNeko (darkoneko)
Assigned to: Nobody/Anonymous (nobody)
Summary: category.py
Initial Comment:
evt : cmd.exe on windows XP family edition
command used :
C:\Program Files\TortoiseSVN\pywikipedia>python category.py move -from:"Cumuni di Sicilia" -to:"Cumuna di Sicilia" -lang:co
error message :
There are more articles in Category:Cumuni di Sicilia.
Getting [[Category:Cumuni di Sicilia]] starting at Mistirjancu" class="new...
Changing page [[co:Longi]]
WARNING: No character set found.
Category page detection is not bug free. Please report this error!
substring not found
Changing page [[co:Lucca Sicula]]
(a few other pages)
Changing page [[co:Marineu]]
Getting [[Category:Cumuni di Sicilia]]...
There are more articles in Category:Cumuni di Sicilia.
Getting [[Category:Cumuni di Sicilia]] starting at Vita+%28Sicilia%29" class="ne
w...
WARNING: No character set found.
Category page detection is not bug free. Please report this error!
Dumping to category.dump.bz2, please wait...
Traceback (most recent call last):
File "category.py", line 832, in <module>
bot.run()
File "category.py", line 365, in run
subcategories = self.oldCat.subcategoriesList(recurse = False)
File "C:\Program Files\TortoiseSVN\pywikipedia\catlib.py", line 298, in subcat
egoriesList
for cat in self.subcategories(recurse):
File "C:\Program Files\TortoiseSVN\pywikipedia\catlib.py", line 284, in subcat
egories
for tag, subcat in self._getContentsAndSupercats(recurse):
File "C:\Program Files\TortoiseSVN\pywikipedia\catlib.py", line 124, in _getCo
ntentsAndSupercats
for tag, page in self._parseCategory(purge, startFrom):
File "C:\Program Files\TortoiseSVN\pywikipedia\catlib.py", line 204, in _parse
Category
ibegin = txt.index('<!-- start content -->') # does not work for cats withou
t text
ValueError: substring not found
apparently an error when recovering the page list.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1797503&group_…
Revision: 4323
Author: russblau
Date: 2007-09-18 19:51:42 +0000 (Tue, 18 Sep 2007)
Log Message:
-----------
clean up docstring; use shortpath
Modified Paths:
--------------
trunk/pywikipedia/category.py
Modified: trunk/pywikipedia/category.py
===================================================================
--- trunk/pywikipedia/category.py 2007-09-18 16:30:40 UTC (rev 4322)
+++ trunk/pywikipedia/category.py 2007-09-18 19:51:42 UTC (rev 4323)
@@ -6,12 +6,12 @@
Syntax: python category.py action [-option]
where action can be one of these:
- * add - mass-add a category to a list of pages
- * remove - remove category tag from all pages in a category
- * move - move all pages in a category to another category
- * tidy - tidy up a category by moving its articles into subcategories
- * tree - show a tree of subcategories of a given category
- * listify - make a list of all of the articles that are in a category
+ * add - mass-add a category to a list of pages
+ * remove - remove category tag from all pages in a category
+ * move - move all pages in a category to another category
+ * tidy - tidy up a category by moving its articles into subcategories
+ * tree - show a tree of subcategories of a given category
+ * listify - make a list of all of the articles that are in a category
and option can be one of these:
* -person - sort persons by their last name (for action 'add')
@@ -21,36 +21,40 @@
Also, the category to make a list of in the listify option
* -to: - The category to move to (for the move option)
- Also, the name of the list to make in the listify option
- NOTE: If the category names have spaces in them you may need to use a
- special syntax in your shell so that the names aren't treated as separate
- parameters. For instance, in BASH, use single quotes, e.g. -from:'Polar bears'
- * -batch - Don't prompt to delete emptied categories (do it automatically).
+ NOTE: If the category names have spaces in them you may need to use
+ a special syntax in your shell so that the names aren't treated as
+ separate parameters. For instance, in BASH, use single quotes,
+ e.g. -from:'Polar bears'
+ * -batch - Don't prompt to delete emptied categories (do it
+ automatically).
* -summary: - Pick a custom edit summary for the bot.
* -inplace - Use this flag to change categories in place rather than
rearranging them.
* -delsum - An option for remove, this specifies to use the custom edit
- summary as the deletion reason (rather than a canned deletion reason)
- * -overwrite - An option for listify, this overwrites the current page with the
- list even if something is already there.
- * -showimages - An option for listify, this displays images rather than linking them
- in the list.
- * -talkpages - An option for listify, this outputs the links to talk pages of the
- pages to be listified in addition to the pages themselves.
+ summary as the deletion reason (rather than a canned
+ deletion reason)
+ * -overwrite - An option for listify, this overwrites the current page with
+ the list even if something is already there.
+ * -showimages - An option for listify, this displays images rather than
+ linking them in the list.
+ * -talkpages - An option for listify, this outputs the links to talk pages
+ of the pages to be listified in addition to the pages
+ themselves.
* -recurse - Recurse through all subcategories of categories.
- * -match - Only work on pages whose titles match the given regex (for move and remove actions).
+ * -match - Only work on pages whose titles match the given regex (for
+ move and remove actions).
+For the actions tidy and tree, the bot will store the category structure
+locally in category.dump. This saves time and server load, but if it uses
+these data later, they may be outdated; use the -rebuild parameter in this
+case.
-For the actions tidy and tree, the bot will store the category structure locally
-in category.dump. This saves time and server load, but if it uses these data
-later, they may be outdated; use the -rebuild parameter in this case.
-
For example, to create a new category from a list of persons, type:
python category.py add -person
and follow the on-screen instructions.
-
Or to do it all from the command-line, use the following syntax:
python category.py move -from:US -to:'United States'
@@ -158,7 +162,8 @@
if not os.path.isabs(filename):
filename = wikipedia.datafilepath(filename)
f = bz2.BZ2File(filename, 'r')
- wikipedia.output(u'Reading dump from %s' % filename)
+ wikipedia.output(u'Reading dump from %s'
+ % wikipedia.shortpath(filename))
databases = pickle.load(f)
f.close()
# keys are categories, values are 2-tuples with lists as entries.
@@ -223,7 +228,8 @@
'''
if not os.path.isabs(filename):
filename = wikipedia.datafilepath(filename)
- wikipedia.output(u'Dumping to %s, please wait...' % filename)
+ wikipedia.output(u'Dumping to %s, please wait...'
+ % wikipedia.shortpath(filename))
f = bz2.BZ2File(filename, 'w')
databases = {
'catContentDB': self.catContentDB,
Bugs item #1797224, was opened at 2007-09-18 10:52
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=1797224&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: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: .categories()
Initial Comment:
This is the relevant part of code in Wikipedia.py, which gets the list of categories on a page:
catNamespace = '|'.join(site.category_namespaces())
R = re.compile(r'\[\[\s*(?P<namespace>%s)\s*:\s*(?P<catName>.+?)(?:\|(?P<sortKey>.+?))?\s*\]\]' % catNamespace)
for match in R.finditer(text):
cat = catlib.Category(site, '%s:%s' % (match.group('namespace'), match.group('catName')), sortKey = match.group('sortKey'))
result.append(cat)
return result
To me, it means it will also include those category commands that are inside <noinclude> or <nowiki> or are commented out (<!--) in the returned result, which should be fixed.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=1797224&group_…
Patches item #1796316, was opened at 2007-09-17 18:20
Message generated for change (Comment added) made by cosoleto
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1796316&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: Francesco Cosoleto (cosoleto)
Assigned to: Nobody/Anonymous (nobody)
Summary: upload.py, upload_image(), check length and resume feature
Initial Comment:
Untested.
----------------------------------------------------------------------
>Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-18 19:06
Message:
Logged In: YES
user_id=181280
Originator: YES
Updated. It seems work and more safe than previous code. Not fully tested
with real server.
File Added: upload.py.diff
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=1796316&group_…
Feature Requests item #1791272, was opened at 2007-09-09 22:32
Message generated for change (Settings changed) made by hooft
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1791272&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: Closed
Priority: 5
Private: No
Submitted By: lusum (lusum)
Assigned to: Nobody/Anonymous (nobody)
Summary: Version management in wikipedia.py
Initial Comment:
It should be fine for find easly copyright violation to explore the history of a page. It is possible to have the pare with wikipedia.get. It should be possible to have all the history of a page ( or a particular version ) in a list returned by a function wikipedia.getHistory?
----------------------------------------------------------------------
Comment By: lusum (lusum)
Date: 2007-09-18 08:27
Message:
Logged In: YES
user_id=642982
Originator: YES
Ok, it works, thanks, in my opinion this feature request is closed
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-17 17:04
Message:
Logged In: YES
user_id=181280
Originator: NO
Hey Lusum. You can use fullVersionHistory() to download history of a page
with page contents. Do you want bot build diffs data and send related
queries to search engine?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1791272&group_…
Feature Requests item #1791272, was opened at 2007-09-10 00:32
Message generated for change (Comment added) made by lusum
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1791272&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: lusum (lusum)
Assigned to: Nobody/Anonymous (nobody)
Summary: Version management in wikipedia.py
Initial Comment:
It should be fine for find easly copyright violation to explore the history of a page. It is possible to have the pare with wikipedia.get. It should be possible to have all the history of a page ( or a particular version ) in a list returned by a function wikipedia.getHistory?
----------------------------------------------------------------------
>Comment By: lusum (lusum)
Date: 2007-09-18 10:27
Message:
Logged In: YES
user_id=642982
Originator: YES
Ok, it works, thanks, in my opinion this feature request is closed
----------------------------------------------------------------------
Comment By: Francesco Cosoleto (cosoleto)
Date: 2007-09-17 19:04
Message:
Logged In: YES
user_id=181280
Originator: NO
Hey Lusum. You can use fullVersionHistory() to download history of a page
with page contents. Do you want bot build diffs data and send related
queries to search engine?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603141&aid=1791272&group_…