[07:50:54] [[Tech]]; Legoktm; /* Starting the Wikimedia Rust developers user group */ new section; https://meta.wikimedia.org/w/index.php?diff=21101315&oldid=21092688&rcid=17410148 [12:24:15] [[Tech]]; Bonobonoxyz; /* API query in Polish language */ new section; https://meta.wikimedia.org/w/index.php?diff=21102123&oldid=21101315&rcid=17411457 [13:15:27] [[Tech]]; Base; /* API query in Polish language */; https://meta.wikimedia.org/w/index.php?diff=21102267&oldid=21102123&rcid=17411648 [17:56:11] Hi all, I'd like to have this quote generator work with Polish wikiquote, but however I try, I can't get reults [17:56:13] https://codepen.io/arukomp/pen/ZGJYXy [17:56:37] that's what I'm looking for [17:57:50] Is anyone from the Polish team here? [18:47:37] Are my messages visible at all? [18:47:43] yes [18:47:54] thanks [18:48:49] UTF-16 O_o [18:48:56] maybe there's a better place to ask than here? [18:50:02] not really, it's just that your question is not very clear and you can't expect to have answers in 1 h :) [18:50:14] Nemo's 0th law of MediaWiki development may be useful https://bash.toolforge.org/quip/AU7VVyPV6snAnmqnK_0N [18:51:13] yeah, but I can't find the info on parsing the Polish database, seems to be a different structure [18:51:52] Change en to pl in the api call? [18:52:03] It should be fairly similar if the code is doing it right [18:53:21] And the page name to whatever is the polish equivalent [18:53:28] Then the id a few lines below [18:54:36] BonoBono: so you're trying to use https://www.mediawiki.org/wiki/Extension:TextExtracts ? That's the first thing you need to say :) [18:57:39] RhinosF1|NotHere yeah, tried that in a few ways... I actually got a json response after replacing a query with a word with no diacritics (wojna) but it woudn't render. I was working on this pen as a trial [18:57:40] https://codepen.io/malavender/pen/qdvMyO [18:58:48] BonoBono: when you say wouldn't render, what does that mean? [18:59:03] Could you see any errors? [19:03:18] I wasn't looking. Now that pen doesn't work at all for me... [19:05:24] [[Tech]]; Nemo bis; /* API query in Polish language */ +re; https://meta.wikimedia.org/w/index.php?diff=21103878&oldid=21102267&rcid=17413924 [19:07:38] @snitch wow, that will be helpful [19:08:09] O_o [19:08:46] the box where the quote was to appear was empty [19:11:14] now codepen doesn't work, maybe it's down [19:18:15] OK, it's back. So in this codepen: https://codepen.io/bonobonobo/pen/MWbJaWz?editors=1000 [19:18:56] line 7 of js I am replacing the query for a single word: wojna [19:19:21] and in wikiquote-api.js en is replaced with pl [19:20:25] that's my error RhinosF1|NotHere: ncaught TypeError: result.query is undefined [19:22:03] Nemo_bis just understood what happened there with snitch. Thanks for replying [19:22:14] :) [19:22:30] AFK for 20mins [19:49:38] OK, so to use TextExtracts I need MediaWiki. I downloaded that, but it's just a .tar file... [19:49:50] no you don't [19:52:46] oh just the extension.js? [19:53:00] sorry, .json [19:54:12] Nope [19:54:20] You just need to access it's API [19:54:25] Which would be https://pl.wikiquote.org/w/api.php?action=help&modules=query%2Bextracts [20:32:55] https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&prop=extracts&exchars=175&titles=Therion [20:33:10] does that work with other languages [20:33:13] ? [20:35:10] it depends on your definition of "work" [20:38:15] I'm thinking this is sort of a generator, so.... I'm wrong.. [20:39:26] I managed to get this, but there's no content (it's a quote of the day) [20:39:28] https://pl.wikiquote.org/w/api.php?action=query&prop=extracts&format=json&exsectionformat=plain&titles=Wikicytaty%3ACytat%20dnia&callback=? [20:40:12] if you want the quote of the day, that's definitely not the way [20:42:05] No, I need a set, and then pick the sorter ones.... Basically I'm trying to make a MagicMirror app, and the display area will be quite small, so I can't have long quotes... [20:43:44] https://it.wikiquote.org/w/api.php?action=help&modules=featuredfeed is sorta useful sometimes