[12:38:57] Hi infobliss [12:39:18] could you add me as contributor to sibutest2? I'll try to push the start of my new glam mapping [12:39:41] ok [12:42:28] https://github.com/infobliss/sibutest2/invitations [12:46:42] I think one can access the sibutest app code by doing an ssh to the tool labs too. [12:46:47] For testing. [12:49:59] I should take a look into that [12:50:07] anyhow I've just pushed some code [12:50:17] It's far from finished [12:50:45] ok let me see [12:52:02] what I have now (priref to url and load from url) can later be turned into library functions [12:52:16] the loadfromurl easily [12:52:34] prireftourl less of a priority (has quite some specific elements) [12:56:17] what is exactly a priref? [12:57:40] ok its a record number [12:57:44] yep [12:57:51] ref -> reference/referentie [12:57:57] no clue what pri stands for [12:58:13] okay [12:58:15] it's standard adlib database info [12:58:20] lot of glams seem to use adlib [12:58:33] http://amdata.adlibsoft.com/wwwopac.ashx?database=AMcollect&search=priref=23524&output=json [12:58:36] that's the url [12:58:43] amdata is amsterdam museum specific [12:58:50] so looks like adlib is hosting their db [12:59:01] AMcollect is the relevant database [12:59:07] then I search for a matching priref [12:59:12] and output it as josn [12:59:59] now the trick will be to do as many work as possible in standard functions, so that we can reuse those in later mappings [13:00:00] I see. [13:00:31] and to make it as easy as possible to add new mappings [13:00:50] ideally we only have to change a few standard lists + add a new file [13:01:17] that's why I asked for the drop down -> we should preferably not hardcode things [13:01:56] did you succeed in the things you wanted to work on last week? [13:02:03] yes [13:02:06] Is there anything you struggled with and we should look into? [13:03:21] I am not too happy with the add button for adding new categories. [13:03:43] may be you can take a look at that and provide your comments. [13:03:57] https://tools.wmflabs.org/sibutest/ [13:04:05] "more categories" [13:04:18] yeah [13:04:28] ideally you want a delete line button [13:04:36] (cross on the right to remove field [13:04:40] let me test how it works [13:04:45] yes right. [13:07:44] I'd say maybe not bold the new categories [13:07:56] alright [13:08:01] in the result page can you add the link to commons? [13:08:16] where the file is at [13:08:37] and maybe it is good to give options to add info to fields such as the indentifier [13:09:03] eg for nationaal archief we would say: UUID which looks like http://proxy.handle.net/10648/acf0e0d8-d0b4-102d-bcf8-003048976d84 or acf0e0d8-d0b4-102d-bcf8-003048976d84 [13:09:20] k [13:09:43] https://commons.wikimedia.org/w/index.php?title=File:Voetbal_FC_Wageningen_tegen_AZ67_1-2,_Pier_Tol_hier_in_kopduel_met_diverse_-_Nationaal_Archief_-_931-2225.jpg&action=edit [13:09:50] nice work on the category handling [13:10:57] :) [13:11:00] thanks [13:11:34] also added a tooltip when a glam is chosen [13:11:39] in the dropdown [13:12:03] you mean the "The Nationaal Archief or NA is the national archive of the Netherlands, located in The Hague." [13:12:15] yep that is good, we can give some small info on the collection [13:12:58] ok [13:13:00] minor thing: maybe some more space between logout and logout image [13:13:12] sure [13:14:30] for the homepage is it not too empty? [13:14:45] do you think we can add something there? [13:14:47] when there is the login button only? [13:14:54] maybe some small info on what it is [13:15:15] so the same info as on the about page [13:15:50] is there a license on the github repo? [13:15:58] we need the code explicitly open sourced [13:16:25] shall I put GNU license? [13:16:55] zhuyifei1999_: what is a suitable license? [13:18:43] https://github.com/toollabs/video2commons/blob/master/LICENSE [13:19:30] yep I think it is ok [13:20:11] ok [13:22:34] As per my proposal next task is "Contacting with a number of GLAMs to consider the viability of having a "Upload to Wikimedia Commons" button on their image collection site." [13:22:57] https://phabricator.wikimedia.org/T161670 [13:23:39] Also "decide what metadata suits the best for writing a generic file title generator module based on the metadata extracted from the GLAM API. Write the relevant code." [13:24:00] I think I should help in trying to contacting one or two GLAMs? [13:24:30] yep that will be great. [13:25:05] I think the discussion should be a bit broader than just the button [13:25:14] what they think of the tool as stand alone [13:25:22] what they see as pit falls [13:25:37] and asking whether a direct connection would be an option [13:26:23] yeah may be link to our tool on their site. [13:29:54] Also I will most probably be unavailable from 23 June evening to 26 June morning. [13:30:22] In that case can we have our next meeting on Friday morning or Monday evening? [13:33:25] https://commons.wikimedia.org/wiki/User_talk:Timmietovenaar#glam2commons [13:33:37] I asked the wikipedia person from the nationaal archief [13:34:21] hmm about the next weeks [13:34:28] nice [13:34:34] I've to an evaluation of the first month between 26 and 30 june [13:34:57] from the 29th on I'm gone so I'd like to that 27 or 28 june [13:35:27] friday morning which time zone? [13:35:57] maybe it's easier to do something on tuesday 27th (so you don't have to hurry) [13:36:23] yeah that works [13:36:53] Ok I'll see tomorrow what's a suitable time for me tuesday the 27th [13:37:08] by that time try to really work on the points we planned for may + june [13:37:46] yeah sure [13:37:58] And don't hesitate to ask questions before of course [13:38:02] 1. file title generator [13:38:09] maybe updating the phabricater a bit is a good idea as well [13:38:18] 2. generic library functions [13:38:23] are two of them. [13:38:38] well the file title generator is one of the generic library functions [13:38:53] most important library functions: receive json from url + upload file [13:38:56] those are very easy [13:39:14] ok [13:39:25] you can just split of existing code [13:39:30] and clean it up a bit [13:39:42] then the wikitemplates come to mind [13:39:49] I'll be working on Template:Art photo [13:40:08] should also be relatively easy those [13:40:21] then the title generator is a good one [13:40:34] and from there we will just see what is useful as we go [13:41:37] ok [13:41:51] how exactly should I go about splitting the existing code? [13:45:26] well everything which is generic (can be reused for other glams) should be in a separate function ideally [13:45:47] and then the whole filling a string should change into collection parameters [13:46:00] and then sending those to a template function which adds those parameters into a tempalte [13:46:10] into a wikitemplate [13:46:34] which you then expand with some other parts of a page (categories/license etc) [13:46:50] and you call a separate function to create a title based on some parameters [13:47:11] I'm trying to build it that way in the amsterdam museum one [13:47:21] so we can look a bit what works the best [13:48:33] ok' [13:49:14] regarding the formation of the wikitemplate we said that we are not going to have too many parameters for the function. [13:49:27] instead a dict can do. [13:50:12] yep playing smart with dicts is ideal [13:50:25] do you want me write a template builder function that takes a dict containing all the info? [13:50:31] ok [13:50:51] it's just a question of what's the most clean way in python [13:51:03] so I've got a folder libraries (other name can also be chosen) [13:51:11] where we can create all those generic functions [13:51:24] I think something like 1 file with all commons infobox templates [13:51:51] so first you do a get_photograph_parameters() [13:51:55] which returns you the empty dict [13:52:16] then you have create_photograph_template(parameters) [13:52:25] which you send the filled dict and returns a template [13:52:51] and I'll make one for the art_photo template [13:52:57] which can also be in that some file [13:53:11] then the upload handler, title builder etc can be in separate files [13:53:22] or some of those together, depending on what is logical [13:54:14] alright [13:58:42] I'll set one up for art work [13:58:53] then maybe zhuyifei1999_ can share his opinion [13:58:57] and then you can continue from there [14:04:42] sure [14:05:28] https://github.com/infobliss/sibutest2/blob/master/libraries/infobox_templates.py [14:05:49] that works, however I doubt about the best location for both the parameters and the template [14:05:59] whether that's in the defs or outside of them [14:06:05] or inside yet something else [14:06:14] because there will be 5-10 of those in the end [14:06:31] however moving those around later is not that hard [14:09:16] this is nice. [14:09:49] very easy to make those [14:09:57] I think 10-30 minutes per template [14:10:12] yep [14:15:06] and makes the code a lot cleaner [14:16:37] so this is a union of all the parameters of Photograph and Artwork. [14:16:41] right? [14:17:23] sort of yes [14:17:43] no it is not [14:17:48] depending on the collection either photograph or art_photo or another template is useful [14:18:02] for nationaal archief: it's a collection of old photos [14:18:24] I found that depicted people , depicted place etc are missing [14:18:35] for amsterdam museum: it's a collection of objects in the museum (art works although some are just non-art objects) which they recently took a photo from [14:18:45] yep because those are important in a photo [14:18:54] but in an art_work you wont often find those [14:19:06] but you can add other parameters if you want always [14:19:54] from each json we need to do 3 things: determine the correct photo url (page to download image from), determine a good title, and determine the wikitext to describe the file [14:20:07] so which template builder to call will be item specific or glam specific? [14:21:28] ok [14:22:31] yep [14:22:52] it can be that within a glam collection we have to do different template builds based on different subcollections [14:23:04] so one parameters (eg. collection) determines what to do [14:23:20] collections=photos -> photograph template [14:23:32] colletion=paintings -> art photo template [14:24:09] yeah got you. [14:24:43] but you will always get difficult chalenges [14:24:45] http://amdata.adlibsoft.com/wwwopac.ashx?database=AMcollect&search=priref=38424&output=json [14:24:56] this art object has 5 interesting descriptions [14:24:58] some in english [14:25:00] some in dutch [14:25:12] which ones to show and how to determine whehter they are dutch or english [14:25:39] the dimensions of objects are also difficult to map [14:26:34] hahaha it is interesting [14:26:53] and it is published in 50 books [14:26:57] all of those listed [14:27:45] do we need to show where it is published? [14:28:02] no [14:28:17] well preferably we use as much info as possible [14:28:22] but that is a little to specific [14:28:28] then this has 10 listed images [14:30:00] of which 1 is incorrect, 8 are crops 1 is high def and one is low def [14:30:11] nice challenge to figure out which to collect [14:30:30] wiat no incorrect, I was looking at the wrong object [14:30:53] one black and white [14:31:04] ok [14:31:30] enough challenges [14:34:56] hmm this glam is a little complicated to handle as compared to NA [14:41:31] http://amdata.adlibsoft.com/wwwopac.ashx?database=AMcollect&search=priref=81809&output=json [14:42:01] I don't see the license info here! [14:59:27] that one is not ok [14:59:36] if it's ok it says: copyright:cc-o [14:59:39] cc-0 [15:00:09] The one you linked says: http://am.adlibhosting.com/amonline/details/collect/81809 "alle rechten voorbehoude= all rights reserved [15:00:19] but the thing here is that those files need a copyright check anyway [15:01:03] oh I see now. [15:14:56] well I will be going for dinner a few minutes from now. [15:20:34] have a good meal [20:38:14] sorry I was super sleepy yesterday [20:39:27] regarding license, any FOSS license is okay