User:Bot ishmael/Materials drops categories

Overview

 * Task: Creating and populating the "Drops &lt;material>" categories to facilitate the new format for material articles.
 * Subtask: Update anything that links to a material redirect (such as [ Bones]) to link directly to the material.
 * Tool: AutoWikiBrowser

This is a functional description of the steps taken to build a list of articles that should have the "Drops &lt;material>" categories added to them for each material. There are three situations that need to be taken into consideration in order to make sure we have the most complete list possible:


 * 1) The material's article has a link to a creature that drops it, and the creature's article has a link back to the material (optimum situation, and likely the most common).
 * 2) The creature's article has a link to the material, but the material's article is lacking a link to the creature (somewhat common).
 * 3) The material's article has a link to the creature, but the creature's article is lacking a link to the material (uncommon).

To cover these different situations, we will first build a list of creature articles that link to the material, and then compare it to the list of creatures that already exists on the material article.

Preliminary: Update links to redirects
Make a list using:
 * What redirects here: &lt;material>

For each of the redirects listed, make a list using:


 * What links here: &lt;material redirect>

Use a set of "Find and replace" substitutions to replace the links to redirects with direct links to the material.


 * If fixing a plural redirect and the material name can be pluralized with a final "s" (such as  &rarr;  ), use:
 * &rarr;
 * If fixing a plural redirect and the material name is pluralized in a different way (such as  &rarr;   or   &rarr;  ), use:
 * &rarr;
 * For non-plural redirects, use:
 * &rarr;
 * For all redirects, use:
 * &rarr;

Prep work for adding categories
First, we build a preliminary list using AWB's List comparer tool to filter down the list of pages that link to the material by removing pages in categories that would obviously not belong in the drop category.

To make the comparison easy to repeat for the different materials, I have saved all but the first three items in List 2 to a text file that I can load into the list.
 * List 1:
 * What links here: &lt;material>
 * Filter: keep Content namespace only and remove duplicates
 * List 2:
 * What redirects here: &lt;material>
 * Category: Contains &lt;material>
 * Category: Drops &lt;material>
 * Category: Requires &lt;material>
 * Category (recursive): Crafting materials
 * Category (recursive): Armor quick references
 * Category (recursive): Weapon quick references
 * Category (recursive): Weaponsmiths
 * Category: Weaponsmith subpages
 * Category (recursive): Consumables crafters
 * Category: Consumable crafter subpages
 * Category: Drop rates data
 * Category: Bestiary
 * Armored Transport
 * Artisan
 * Conset
 * Consumables
 * Consumables crafter
 * Green Hills County dye farming guide
 * Invincible Monk
 * Material Trader
 * Quality Steel
 * All materials link to each other through the navbox, thus Category:Crafting materials is included recursively.
 * It should be obvious why armor/weapon QRs and weaponsmith/consumables crafters and their subpages are included.
 * Category:Bestiary only contains species overview articles (like Skeleton). These pages often list materials that are dropped by most/all creatures in that species.
 * The articles listed at the end link to a number of materials, but are not in any categories that it would have been sensible to include, so they are included explicitly. There are probably more articles like them that link to other materials (I am writing this guide using Bones as the material), and they should be added to the file as they are encountered.

Click on Compare to populate the three lists on the right: articles that are only on List 1, articles that are on both lists, and articles that are only on List 2. Click on Use list under the "Unique in List 1:" box to send that list to the main window and close the List comparer.

The list we have now includes all the articles that belong in the new category, along with some false positives - articles that should have been removed in the comparison, but are missing one or more of the categories we used in List 2 (this is almost always "Contains X"). Open the List comparer again, clicking "Yes" to use the current list as List 1, then set up List 2 as follows: (Again, I have this saved as a text file, since it will be the same for all materials.)


 * Category (recursive): Collectable drops
 * Category (recursive): Consumables
 * Category (recursive): Salvage Items
 * Category (recursive): Weapons (minus Category (recursive): Weapon galleries)
 * Filter: keep Content namespace only and remove duplicates

Click on Compare. The results we want now are in the "Unique in List 1:" and "Common:" lists. Click on "Use list" for "Unique in List 1:" to copy it to the main window, then move the List comparer window off to the side so you can come back to the "Common:" list later without having to rerun the comparison.

Perform a visual check of the current list to see if there are any false positives left that should be removed. If there are, and they contain links to multiple materials, they should be added to the first comparison list.

Finally, look at the material's article to see what creatures are already listed as dropping it. Compare the article's list to the list you've generated and add anything that is on the article but not on your list.

Add the categories
Run AWB on your final list. On the "More..." tab, in the Categories group, select "Add category:" from the dropdown list, and enter "Drops &lt;material>" in the textbox.

Go back to the List comparer window, and click "Use list" for the "Common:" list to copy it to the main window, then close the List comparer. These pages will more than likely need the "Contains &lt;material>" category added, so modify that on the "More..." tab. Manually verify each page to make sure this is the correct action - it is possible for a page in this list to link to the material somewhere other than in the "salvages to:" section. Also, make sure to add all necessary "Contains &lt;material>" categories based on the salvage results listed in the article, so you don't have to edit the same item again.

Progress
Any tick on a material means it has been processed. ✅ means the Drops &lt;material> category has been created and populated; ✅ means the category has not been created because that material cannot be found as a drop.

Common Rare
 * ✅ Bolt of Cloth - Category:Drops cloth
 * ✅ Bone - Category:Drops bone
 * ✅ Chitin Fragment - Category:Drops chitin
 * ✅ Feather - Category:Drops feather
 * ✅ Granite Slab - Category:Drops granite
 * ✅ Iron Ingot
 * Pile of Glittering Dust - Category:Drops dust
 * Plant Fiber - Category:Drops fiber
 * Scale - Category:Drops scale
 * Tanned Hide Square - Category:Drops hide
 * Wood Plank - Category:Drops wood
 * Amber Chunk - Category:Drops amber
 * Bolt of Damask - Category:Drops damask
 * Bolt of Linen - Category:Drops linen
 * Bolt of Silk - Category:Drops silk
 * Deldrimor Steel Ingot - Category:Drops deldrimor steel
 * Diamond - Category:Drops diamond
 * Elonian Leather Square - Category:Drops elonian leather
 * Fur Square - Category:Drops fur
 * Glob of Ectoplasm - Category:Drops ecto
 * Jadeite Shard - Category:Drops jadeite
 * Leather Square - Category:Drops leather
 * Lump of Charcoal - Category:Drops charcoal
 * Monstrous Claw - Category:Drops monstrous claw
 * Monstrous Eye - Category:Drops monstrous eye
 * Monstrous Fang - Category:Drops monstrous fang
 * Obsidian Shard - Category:Drops obsidian
 * Onyx Gemstone - Category:Drops onyx
 * Roll of Parchment - Category:Drops parchment
 * Roll of Vellum - Category:Drops vellum
 * Ruby - Category:Drops ruby
 * Sapphire - Category:Drops sapphire
 * Spiritwood Plank - Category:Drops spiritwood
 * Steel Ingot - Category:Drops steel
 * Tempered Glass Vial - Category:Drops glass vial
 * Vial of Ink - Category:Drops ink