Merging categories on Wikipedia

wikipedia

On Wikipedia, is it possible to automatically merge multiple existing categories into a new category (for example, automatically moving all items in the category [[Flying animals]] and [[Birds]] to the category [[Flying birds]])? (i.e., all items that belonged to both of those categories would be moved to the new category).

Best Answer

Yes, it is possible, but not directly on Wikipedia itself. You would need to use Pywikipedia for this.

There is a script in Pywikipedia called category.py. Lets say "foo" is the original category and "bar" is the category you want to merge into. Use the following command:

python category.py move -from:"foo" -to:"bar"

This would move all the pages in the "foo" category to the "bar" category. So, if you have multiple categories to merge, you would have to run this script multiple times for all the categories you have.