Template talk:Raw image

From Wikisource
Jump to navigation Jump to search

Suggested improvements to template[edit]

As IA now has a stable url for files, and .jp2 zipped files, I would like to suggest that we add an {{{IA|{{{ia|{{{Ia|}}}}}}}}} string parameter, which we could build into:


There would be text within the template that would say something like:

Internet Archive has this page available for extraction of the image from the page from this list <link>. Identify the page here to choose the appropriate image page from the list.

That is getting a little wordy, so it may be that we need to build that information into a wikipage and point them to Help:Adding images.

The other thing that I would like to see happen is that we categorise where IA parameter is empty to a maintenance category. Grabbing groups of pages and bot adding an IA parameter per work is a easy job where we have a swathe of pages from the same work, and they will sort to group together. — billinghurst sDrewth 10:19, 14 November 2019 (UTC)Reply[reply]

@Billinghurst: First-cut proof of concept in the sandbox (all the logic is in the module sandbox). A basic set of test cases are at Template:Raw image/testcases.
The main argument is |ia= for the work's identifier at IA. It's supplemented by |iazip=, because the ZIP file within the work can actually have a different base filename than the work's identifier (it's up to the uploading institution; most keep it the same, but the National Library of India is a notable exception). And for good measure there's |iaimg= to give the specific page's image filename to enable a direct link.
There's a lot of assumptions coded in here, so we're bound to run into some cases where it falls down (pretty sure I've seen works with TIFF scans at IA, which will break our hardcoded "jp2" assumption), and we'll have to clean that up before deploying.
Initial impression is that this is a bit too convoluted for the value it provides (the code is a bit messy, which is often a sign the underlying logic is messy). We should give some thought to how much of this is worth trying to implement (in Page:/mainspace, I mean; the functionality is obviously already implemented), and whether there is alternate or supplementary functionality we should investigate. --Xover (talk) 16:15, 17 November 2019 (UTC)Reply[reply]