[13:50:34] hi all [13:51:03] I needed some help with action api [13:52:13] I want to get the wiki page linked to wikidata i [13:52:19] *id [13:52:49] https://www.wikidata.org/w/api.php?action=wbgetentities&format=xml&props=sitelinks/urls&ids=Q19675 [13:53:26] and requesting it with format=json as well [13:53:57] The returned json contains, each wiki entry as an object [13:54:25] i want to iterate over them to gather all links so I need them as array [13:54:28] any help? [13:57:30] amCap1712: you mean you have an object in JavaScript, and you want to iterate over all fields in that object? [13:57:47] no i'm using gson converter in android [13:58:41] duesen: well actually a similar approach should work [13:58:52] with a few changes I suppose [13:58:56] what language are you working in? [13:58:59] Java [13:59:50] I see. Well, then this really doesn't have anything to do with the API. You just have to find out how the lib you use for processing JSON or XML allows you to iterate over elements [14:00:05] I know that [14:00:13] + [14:00:17] then I'm not sure how I can help :P [14:00:24] actually I am asking if there is a way to format the api response [14:00:40] by adding a parameter in the request [14:00:40] you mean, change the structure of the response? [14:00:44] yes [14:01:06] no. you can select optional parts, and you can pick the serialization format, but that's it. [14:01:41] Like I'm working on a project with MusicBrainz, they allow minor tweeks in response structure by passing a parameter to their api [14:01:42] I suppose the problem here is that a free-form associative array is presented as an "object", and the language on the other end wants to treat it like an "object". [14:01:51] ok no problem [14:01:58] thanks for the help duesen [14:02:13] Yes duesen [14:02:27] actually, we do have flags like that. generally for backwards compatibility when the reponse structure changed. [14:02:39] but I don't think we have one that would turn sitelinks into a list [14:03:15] ok, yeah I did research the api but didn't find anything so thought to ask for once to be sure [14:03:53] amCap1712: maybe this helps: https://stackoverflow.com/questions/37883748/how-can-i-parse-an-associative-array-using-gson-converter-in-retrofit [14:04:05] I think I should do some extra working parsing the json response maually instead of using a converter [14:04:25] thanks duesen, it should work [14:05:29] I wouldn't recommend implementing a json parser. but perhaps there is a java lib that will parse json in to Lists and Maps instead of POJOs [14:06:12] maybe https://gist.github.com/sheharyarn/cba56ff154de2cc62fc5 ? [14:10:40] Yeah, I meant something of this sort only. I will need to parse only one reuest, all other requests work fine. [15:16:22] Can someone help me out with a problem? I am currently setting up a mediawiki for internal use in a sports club. I'm running into problems with image uploading. I can upload images but I can not view them in my wiki [15:17:14] I guess the problem is a folder access issue, how can I resolve that? [16:52:29] I just installed mediawiki in a debian install from apt, did the web based installer, and when I get to where you start using the wiki, it says it can't access the DB [16:52:51] It installed the DB fine [16:53:50] The LocalSettings.ph file it had me download and put in /etc/mediawiki doens't have any settings in it tho? Just stuff about icons that don't look like what settings would normally be [16:58:08] no? [17:00:51] Yeah it looks like the installer doesn't generate a proper localsteeings file [17:01:09] it just has this: [17:01:10] "/mediawiki/resources/assets/debian/poweredby_debian_1x.png", "url" => "https://www.debian.org/", "alt" => "Powered by Debian", "srcset" => "/mediawiki/resources/assets/debian/poweredby_debian_1_5x.png 1.5x, " $ [17:01:28] that was truncated but one line with that kind of stuff [17:01:54] I guess I'll have to make my own [17:03:44] echinos: I'm not super familar with debian packaging of MW, but its possible it has other defaults that are set elsewhere [17:04:44] That sort of icon thing does look rightish though, as that's roughly the syntax to override the bottom icons on MW to change the branding [17:05:01] hm [17:05:34] Well I put the db stuff in my localsettings file, now I get "requested URL /wiki/index.php/Main_Page was not found" [17:05:53] so I guess debian package is broken :) [17:06:03] well the install in it is [17:08:51] maybe I need some package that is not a dependency [17:14:13] bawolff, echinos: IIRC legoktm's worked on the debian packaging, I think he should know about it? [17:33:18] I'll msg him [17:35:33] Hi all :) [17:36:34] I am here because I would like to give a news about mediawiki and to ask one question. [17:36:57] First, mediawiki is now available on yunohost [17:37:35] >> YunoHost is a server operating system aiming to make self-hosting accessible to everyone. https://yunohost.org/#/index_en [17:38:22] My question is about LDAP support, I saw that there are several plugin available https://www.mediawiki.org/wiki/LDAP_Stack [17:39:32] which one should do you recommend ? [17:47:35] lemoldu: if you're going that route, the answer is "all of them" (except Auth_remoteuser, if you don't want automatic login) [17:47:59] otherwise there is the legacy https://www.mediawiki.org/wiki/Extension:LDAP_Authentication [17:48:08] which still will work for the vast majority of use cases [17:56:16] @vscam posted in Create file description page if file is already uploaded to the server manually - https://discourse-mediawiki.wmflabs.org/t/create-file-description-page-if-file-is-already-uploaded-to-the-server-manually/1199/1 [18:08:54] thank you Skizzerz, [18:16:21] I am looking at the wiki, it seems that these plugins do not have the same functions [18:16:54] my priority is to update login and password in order to have a SSO [19:16:16] hi echinos [19:16:40] echinos: what version of debian and the mediawiki package did you install? [21:51:47] legoktm: it was debian 9.8.0 [21:52:01] I don't remember the version, it would be whatever is in the default repo [21:52:18] I just tried with ubuntu 18.10 server install, looks fine now [21:53:10] which, incidentally, is mediawiki 1.31.1