[00:06:04] heh [00:06:07] indexing and caching [03:03:21] Is there an API to generate a list of redirects a page had? [03:03:24] *has? [03:05:37] What do you mean? [03:05:43] Pages that redirect to a given page? [03:05:50] Yes. [03:06:34] https://en.wikipedia.org/w/api.php?action=query&prop=linkshere&titles=Main%20Page&lhshow=redirect [03:09:15] Okay, thanks. [03:09:25] I will see how to only look for a particular namespace. [03:09:46] But tell me, is there going to be only one key in query.pages? [03:10:00] And what is the significance of that number? [03:10:41] 15580374? it's the pageid [03:11:23] So, assuming I were using JavaScript, I have to access it using Object.keys(query.pages)[0], right? [03:11:40] Is there an elegant way. No, right? [03:11:45] I don't know, my javascript is crap [03:12:33] You can pass &indexpageids [03:12:49] Which then adds "pageids": [ "15580374" ], [03:12:54] So you can get the value from there [03:13:04] Okay. Thank you! [05:45:12] Reedy: if I understand correctly, linkshere has a limit of 500. [05:45:38] And if there are more than 500 results, it returns `lhcontinue`. [05:46:15] So in the previous query if I add `&lhcontinue=`, it gives the remaining result. [05:46:23] Is my understanding correct? [10:59:20] Hellos 👋 How do I get the mw.config object of 'Page A' when I am on 'Page B'? [10:59:20] I have tried using the MW API and was not able to get the page config but I guess I am still learning how the API works. [10:59:21] I will be grateful for your help on how to get the mw.config object of 'Page A' when I am on 'Page B'. Thanks. [12:59:12] hi [13:18:04] Hi all, quick question if anyone has any ideas. On MovePage.php line 594 https://doc.wikimedia.org/mediawiki-core/REL1_34/php/MovePage_8php_source.html#l00594 it's pretty clearly shown that the ManualLogEntry created for a page move's protection should have log_action "move_prot", but this isn't documented anywhere, and doesn't outwardly appear to be the case. Any ideas why? [13:50:16] Naypta: works for me [13:51:54] http://dpaste.com/2QDYBNG [14:04:47] acagastya: According to https://en.wikipedia.org/w/api.php?action=help&modules=query%2Blinks it's 5000. You can pass limit=max rather than worrying about hte number. But yes, the continue is something like that, the API will give you the continue string, pass that back in the next query [19:34:29] Hi. I look for the wiki of a Linux distribution a tool to be able to translate the content of the pages. [19:34:58] Is there different options, with pro and cons? [19:36:43] For other parts of the distribution, we use transifex. It could be interesting if translators can continue to use the same tools [20:26:14] papoteur_: for translating wiki content, Extension:Translate is about it [20:29:44] Skizzerz: Have our actual articles be cast in a model to be translatable? [20:32:41] papoteur_: yes, that gives a wiki UI to translate the articles in sections, and know when certain translations are outdated because the original text changed [20:34:20] Skizzerz: OK. Thanks for your help [20:34:22] papoteur_: for example, https://www.mediawiki.org/w/index.php?title=Special:Translate&group=page-Help%3AEditing+pages&language=fr&action=page&filter= [20:37:17] Ah, yes [20:40:51] Reedy: https://www.mediawiki.org/wiki/API:Linkshere says the limit is 500. [20:41:44] Probably due to split userrights [20:41:51] Anyway, still use limit=max [20:41:58] Cause for some accounts it is 5000 [20:42:18] > Maximum number of values is 50 (500 for clients allowed higher limits). [20:42:33] I wonder if I looked at a different module. meh [20:43:39] I am making a tool, and I would like to have maximum, yes. But despite using max, I get the continue number -- so I would be using that. [20:43:47] But what I didn't understand is... [20:44:09] continue.continue is "||" [20:44:14] What is that supposed to mean? [20:44:30] Probably that you've got all the results already [20:45:23] continue.lhcontinue gives a number, and there are more results. [20:45:43] But I notices continue.continue has strings like "||" and "-||". [20:47:22] don't try to understand what it means. Just pass it on the next request to continue pagination (unless there's a bug that breaks pagination and you're interested on fixing it) [20:50:15] Nah, I don't want to paginate -- I want it in one page -- so it is going to be repeated fetches. [20:50:36] But my mind is curious what those symbols are supposed to mean. [20:52:56] they're seperators [20:53:07] the continue key isn't always a single number, sometimes it's a combination of different columns [20:53:18] so it can be columna|columnb|columnc [20:54:58] Ah, yes. I even saw that -- but I was so sleep deprived and I didn't refactor the code and I just could not understand it in the evening. [21:34:58] If I have a page [[Foo]], how do I check if it is a redirect page or not? [21:43:15] https://en.wikipedia.org/w/api.php?action=query&prop=info&titles=Main%20page [21:43:22] if redirect is set, it's a redirect [22:59:27] Okay. Thank you!