[11:44:27] hi [13:00:57] Hi basvb [13:01:04] I saw your messages [13:01:25] The new generic functions are simple [13:01:55] They will be used when I have the multiple image upload code ready [13:02:07] I can commit them nonetheless [13:03:00] Well after the folder restructuring some import statements will have to be changed [13:03:14] yes please, commit what you did daily please so I can comment if needed [13:03:33] As you have rightly pointed out [13:03:35] Ok [13:03:40] and please change the necessary import statements, it's a part of restructuring [13:04:21] Sure thing. [13:04:28] Give me 30 minutes [13:05:06] I will be unavailable for work for a few hours after that. [13:06:51] There's some unforeseen thing that has come up [13:47:29] commit done [13:50:10] basvb: you may take a look at the code and give your review. [13:50:34] I may not be able to come back by 18:00 UTC tonight. [13:50:59] in that case I will let you know latest by 16:30 UTC [14:08:23] np, I'll not be here all the time either [17:20:59] Hi I am on my way [17:21:34] Should reach home by 18:15 UTC [18:14:40] 15 mini [18:15:54] I will be back home [18:31:55] hello I am here [18:32:36] basvb just left [18:32:48] oops [18:32:52] hi [18:32:54] here now [18:33:04] hi you are here :) [18:33:14] this timing lol [18:33:29] ;) I was away for 1:30 hour, but guess I just timed out [18:33:45] yeah sort of simultaneous :) [18:35:05] so as discussed I am writing the code for multi image upload [18:35:13] it is incomplete [18:35:36] should be finished in say a few hours [18:35:55] ok, nice [18:36:02] I'm going over your code [18:36:07] what is the goal of https://github.com/infobliss/sibutest2/blob/master/glams/NationaalArchiefGLAM.py#L20 [18:36:37] can you give an example of what can be the input and then what is the output [18:36:45] ok [18:37:16] input: http://proxy.handle.net/10648/a9deaf60-d0b4-102d-bcf8-003048976d84 [18:37:26] output: a9deaf60-d0b4-102d-bcf8-003048976d84 [18:37:55] argh so unpythonic [18:38:03] ok, it's very confusing now [18:38:09] because it will parse a lot of other urls [18:38:19] try regex [18:38:21] you can just use a regex for it [18:38:30] or str.index [18:38:34] or maybe even split [18:38:39] yeah [18:38:46] well I think some input validation is nice to have [18:39:22] https://github.com/infobliss/sibutest2/blob/master/glams/NationaalArchiefGLAM.py#L148 we discussed this 2-4 days ago. You're using permission wrong [18:39:42] permission is either empty or where the license template goes [18:40:19] for validation: https://github.com/infobliss/sibutest2/blob/master/glams/NationaalArchiefGLAM.py#L67 [18:40:58] permission is either empty or where the license template goes <= empty meaning? [18:41:17] literally empty [18:41:34] I don't understand what else could it mean [18:42:01] Can you explain https://github.com/infobliss/sibutest2/blob/master/glams/NationaalArchiefGLAM.py#L48 a bit [18:42:05] that's strange [18:42:29] there will be empty parameters in these infobox templates [18:42:35] not everything has to be filled [18:42:57] so in CC0 cases permission is empty? [18:43:11] no. [18:43:22] you don't put a text like that in the permission field [18:43:27] you either put the license template there [18:43:34] or nothing and put the license below [18:43:59] permission = CC0 ? [18:44:05] no [18:44:17] look at some files on commons [18:44:25] ok [18:45:07] https://commons.wikimedia.org/w/index.php?title=File:2006_Galeria_ZACH%C4%98TA_-_panoramio.jpg&action=edit [18:45:11] https://commons.wikimedia.org/wiki/Special:Random/File [18:45:20] license-template in permission at that link [18:46:09] https://commons.wikimedia.org/wiki/File:Causa_judicial_Juan_Moreira_1869-1879.pdf [18:46:12] ok it has permission={{cc-by-3.0|Валерий Дед}} [18:46:14] license below and empty permission [18:46:23] those are the 2 options [18:46:37] * zhuyifei1999_ like the latter [18:47:16] For CC0 do we set permission={{CC0}} [18:47:19] ? [18:47:21] yep I think below is slightly prefered [18:47:49] just unset permission and set only license [18:47:59] ok [18:48:38] https://github.com/infobliss/sibutest2/blob/master/glams/NationaalArchiefGLAM.py#L48 is specific to the NA GLAM [18:48:56] I'd almost say you could remove that {permission} from the substitution [18:49:28] i.e.,leave permission empty always? [18:49:33] yes [18:49:46] I don't see why it would ever get used [18:49:56] well it should be in the template, just never use it [18:50:02] it's a field for a reason in that tempalte [18:50:03] if you put it in a int:license-header [18:50:11] https://github.com/infobliss/sibutest2/blob/master/glams/NationaalArchiefGLAM.py#L51 huh? [18:50:56] I am not aware how this came here!!! [18:51:06] let me check my local copy [18:51:16] lol [18:51:48] this came here inadvertantly [18:53:19] but can you explain what L48 on does? [18:53:23] you say it's specific [18:53:30] but what does it give? [18:53:39] ok [18:54:14] it gives the url of the 10000*10000 size thumb if available for that specific uuid/url given by the user [18:54:33] but isn't the goal to get a thumb? [18:54:37] 100*100 or something? [18:54:41] that's what I didn't get [18:54:47] otherwise it gives the first found thumb which is in most cases 1268*1268 [18:55:43] this is not new code [18:55:44] so it's not for thumbs? [18:55:45] https://github.com/basvb/single-image-batch-upload/blob/master/NationaalArchief.py#L182 [18:55:57] ok I was expecting a code for thumbs [18:56:02] it is I believe [18:56:06] this is code to get the largest image? [18:56:21] yeah [18:56:30] largest thumb [18:57:04] ok maybe that's called a thumb as well [18:57:10] how do you know the largest is always 10000x10000? [18:57:14] sure there is nothing above 10000x10000? [18:57:19] aah we think the same [18:57:22] * zhuyifei1999_ would expect a max() [18:57:32] lol [18:57:39] well those links I gave yesterday can help you explore the space of variable values [18:58:57] ideally the largest thumb won't be used [18:59:29] once the module will be actually invoked from somewhere during the multi image upload operation we will fine tune it [18:59:39] ? [19:00:11] say we go for 100*100 thumbs for display [19:00:26] at that time we can suitable change this method [19:06:45] I thought it was new from https://github.com/infobliss/sibutest2/commit/d664ac4b30adce778084850b5acb6837aaa936af [19:07:58] Yeah sure it has been incorporated here from this commit [19:08:08] but the code's operation is not new [19:08:19] it has been envisaged by you [19:08:33] in the NationaalArchief.py legacy code [19:09:13] aah ok [19:19:56] can you do code commenting [19:20:05] yep [19:20:06] https://github.com/infobliss/sibutest2/commit/d664ac4b30adce778084850b5acb6837aaa936af#diff-4cc82ec3cc84d1be890c089a1bb7dc92R16 [19:20:14] there is not clear at all what false means [19:20:18] we know but it needs explained [19:20:57] ok [19:21:32] and using the function thumbnail locator at NA for something different is not good [19:21:51] it now has a different purpose than what we discussed (returning a small image) [19:22:10] you need to put that function under a different name if it is not exactly the same purpose [19:22:27] ok [19:23:10] and of course has to be re-written from my original to something less hacky more robust, but maybe I should do that [19:26:14] that code was legacy, the mother of the sibutest app :) [19:27:45] well there was only 200 lines of code [19:28:00] normally you have 1000s or 100000s lines of legacy code [19:28:36] for an app of our size 200 is long enough [19:28:55] btw is the AM mapping code finished? [19:29:00] nope [19:29:07] ok [19:30:28] zhuyifei1999_ will be mad to know this but I kinda have started to like the name 'sibutest' ;) [19:30:39] ... [19:31:55] Sibu is a common pet name here :) [19:33:15] ;) [19:41:24] ok I'm off for today [19:41:31] i hope I find the time tomorrow to finish AM [19:41:38] I estimate it needs 2 more hours [19:42:02] ok