Last modified: 2013-10-05 04:20:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57076, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55076 - Suggestions regarding -addcat option in replace.py
Suggestions regarding -addcat option in replace.py
Status: NEW
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:20 UTC by Kunal Mehta (Legoktm)
Modified: 2013-10-05 04:20 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:20:40 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/221/
Reported by: Anonymous user
Created on: 2009-08-28 17:02:21
Subject: Suggestions regarding -addcat option in replace.py
Original description:
The initial problem: I wanted to replace text in categories AND simultaneously add another category, but the addcat function undid the textual replacement. I got it to work, here's the replacement.py diff \(the first change is a syntax correction, the second change is from http://osdir.com/ml/pywikipedia-bugs/2009-07/msg00067.html \):

304c304
<                                            cat\_ns + ':' + addedCat\)
\---
>                                            cat\_ns + addedCat\)
390c390
<                     cats = page.categories\(nofollow\_redirects=True\)
\---
>                     cats = page.categories\(\)
392d391
<                         cats.append\(self.addedCat\)
394c393
<                                                                   cats\)
\---
>                                                                   \[self.addedCat\],addOnly = True\)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links