[13:12:16] I am sorry I am a bit late. [13:13:35] Hi, no problem [13:13:47] Hi [13:14:16] How did everything go last week? [13:15:07] Well things are going as per the proposed timeline I suppose. [13:15:30] I am curious to know your review of the UI. [13:16:23] The UI looks good for a start [13:16:43] Thanks [13:16:55] I have to make some changes to the base.html [13:16:56] fo enter details I have some suggestions for improvement [13:17:14] sure [13:17:19] I suggest making the first field a drop down bar with multiple options [13:17:34] yes that is a must. [13:17:36] for now you can just put Nationaal Archief and "placeholder" [13:17:41] but just to see how that works [13:17:44] (I'd say it already has a bit too much decorations) [13:17:58] then for the next 2 fields I suggest we give some help to the user [13:18:15] maybe these fields should be specific per upload [13:18:26] so you just have a dropdown menu for glams [13:18:43] when you select a glam the page loads a description and set of fields from a config [13:19:19] for nationaal archief we need to explain what the uuid is [13:19:32] and how to enter categories (seperated by | ?) [13:20:01] I started working a bit on the nationaal archief code [13:20:13] Ah that sounds nice. [13:20:40] comma can be a separator for categories. [13:21:19] comma is not suitable [13:21:19] there are still categories with comma in their names [13:21:22] categories can contain commas [13:21:29] eg. location [13:21:29] zhuyifei1999_: is pipe ok? [13:21:44] pipe is for sortkeys [13:21:56] people are used to them with hotcat [13:22:00] yep [13:22:20] so maybe best is one categorie per field and then have a button: another category [13:22:21] ? [13:22:39] but that get's a bit complicated quickly [13:22:54] do you know a suitable separator? [13:23:25] idk, honestly [13:23:41] that's why v2c allows full customization of the filedesc [13:24:37] infobliss I'm testing the tool, error handling works good, the message for when permission is not OK should be improved [13:24:51] it now says: "empty main" or something [13:25:02] main ended I mean [13:25:16] yes [13:25:31] I will make the changes. [13:25:37] both with success and with failure on permission [13:25:48] try a96dc9b2-d0b4-102d-bcf8-003048976d84 [13:26:04] the category parsing is not working [13:26:13] you get a category like 'wageningen" [13:26:18] Main ended simly means the main function of NA ended. [13:26:19] but you then loop over that [13:26:25] however it's an array of chars [13:26:32] so you should put that into an array [13:26:36] ['wageningen'] [13:26:44] so [category] [13:27:02] then it only still supports one category [13:27:24] unless I go and write "cat1', 'nextcat" [13:27:55] I have an idea for inputting more than categories. [13:28:46] yep, so I think working on category handling is needed [13:28:49] In the categories field the user writes one category and presses enter [13:29:20] then he can still write the next category in the text field. [13:29:41] I have seen such things in some websites. [13:29:49] the button should be clear ("another category/save" [13:31:00] for example when you cc more than one recipients in gmail. [13:31:12] you can do that this way. [13:35:15] Also I want to bring the logout button in the top right corner of the screen as in github. [13:35:28] like a dropdown if possible. [13:35:35] What do you think? [13:38:11] @zhuyifei there is one issue. Once you login you only see the 'Enter details' form. The logout button doesn't appear unless you manually refresh the page once. [13:38:28] ? why [13:38:29] why do you need a logout? [13:38:40] Should I do one auto refresh? [13:38:55] but why it doesn't reappear? [13:38:57] logout from commons is not needed I think, Commons handles that [13:39:07] or do you mean filled fields upon refresh? [13:39:11] basvb: I still like to logout [13:39:21] ok [13:39:28] from oauth permission you mean? [13:39:47] in case someone needs to switch between role account / volunteer account [13:40:21] I think since there is a login so a logout is logical. [13:40:42] infobliss: do you know why it doesn't appear? [13:40:47] No [13:40:50] or shall I read the code? [13:41:08] Please you may read. [13:41:19] index.html [13:41:33] from the new repo in github sibutest2. [13:41:59] https://github.com/infobliss/sibutest2? [13:42:41] * zhuyifei1999_ is looking [13:42:58] infobliss: load_from_url(sendurl, [categories], nocat, uploading=False) is a dirty fix for line 239 of nationaalarchief2.py [13:43:11] until you have category handling sorted [13:43:29] alright. [13:43:58] infobliss: unrelated, but fyi, in my console: " Error: Bootstrap's JavaScript requires jQuery" [13:44:07] https://commons.wikimedia.org/w/index.php?title=File:Voedseltransporten_van_Wageningen_naar_West-Nederland_kort_voor_de_capitulatie._Trucks_-_Nationaal_Archief_-_900-2758.jpg&diff=247427842&oldid=247426824 to prevent that [13:46:02] * zhuyifei1999_ facepalm [13:46:38] https://github.com/infobliss/sibutest2/blob/master/app.py#L73 is before https://github.com/infobliss/sibutest2/blob/master/app.py#L95 [13:46:40] infobliss: ^ [13:47:03] https://github.com/infobliss/sibutest2/blob/master/templates/base.html#L11 [13:47:50] ? [13:48:23] could you use a consistent indentation style? [13:48:39] I think I did not include the [13:48:45] using both tabs and spaces makes code very hard to read [13:48:53] also don't use googleapis [13:49:03] tool labs has policy against that [13:49:12] use tools.wmflabs.org/cdnjs [13:49:27] no bootstrapcdn as well [13:50:04] ok [13:56:38] what is the jQuery url I should include as a script so that jQuery library is included? [13:57:44] https://tools.wmflabs.org/cdnjs/ -> search 'jquery' -> use latest -> jquery.min.js [13:59:11] infobliss: [13:59:12] https://pastebin.com/ZpdQevxU [13:59:28] I created an example for what I meant with the structuring of the code/library functions [13:59:35] we can have such functions for the main templates [13:59:38] too many parameters [13:59:51] how would you handle it zhuyifei? [13:59:57] use a dict [14:00:21] and some dict.get('', '') [14:00:28] the format would still need the nimber of parameters correct? [14:00:37] simply because there are that many [14:01:20] well, amir ladsgroup once gave me a link [14:01:21] a sec [14:01:59] https://blog.codinghorror.com/code-smells/ [14:02:05] anyhow, we need to move to something like that for the wikitemplate filling. Using some form of python templating and giving the correct parameters [14:02:16] Long Parameter List The more parameters a method has, the more complex it is. Limit the number of parameters you need in a given method, or use an object to combine the parameters. [14:02:42] yeah, python builtin is pretty good [14:02:58] currently the code just starts with an empty string [14:03:21] then line for line everything gets added (both the standard elements and the variables [14:03:26] other template engines like mustache could also be used [14:07:26] Basvb: I see that a few new parameters are added too. [14:07:52] I just added all the parameters from the commons template https://commons.wikimedia.org/wiki/Template:Photograph [14:08:03] because for other glam mappings those could be used [14:08:39] ok [14:09:15] but taking a few of these steps will make the code both more readable and will allow us to reuse things for other mappings [14:09:51] I can help out with a bit of that restructering as well, as in the end I should be writing some glam mappings [14:10:09] hmm I had made a draft method for this templating myself. [14:10:27] but then since we didn't have a 2nd glam to refer to I paused a little. [14:11:46] having them with 1 already improves things [14:12:02] yes sure. [14:12:06] how can I contribute/test code the easiest here? [14:12:36] I now copied the code to my off line interpreter, but had to remove some of the online handling to test the functions [14:13:39] so are you testing NA2.py? [14:16:01] yep [14:18:38] I am not sure how you may proceed. [14:18:41] https://pastebin.com/8hKp1gyL that the cleaner way zhuyifei1999_ ? [14:19:26] basvb: uh I thought you can do something like {photographer} [14:19:32] where then these functions are distributed over different files (one with library functions [14:19:38] you can yes [14:19:46] also, this long string with \n is barely readable [14:19:48] makes it longer, but probably clearer [14:20:00] and yes the string needs to be presented a bit cleaner [14:20:05] I'd highly recommend using ''' or """ [14:20:08] with the enters at all the \ns [14:20:20] aah that could work also [14:21:10] well, if in the case of {photographer} the photographer has to be a parameter of .format(), you could .format(**parameterdict) [14:21:17] you can do '|photographer = {photographer}'.format(photographer=parameters['photographer']) [14:21:48] yeah then '|photographer = {photographer}'.format(**parameters) [14:22:01] aah if that works that seems to be the clean solution yes [14:22:18] I didn't know **paramters [14:22:29] kwargs [14:22:43] um, python magic [14:23:22] specially made for things like this [14:24:20] well lots to learn for me as well [14:25:05] I've to go to the supermarket now [14:25:11] I am learning from both of you. [14:25:27] do you know what you can work on the coming week infobliss? [14:25:37] infobliss: ;) [14:25:41] yeah a few things [14:25:56] do you have time to discuss now [14:25:58] ? [14:26:06] yes a bit more, I can go in 10-15 minutes [14:26:13] ok [14:26:30] 1. Make new pages [14:26:36] which pages? [14:26:48] like a page after pressing upload? [14:27:08] for About, Batch Upload, Report Bug etc [14:27:22] yes that too [14:27:47] ok, I don't think those are too high priority [14:27:53] the About, Batch Upload, Report Bug etc [14:28:13] ok [14:28:15] aah I can logout now [14:28:25] 2. I want to bring the logout button in the top right corner [14:28:36] if I press home all I can do is logout [14:28:38] not upload [14:28:55] yeah that needs to be changes [14:28:59] bring the logout button in the top right corner <= i.e. copying v2c ;) [14:29:01] *changed [14:29:02] jk [14:29:15] that's a good one [14:29:20] when upload is succesful -> show the url [14:29:40] ok [14:30:25] 3. clicking on home should retain the glam enter details form [14:30:45] currently it shows the logout button only [14:30:57] yep [14:31:37] I am not sure how duplicate uploads are handled [14:32:02] i.e., what happens when someone tries to upload an existing image. [14:32:06] v2c fails dup uploads fyi [14:32:07] I don't think that has to be a priority, we've to test [14:32:13] I can test it now [14:32:18] pywikibot raises a upload warning [14:32:36] v2c says it cannot be ignored, so that happens [14:33:04] i.e. upload not allowed. [14:33:15] it quickly returns "Main ended!" [14:33:20] so no time for processing [14:33:25] just fails on the upload underwatter [14:33:30] under water [14:33:36] ok that's better :) [14:33:54] so the correct error should be returned, but nothing breaks [14:34:06] ok [14:34:12] zhuyifei so pywikibot will handle that? [14:34:54] yep, but somewhere in the future we should be able to tell the user the file was already uploaded on location X before [14:34:54] not allowing duplicate uploads. [14:35:12] that makes sense. [14:35:23] no priority for now (as in for the MVP at the end of the month) [14:35:54] that's good to know :) [14:35:59] infobliss: it's handled actually my mediawiki [14:36:13] ok [14:36:19] mediawiki will warn pywikibot about it [14:36:38] and how pywikibot handles the warning is up to you [14:37:00] by default it will raise a 'UploadWarning' exception [14:37:05] talking about end of the month. From 29-Jun to 2-Jul and from 7 to 14 July I'm unavailable (vacation) [14:37:45] Habe happy holidays Basvb :) [14:37:49] *Have [14:39:15] Is there anything else I should be doing this week? [14:39:51] * zhuyifei1999_ thinks the UI is too fancy atm [14:40:03] what parts? [14:40:32] infobliss: what do you want to put under batch-upload? [14:40:53] uplaod by searchstring [14:40:56] just too many colors [14:41:19] different blues? [14:41:23] yes [14:41:46] I thought colorful would be eye catching. [14:41:55] * zhuyifei1999_ thinks otherwise [14:42:08] in design the rule is to keep it simple chose 2-3 colors (a blue a red) [14:43:14] so do I use one blue consistently? [14:43:32] yeah, that would be better [14:43:39] ok [14:43:44] How about the logo? [14:44:27] it's cool, but the having a a logo with white background on something like gray is weird [14:44:36] try transparent background [14:45:03] ok [14:45:05] I think having a logo is an ok idea, but not too high priority, on the long term I would opt for something more in line with the wikimedia stack of logos [14:45:53] btw, the wikimedia UI color palette is https://phabricator.wikimedia.org/M82 [14:46:24] not that we have to follow it, but it could be used as some sort of inspiration I guess [14:46:29] I was just about to say: maybe for colors draw from the ones used elsewhere in wikimedia, it stresses the connection [14:46:51] ok [14:48:12] for next week I think it's also good to look a bit into restructering the back end [14:48:16] maybe we can both do that [14:48:32] as in I'll be writing some library functions [14:49:40] + the category handling I think is a bit of a breaker now [14:49:57] let's not end up doing the code for same task both of us. [14:50:12] you mean it is not an array now. [14:50:28] handling more than 1 cat [14:50:29] and multiple category handling [14:50:47] yep if I'm about to work on some of the mapping parts we'll discuss [14:51:27] but I think for the gsoc project it's interesting for you to look at the whole process of making a tool and connecting the elements [14:51:47] in that making 1 mapping is good, to know how the tool should be working [14:51:48] yes great please send a message here even if I am not online. [14:52:22] yeah it would be very interesting to write one mapping [14:52:30] making 10 mappings is however out of scope as it won't be about learning new things + in the future I would like to be able to create new mappings easily, so i think it's good if we start on that now [14:52:51] do we have a second glam to consider? [14:53:07] I have several from the netherlands [14:53:25] good. [14:54:00] you may name one to start with. [14:55:07] https://www.amsterdammuseum.nl/open-data for example [14:55:28] they released their collection "to wikimedia" I think 5 years ago [14:55:34] and handed over a usb stick [14:55:48] but a lot of the files they release are not actually releasable [14:55:53] because of issues with derivative works [14:55:58] so nobody got around to uploading [14:56:43] ok [14:57:17] http://am.adlibhosting.com/results [14:57:21] there you can search [14:57:27] if you search on "gogh" [14:57:42] you get both paintings from famous painter vincent van gohg [14:58:11] but also more modern objects from the murder on theo van gogh [14:58:27] the paintings we can upload [14:58:32] oh [14:58:33] the modern objects we often can't [14:58:44] this url is not opening for me [14:59:04] "Server Error in '/' Application." [14:59:12] http://am.adlibhosting.com/search/simple [14:59:17] try that one? [14:59:35] works [14:59:57] so that one has the selection issue [15:00:14] half of it can be uploaded the other half can't for copyright reasons [15:01:05] is it not so straight forward as it was in NA? [15:01:23] just by checking a few fields from the json. [15:02:30] no because the NA has their copyright in order a bit better [15:02:47] the amsterdam museum says: this file is PD [15:02:51] when actually it is not [15:03:17] alright [15:03:18] did you search on gogh? [15:03:25] you see a cigarette package [15:03:27] yeah [15:03:53] which is copyrighted by marlboro (although for this one you can have a discussion whether it is copyrightable or not) [15:04:13] the ones with the text are more clear [15:04:26] they are made by unknown citizens [15:04:35] so they can never have their permission [15:04:39] how do you know about copyright? [15:04:40] Here is their a url format to get the json response for an image? [15:04:55] *there [15:04:58] so these will be copyrighted until 2065 or something [15:06:22] not sure I'd have to look into their API a bit [15:06:40] but I'm not suggesting you should work on this one, I think the language barier will be an issue [15:07:14] No I think dutch to english google translate works smoothly. [15:09:54] I'm off to the supermarket now [15:10:00] ok [15:10:17] * zhuyifei1999_ is still here [15:10:18] https://www.amsterdammuseum.nl/open-data that's the entry to their databases [15:10:35] ok [15:11:03] although I'd suggest you try to work on an english language glam [15:11:19] :) [15:11:25] maybe british museum if not everything has been uploaded by fae [15:12:01] ok [15:12:11] there's always a few questions: hasn't it been uploaded, is it ok to be uploaded (license, useful), is it easy to map [15:12:40] they require some researching, also for me [15:12:52] and now I'm off for a bit, cya later [15:13:07] yeah see you [15:14:29] infobliss: in case you want to see some magic, check out how v2c push task status to client ;) [15:14:49] :) [15:14:58] where can I see that? [15:15:09] u finished so quickly [15:15:33] yeah, it's just coding + debugging [15:16:02] https://github.com/toollabs/video2commons/pull/86 [15:16:15] check out the diff [15:16:25] and feel free to try it [15:17:22] hmm quite a few changes [15:17:48] (and there are some large diffs in video2commons/frontend/static/video2commons.js that doesn't show unless you click it) [15:18:45] looks like I will need to take a deeper look at them. [15:18:54] seems interesting :) [15:19:00] ;) [15:19:23] well, I don't think you will need such complexity for glam2commons [15:19:45] :) [15:19:48] true [15:20:00] I would have to rush for dinner. [15:20:05] they close it by 9 pm [15:20:08] v2c process videos and video processing can take a long time and you time out if you do it the traditional way [15:20:09] ok [15:20:29] let's discuss later. [15:20:53] k [15:34:11] and back [15:34:34] he went to dinner [15:36:09] yep