[07:43:49] WTF? We have an acquisition property for bloody SPORT PLAYERS but not for artworks? [07:46:24] Any reason why we can't use it for artworks? [07:47:44] https://www.wikidata.org/wiki/Property:P1642 [07:47:54] it's not the same thing [10:54:04] rama, maybe multichill knows an answer to that [10:54:17] he is experienced on artwork on wikidata [11:12:07] rama: Never really needed it I guess? We use collection/location/owned by with qualifiers to track provenance. Significant event for sales, when it gets stolen or even worse, destroyed [11:13:33] rama: https://www.wikidata.org/wiki/Wikidata:WikiProject_Visual_arts/Item_structure is the best overview I'm aware of on how to structure art works [11:21:36] multichill, oh nice, thank you [11:22:01] incidentally, does anybody know how to retrieve property values by language? [11:22:27] I always get the whole lot... [11:32:15] rama: In what context? [11:32:29] How do you want to use it? [11:34:18] rama: What kind of art are you working on? Me mostly painting, see https://www.wikidata.org/wiki/Wikidata:WikiProject_sum_of_all_paintings [11:34:25] https://www.wikidata.org/wiki/Category:WikiProject_sum_of_all_paintings contains a lot of useful info [11:34:55] addshore: See https://www.wikidata.org/wiki/Wikidata:Requests_for_permissions/Bot/HannolansBot , does your framework understand rate limits? [11:48:12] multichill, I would like to use Wikidata to automatically describe items on Commons. [11:48:58] for instance: https://commons.wikimedia.org/wiki/Category:Teotihuacan_sculpture-70.2001.14.2 [11:49:17] but I have trouble with two things: [11:49:32] 1) getting the information I what in the language I wan [11:49:58] usually the language of the use, but now always because I need to call templates [11:50:39] and the other is getting the information in plain text when I need that rather than a weblik [11:50:50] (again, to call templates) [11:51:04] well, the get concret examples [11:51:36] I document "Author" with the Creator template, because there is lots of useful information is these on Commons [11:52:06] so rather than a weblink to a painter, I want their name in plain text to call Creator with this [11:53:07] and I want it in English whatever the lnaguage of the use, in that case, because "{{Creator:anonymous}}" work but "{{Creator:Anonyme}}" doe snot [11:53:08] 10[1] 04https://www.wikidata.org/wiki/Template:Creator:anonymous13 => [11:53:11] 10[2] 04https://www.wikidata.org/wiki/Template:Creator:Anonyme [11:53:14] rama: How is your LUA? [11:53:32] I can do things, but I need the APIs [11:53:52] Transcluding categories on files is horrible [11:53:52] for now I already have https://commons.wikimedia.org/wiki/Module:RamaTesting [11:54:09] For some reason French speakers love to do that :-( [11:54:38] We have some tasks open in phabricator to convert creator, artwork and some other templates to LUA [11:55:20] but I'd need to know what functions to call and the fuck if I understand how the functions of the Wikidata module are designed. There's lots of things that I have no idea what they can be useful for, and lots of obvious functions that are not there [11:55:28] Once it's LUA, it's much easier to grab data from Wikidata. Most creator templates are linked to Wikidata already and https://commons.wikimedia.org/wiki/Category:Artworks_with_Wikidata_item is filling up too [11:55:40] LUA is a pain right now [11:55:45] oh, that's basically what I am trying to de [11:56:05] I am essentially re-writing Artwork in Lua with calls to Wikidata [11:56:18] rama: See https://phabricator.wikimedia.org/T89597 and related tickets [11:56:57] Some on https://phabricator.wikimedia.org/T89594 have been done. [11:57:40] https://commons.wikimedia.org/wiki/Module:Authority_control [11:59:51] I just don't understand why Extension:Wikibase Client/Lua does not include a getPropertyValue(language) function [12:00:03] I mean, we have getProperties [12:00:32] which returns a data structure but itis difficult to navigate [12:00:51] I'm quite sure we have a function that is in the user language [12:00:56] and that sounds like what everybody will ant to do [12:00:57] So you would get French and me Dutch [12:01:06] yes [12:01:29] well I'd get British English, but yes [12:01:40] For me also English, hehe [12:02:26] Maybe aude knows? [12:02:37] Appears to be the only Wikidata dev not away [12:02:42] and a function to get the language being used by the user [12:03:06] Worse case {{int:lang}}, but I'm sure LUA offers something better [12:03:07] 10[3] 04https://www.wikidata.org/wiki/Template:int:lang [12:03:27] * rama nods [12:04:47] args.lang = frame:callParserFunction( "int", "lang" ) -- get user's chosen language <- HAHAHAHAA [12:05:37] rama: That's how https://commons.wikimedia.org/wiki/Module:Authority_control gets the user language [12:06:11] well it has the merit of working, I suppose [12:06:42] in its own Mad Max fashion, I suppose [12:07:21] rama: Did you have a look at https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua ? [12:07:41] mw.wikibase.label should return in the user language on wiki's like Commons [12:08:19] with the functions provided by the library, it is possible to get what I want from getDescription, but this is also a hack: people will want to give the title of an artwork in the property "Title", not in the item description [12:08:46] yes yes, there are ways to get it [12:08:59] mw.wikibase.getDescriptionWithLang will return the user language [12:09:11] So you know it and can retrieve the right property [12:09:18] Statement. [12:09:33] for instance you call getLabelWithLang or getDescriptionWithLang, discard what you don't want and you have the user langauge [12:09:48] yes [12:09:56] but I mean, serioulsy, why on Earth don't we have a straightforward getUserLanguage fuinction? [12:10:26] Nobody ever asked? [12:11:03] Should be easy to implement I guess. Let's file a bug? [12:11:25] mw.wikibase.getLang ? [12:11:38] how can one possibly be implementing two functions getSOMETHINGWithLang and to think of writing getLang? [12:11:47] quite [12:12:06] and getPropertyValue(lang) [12:12:17] and getSubPropertyValue(lang) [12:12:41] A property is an entity so you should be able to do that already? [12:14:28] Hmm, I mean in the case where I have a painting Q1234 and want to retrieve its title P5678 in say Japanese, I'd want to be able to call getPropertValue(Q1234, P5678, ja) [12:15:20] for now I get all the languages, concatenated, which makes no sense at all. [12:15:56] it's a tragedy that so many things in IT are implemented by people who speak only one langauge [12:16:53] rama: https://phabricator.wikimedia.org/T158470 [12:17:01] Lydia_WMDE: ^^ Would be great to have that one [12:17:21] that's how you get support for Farhenheit degrees and Celcius, which nobody needs except for people who should not, and not support for diacriticts [12:17:41] rama: Right. You have an item about a painting. The painting contains a whole bunch of title statements and you just want the one in the user language? [12:17:54] multichill, yes [12:17:59] lemme show you... [12:18:08] https://www.wikidata.org/wiki/Q12418 [12:18:15] 3 times French [12:18:33] in here https://commons.wikimedia.org/wiki/User:Rama/sandbox [12:19:07] in the Title box [12:19:28] yes, and you just want to show the right one, not all [12:20:08] yes [12:20:23] ok I just reset my code to what should work but does not [12:20:41] for the Title is displays "Insane Woman, La Monomane de l'envie" [12:20:52] and for subTitile, " La Hyène de la Salpêtrière, La Folle, The Hyena of la Salpêtrière, the Madwoman" [12:24:17] Looked at the different code and not sure what the best approach is to solve this [12:24:48] Did you figure out a way to access the language of the statement or the unit of the statement? [12:25:33] If you have that data you can have your own local function to the fallback [12:26:05] In other news, we just passed the 200.000 paintings on WIkidata :-D [12:33:05] \o/ [12:33:26] no, I just can't make head or tail of the structure of the tables that hold the data [12:34:13] I have this to_string() function in my code to at least visualise tings, but I don't understand how to access things [12:34:36] I get "nil" values for things that I think should be there, etc. [12:35:28] I feel like a Donald Trump reading a document on nuclear strategy, but one who'd be aware of his own cluelessness, if you see what I mean [12:35:57] That's how I feel with LUA too [12:36:26] I was looking around for code to better understand it [12:39:44] well if I knew how to navigate these tables, I could basically implement what I need myself [12:40:26] on the other hand, there is design issues that would better be discussed rather than just implemented in my own backyard, I think [12:41:03] typically, try to guess what WikiData users will be doing when filling their items [12:41:16] whre they will put the information [12:41:28] and make sure we do get it. [12:50:36] can someone help me nut out what I am doing wrong with https://petscan.wmflabs.org/?psid=750613 [12:51:01] I am trying to get enWS authors (smith) *without* family name = Smith [12:51:58] it is given me the Smiths fine, but I cannot get it to show me where the property/item pair _does not_ exist [13:56:50] Hello. [16:17:52] rama & multichill [16:18:04] We have that working on Danish Wikipedia now [16:20:38] [[:da:Skabelon:Infoboks_Wikidata_person]], Look at the different Modules and templates. The guy made it quite easy [16:20:39] 10[4] 04https://www.wikidata.org/wiki/:da:Skabelon:Infoboks_Wikidata_person [16:24:45] if you need help with the translations, just let me know [16:37:27] Thanks Rodejong|AFK [16:38:13] rama: claims = entity.claims[propertyID] , claims[1].mainsnak.datavalue.value.unit [16:38:13] 10[1] 04https://www.wikidata.org/wiki/Template:Creator:anonymous [16:39:19] So looks like you can just walk the data structure like how it looks in json [16:45:05] rama: Look for datavalue.value.language on https://da.wikipedia.org/wiki/Modul:WikidataUtils [16:55:57] multichill, splendid, thanks a bunch! [17:00:17] you're welcome Whahaha [17:08:31] and Rodejong|AFK of course :) [17:08:41] ;) [17:38:48] Do we have a property for a bookcover [17:44:11] Ahhhhhh [17:44:16] considerable better. [17:44:22] as is my mood [18:00:11] these bloody functions do not give language codes at all! [18:00:40] I just do't understand the relation between what the documentation describes and what happens [18:21:50] Rodejong|AFK: just use image afaik [18:32:31] Lua error: not enough memory. \o/ [18:32:49] I broke the Internet! [19:45:24] Hello there! [19:47:46] Hello again [19:48:41] I'm adding some statements to archaeological sites. If I want to add a statement about the archaeologist that led the excavation, what kind of statement am I supposed to use? [20:08:34] Anyone there? [20:09:28] Zoeperkoe: Probably P793 [20:11:21] significant event, and what type of excavation and then add the archaeologist as a qualifier [20:12:06] but how depends on the organization [20:14:31] ah ok, I don't think I could have found that myself ;) [20:15:59] so for the sites I'm looking at, excavations usually take place in seasons lasting a couple of weeks, and usually a number of seasons over a longer period of years [20:16:47] Yeah, that makes it a bit more complicated [20:16:47] should I use P793, and then add a start end date for the years during which the site was excavated? [20:17:02] Yes, if it is considered a single excavation [20:17:07] :D [20:17:16] in archaeological literature, yes [20:18:02] Yes, then add start and end dat over several years [20:18:09] some sites have been excavated almost continuously for over a century; in that case phases in excavation are usually distinguished by excavation leader [20:18:26] ok [20:18:37] I'm going to try that! [20:19:09] thanks! [20:19:26] and then perhaps the archaeologist is qualified with manager/director (P1037) for the excavation in the same stetement [20:19:58] that starts to make sense :) [20:20:27] thanks a lot! [20:34:50] does this look sort of correct? Q7697397 [20:45:40] Zoeperkoe: Yes, looks useful to me [20:48:03] Awesome! [20:48:21] I had been looking at some other well known sites and no site had anything like this yet