User:Hansmuller/Bot request KITLV
Repairing backlinks in KITLV collection ?
[edit]In 2015 and 2016 Leiden University Library donated thousands of images from their KITLV collection to Wikimedia Commons, which were uploaded by User:Hansmuller. In the metadata of these images a backlink to the Leiden source collection was provided. However, since then Leiden University Library introduced permanent handles so that the original backlinks do not function anymore. Leiden University Library requested repair of these backlinks as specified below, so that people worldwide can access the original digital collection at Leiden University Library as well, starting from the image at Wikimedia Commons.
To be done
[edit]- about 5570 image files in Category:Media contributed by KITLV (https://commons.wikimedia.org/wiki/Category:Media_contributed_by_KITLV) still lack an updated backlink to the source at Leiden University Library using a permanent handle in the metadata source field "source=".
- Could this operation be done with a custom bot by you? Thank you!
Link to source image
[edit]- is now still the old method using the KITLV integer shelfmark and the API, which method does not work anymore, with opening and closing square brackets [] indicated
- example old situation: "source = <opening square bracket>http://media-kitlv.nl/all-media/indeling/detail/form/advanced?q_search_signatuur=100647 Leiden University Library, KITLV, image 100647<closing square bracket>"
- to be changed into,
- example new situation: "source = <opening square bracket>http://hdl.handle.net/1887.1/item:919857 Leiden University Library, KITLV, image 100647<closing square bracket>"
- How to find the item number 919857 from the input corresponding shelfmark KITLV 100647 ? Well,
- Given the KITLV integer shelfmark, for example KITLV 100647 as shown above, the item number of the persistent handle, example above 919857, can be found using the lookup table User:Hansmuller/List of KITLV shelfmarks and permanent item numbers. This table was provided by Leiden University Library.
- example: in this lookup table we find "KITLV 100647 item:919857" as it should be.
Example images with backlinks
[edit]With backlink already repaired by hand (and an extra string for the general standard backlink to the collection, which was repaired before, please try the links!):
- File:Hamengkoe Boewono VII, sultan van Jogjakarta, in uniform - Kassian Céphas - KITLV 10001.tif, shown at the right, with metadata
|source =<opening square bracket>http://hdl.handle.net/1887.1/item:887133 Leiden University Library, KITLV, image 10001<closing square bracket>
<opening square bracket>https://digitalcollections.universiteitleiden.nl/imagecollection-kitlv Collection page Southeast Asian & Caribbean Images (KITLV)<closing square bracket>
With old backlink still to be changed:
- File:KITLV - 100576 - Stafhell & Kleingrothe - Medan-Deli - Deli Maatschappijlaan in Medan. (Avenue in Medan.) - circa 1890.tif, shown at the right, with metadata
| source = <opening square bracket>http://media-kitlv.nl/all-media/indeling/detail/form/advanced?q_search_signatuur=100576 Leiden University Library, KITLV, image 100576<closing square bracket> <opening square bracket>https://digitalcollections.universiteitleiden.nl/imagecollection-kitlv Collection page Southeast Asian & Caribbean Images (KITLV)<closing square bracket>
Caveat: a few exceptions
[edit]For a few partly unknown images, say about ten in the Category:Media contributed by KITLV, the backlinks with permanent handles may already have been inserted, so a custom bot could check whether this is the case. For example, at present the first four images now present in the category were NOT part of the large uploads and lacked a backlink anyway. These images were added by other Commons Users than the uploader of the large uploads User:Hansmuller.
Thank you for considering this request !
[edit]Hansmuller (talk) 08:36, 6 November 2020 (UTC) , update
- You don't need a bot for that: you can do it (yourself) with a Python script that reads the excel-sheet that has been provided by UBL and that writes the new/redacted source link to the templates on the pages. For easy use, you could use PAWS to execute the script. Good luck, DanielleJWiki (talk) 09:25, 17 November 2020 (UTC)
- Thanks, i knew, didn't want to risk the KITLV collection anyway. Hansmuller (talk) 09:09, 7 December 2020 (UTC)