Last modified: 2013-10-26 15:38:01 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 T57115, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55115 - category.py partlyremove -cat:anything
category.py partlyremove -cat:anything
Status: NEW
Product: Pywikibot
Classification: Unclassified
category.py (Other open bugs)
unspecified
All All
: Low enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-05 04:26 UTC by Kunal Mehta (Legoktm)
Modified: 2013-10-26 15:38 UTC (History)
1 user (show)

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


Attachments

Description Kunal Mehta (Legoktm) 2013-10-05 04:26:44 UTC
Originally from: http://sourceforge.net/p/pywikipediabot/feature-requests/36/
Reported by: Anonymous user
Created on: 2005-07-28 14:38:50
Subject: category.py partlyremove -cat:anything
Original description:
Hello\!

In our wiki we have several categories on each article.

If I want to remove a cat but want to have the rest to
stay as they are the current category.py won't help.

category.py remove with cat=example1 would remove all
articles in example1.

Can you please add a function that all articles in a
special cat may have another cat removed.

So category.py remove -cat:example1 would ask which cat
should be removed and then have that one be removed in
all retrieved pages.

Thanks in advance
Comment 1 Kunal Mehta (Legoktm) 2013-10-05 04:26:46 UTC
Logged In: NO 

Or what do you think about this:

category.py remove -fromcat:cat1 -removecat:cat2
Comment 2 Kunal Mehta (Legoktm) 2013-10-05 04:26:48 UTC
Logged In: YES 
user\_id=47476
Originator: NO

The obvious solution is to separate the action from the page generator. Not something I will do right now, but it prompted me to review the general solution to make a page generator based on command line arguments.
Comment 3 Kunal Mehta (Legoktm) 2013-10-05 04:26:49 UTC
Logged In: YES 
user\_id=1107255
Originator: NO

Please let us know if this feature request is still applicable to the current code. If no response is given, the feature request will be denied and the issue will be closed one month from now. This message was added in an effort to reduce the number of open issues on this project. Siebrand
Comment 4 Kunal Mehta (Legoktm) 2013-10-05 04:26:51 UTC
Logged In: NO 

There is a need to be able to remove one category tag from all pages that are in some other category or one of a set of categories. For instance \[\[category:people\]\] or \[\[category:biography\]\] on many wikis fills rapidly with pages that belong in one of the subcategories. There needs to be a way to automatically remove the parent category from any page that is in the subcategories, leaving behind only the pages that have no existing subcategorization and need to be sorted manually.
Comment 5 Kunal Mehta (Legoktm) 2013-10-05 04:26:53 UTC
Logged In: YES 
user\_id=1963242
Originator: NO

I agree with that last comment.

Request like "Remove from parent category articles which are already in one subcategory" are more and more common.

I have used several ugly hacks to do this, \(The only thing you need is the list of articles in both the parent cat and in one of its subcategories, so intersecting two outputs from pagegenerators.py \*will\* do, but... meh :\( \) so that would definitely be a nice script to have :\)

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


Navigation
Links