Jump to content

User:Usernamekiran/footballer categories

From Wikipedia, the free encyclopedia

relevant discussions

[edit]

Function overview

[edit]

replace old categories with new categories, and create new categories with predefined content (see "function details" subsection for in-depth details)

  • function details:

The categories have been divided in five types:

  1. Footballers in <country> (244 categories, 68 articles)
  2. <nationality> footballers (241 categories, ~188,791 articles)
  3. Expatriate footballers in <country> (207 categories, ~66,500 articles)
  4. Footballers in <country> by club (224 categories, no articles (container categories))
  5. <nationality> expatriate footballers (222 categories, ~63,500 articles)

In total, there would be around 190,000 articles would be edited (some of them would be edited twice or thrice). A list of all the categories to be moved is given below, along with the new content of the category. Currently, the bot is set to create new categories, and edit only the mainspace pages, with exception of "Footballers in <country> by club". These are container categories, and they will be updated as well. eg: for Category:Stade Plabennécois players, the category will be changed from Category:Footballers in France by clubCategory:Men's footballers in France by club.

There are hardcoded lists of "old category" → "new category". The bot first goes through the list of old categories, and if new category doesnt exists, then creates it with appropriate content (given below). After the categories are created, then the bot goes through all the articles of each "old category", and replaces the old category with new category, if an article from old category has category(s) containing "women" in it, then the bot skips that article, and adds the entry to a text file. In the same file the bot also adds the articles with "nobots" template on it. ~~ ~~

categories to update, with new category's content

Footballers in <country>

Category wikitext:

[[Category:Footballers in <country>|+Men]]
[[Category:Men's association football players by country|<country>]]

<nationality> footballers

Category wikitext:

{{CatAutoTOC}}
[[Category:<nationality> footballers|+Men]]
[[Category:<nationality> sportsmen|Footballers]]
[[Category:Men's association football players by nationality|<nationality>]]
[[Category:Men's footballers in <country>|<nationality>]]

Expatriate footballers in <country>

Category wikitext:

This category is for non-<nationality> men's footballers who currently play or have played in <country>.
{{CatAutoTOC}}
[[Category:Expatriate footballers in <country>|+Men]]
[[Category:Men's footballers in <country>]]
[[Category:Expatriate men's association football players by country of residence|<country>]]

Footballers in <country> by club

Category wikitext:

{{CatAutoTOC}}
[[Category:Footballers in <country> by club|+Men]]
[[Category:Men's footballers in <country>|Club]]
[[Category:Men's association football players by club|<country>]]

<nationality> expatriate footballers

Category wikitext:

{{non-diffusing|<nationality> men's footballers}}
The is a page for <nationality> men's [[Association football|footballers]] who have played abroad at any time during their career.
{{CatAutoTOC}}
[[Category:<nationality> expatriate footballers|+Men]]
[[Category:<nationality> men's footballers|Expatriate]]
[[Category:Expatriate men's association football players by nationality|<nationality>]]