:User:MusikBot/CategoryCounter

{{User:MusikBot/task|Populates the size of categories into a dataset for use in on-wiki charts.

How to add a new category

  1. Create the chart template using {{tl|category chart}}. See {{tl|articles lacking sources chart}} as an example.
  2. Create the /data subpage with the content [] (an empty array), for example at :Template:Articles lacking sources chart/data.
  3. Ask an admin or template editor to change the content type of the /data page to JSON, for instance at Special:ChangeContentModel/Template:Articles lacking sources chart/data.
  4. Ask an admin to configure the category on the bot's configuration page. See below for documentation.
  5. Add any historical data to the dataset page as desired.
  6. The bot should start adding data to the /data page within the amount of time configured (i.e. within a week if you chose "weekly" granularity).

}}

class="wikitable"
colspan="3" | Available parameters
ParameterDescription
{{mono|category}}Which category to track, with or without the Category: namespace prefix.
{{mono|granularity}}Either "daily", "weekly" or "monthly". If you choose daily granularity, you may wish to also use the {{mono|cutoff}} option to ensure the dataset page doesn't become too big over time.
{{mono|dataset}}Where to store the data. This is usually a subpage of the chart template.
{{mono|cutoff}}Represents the number of days after which the bot should remove entries from the chart. This is to prevent datasets from becoming too large, or if you just wanted your dataset to only include the latest 30 days, for example.

Example

{{tl|articles lacking sources chart}} is an example chart:

{{articles lacking sources chart}}