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: 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
 * Conset
 * Consumables
 * Consumables crafter
 * Green Hills County dye farming guide
 * Invincible Monk
 * 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 last five articles 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.