Skip to content

Request to Automate Updating Wikivoyage Expedition Statistics #390

Open
@NelsonRicardo

Description

@NelsonRicardo

Conversation started at https://en.wikipedia.org/wiki/Wikipedia_talk:Version_1.0_Editorial_Team/Index#Wikivoyage_Expedition_Statistics.

Wikivoyage destination articles have a type and a status. These are specified using a single template that specifies both type and status and places the article into two categories. For example, https://en.wikivoyage.org/wiki/Caldas_da_Rainha has the {{starcity}} template, which places the article in both [[Category:Star articles]] and [[Category:City articles]].

As currently set up, the region statistics template (https://en.wikivoyage.org/wiki/Template:RegionStats/WRA) uses the article temples rather than the categories to populate the PetScan calls. The Caldas da Rainha article will be counted in 3 cells of the statistics matrix (https://en.wikivoyage.org/wiki/Wikivoyage:Portugal_Expedition#Article_statistics):

(I believe that using categories rather than templates for the PetScan calls would be clearer, but that's more from an end user perspective and may not have any relevance to the automation process.)

Wikivoyage's geographical hierarchy (https://en.wikivoyage.org/wiki/Wikivoyage:Geographical_hierarchy) also comes into play. Each destination is part of a region, which itself may be part of a parent region (and so on...), which is part of a country, which is part of a continental section, which is part of a continent. Wikivoyage uses Template:IsPartOf (https://en.wikivoyage.org/wiki/Template:IsPartOf) to create a category tree. PetScan then uses this tree (according to the Depth parameter) to find the all of the child articles for the specified "region" category, which in my example case above is the country of Portugal.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions