[[ https://meta.wikimedia.org/wiki/PetScan/en | PetScan ]] is a tool enabling users to generate targeted lists from Wikipedia and related Wikimedia projects based on specific criteria. As a user of Cat-a-lot, I would like to integrate PetScan queries directly into Cat-a-lot for managing and categorizing Wikimedia Commons images more efficiently. Ie.
* Enter a PetScan imagelist queries when Cat-a-lot is enabled from preferences
* Fetch and display the resulting image list from PetScan as thumbnails.
* Select images from the thumbnail grid for categorization using the existing Cat-a-lot interface.
**Step 1: Minimal UI**
* Using userscript/Cat-a-lot script create a form on the page `[[ https://commons.wikimedia.org/wiki/Special:BlankPage/Cat-a-lot | Special:BlankPage/Cat-a-lot ]] `that includes:
** A text input field for PetScan query ID (example: 33373583 )
** A submit button
* Upon submission:
** Load the image list from PetScan based on the provided query ID
** JSON url format: https://petscan.wmcloud.org/?psid=33373583&format=json
* Add link to prefilled PerScan query
** Example link to prefilled form: https://petscan.wmcloud.org/?psid=33373583
* Display the retrieved images as a thumbnail grid on the page `Special:BlankPage/Cat-a-lot `
** Default limit: 100 images
** Allow users to increase this limit
* Users select images via Cat-a-lot and perform normal categorization actions to the images.
**Step 2: Develop a simple UI for PetScan parameters:**
* Allow defining category intersections (GET parameter name `categories`, format string, one categoryname per line)
* Allow defining negative categories (GET parameter name `negcats` , format string, one categoryname per line )
* Allow defining default category query depth (GET parameter name `depth` , format integer )
* PetScan query parameters from UI will override the paremeters in query ID.
** Example: https://petscan.wmcloud.org/?psid=33373583&format=json&categories=Turku
The PetScan query parameters names can be found by submitting query in PetScan and then checking links in the text at the result form:
> Link to a pre-filled form for the query you just ran [[ https://petscan.wmcloud.org/?referrer_url=&depth=4&sitelinks_yes=&links_to_no=&search_max_results=500&categories=Turku&templates_no=&since_rev0=&output_limit=100&ores_type=any&rxp_filter=&source_combination=&labels_no=&edits%5Bbots%5D=both&larger=&manual_list_wiki=&wikidata_source_sites=&edits%5Banons%5D=both&referrer_name=&interface_language=en&ores_prediction=any&langs_labels_no=&links_to_any=&project=wikimedia&page_image=any&language=commons&search_wiki=&sitelinks_no=&format=html&min_redlink_count=1&cb_labels_any_l=1&active_tab=tab_output&cb_labels_no_l=1&wikidata_prop_item_use=&wpiu=any&before=&outlinks_any=&common_wiki_other=&sitelinks_any=&search_filter=&ns%5B6%5D=1&negcats=&cb_labels_yes_l=1&doit= | with ]] and [[ https://petscan.wmcloud.org/?referrer_url=&depth=4&sitelinks_yes=&links_to_no=&search_max_results=500&categories=Turku&templates_no=&since_rev0=&output_limit=100&ores_type=any&rxp_filter=&source_combination=&labels_no=&edits%5Bbots%5D=both&larger=&manual_list_wiki=&wikidata_source_sites=&edits%5Banons%5D=both&referrer_name=&interface_language=en&ores_prediction=any&langs_labels_no=&links_to_any=&project=wikimedia&page_image=any&language=commons&search_wiki=&sitelinks_no=&format=html&min_redlink_count=1&cb_labels_any_l=1&active_tab=tab_output&cb_labels_no_l=1&wikidata_prop_item_use=&wpiu=any&before=&outlinks_any=&common_wiki_other=&sitelinks_any=&search_filter=&ns%5B6%5D=1&negcats=&cb_labels_yes_l=1 | without ]] auto-run. PSID is [[ https://petscan.wmcloud.org/?psid=33374035 | 33374035 ]].