[00:24:15] (PS1) Yaron Koren: Changed getWordForYesOrNo() to use messages from MW, not SMW [extensions/SemanticForms] - https://gerrit.wikimedia.org/r/229290 [00:24:53] (CR) Yaron Koren: [C: 2 V: 1] Changed getWordForYesOrNo() to use messages from MW, not SMW [extensions/SemanticForms] - https://gerrit.wikimedia.org/r/229290 (owner: Yaron Koren) [16:18:46] I have a question. I would like to do an XML export for use with an external tool (aardtools I believe is the name) and believe I would need queries to be substituted with their endpoint data in the export. Is there a way to do this in what ultimately looks like mediawiki XML using SMW? (One way would be to just render static versions at-that-time inline of every template. Yes, this prevents resuability in the export, but [16:24:49] greysondn: the last part of your question got cut off, after "but". [16:25:23] The lack of warning disturbs me... [16:25:27] > (One way would be to just render static versions at-that-time inline of every template. Yes, this prevents resuability in the export, but it would give me what I'm looking for.) [16:25:37] Yeah, it sucks. [16:25:40] Okay, cool. [16:26:54] greysondn: it's not "semantic", but the ViewXML functionality of Data Transfer may be what you're looking for: https://www.mediawiki.org/wiki/Extension:Data_Transfer [16:30:41] I yanked a page from a site using it as example and compared it to an export I have. [16:30:47] No. That does not work. [16:31:23] Compare eg; https://wiki.hackerspaces.org/Special:ViewXML?title=Special%3AViewXML&categories%5BProgramming%5D=on to any mediawiki XML export of page/wiki [16:31:54] greysondn: oh, you mean you need it to be in MediaWiki's exact XML format? [16:32:00] Yes. [16:32:24] In that case, I don't think there's an option other than using MW's Special:Export. [16:32:42] Most likely semantic templates would need rendered inline in the export as opposed to remaining templates. [16:32:51] That's extremely bad. [16:33:05] That's, like, the worst thing ever that you could tell me. [16:33:15] That's a ratheer strong statement... [16:33:19] (rather) [16:33:33] Couldn't you just create a script that assembles the XML you need? [16:34:31] Doubtful? I'm very weak on mediawiki API; would need to assemble the page and inline transform templates? I could rip pages and used to have a chatbot that would look up data points using APIs in my teams wiki but [16:34:41] not so strong on the full depth of things, for example how to do that inline [16:35:32] Comes down to needing to de-semantic the wiki, in effect, in its final representation, without any loss of data in any given page. The words here escape me. [16:36:03] I didn't actually understand most of that, but I think assembling the XML might be easier than you may think. [16:36:36] Considering my native interchange is YAML, I think I'm reasonable to have doubts in my abilities to work with XML. [16:37:16] It's just a matter of putting in brackets in the right places, it's not like learning Italian or something. [16:37:33] Okay. Let's start at stage 1 of requirements. The tools I want to use don't understand Semantic Mediawiki but they do understand Mediawiki XML just fine. [16:37:58] Alright. Check out "?action=render" in the URL for an easy way to get the rendered HTML of a page. [16:38:03] So what I need to do is convert semantic queries/etc to their "final"/"end user" representations. More-or-less. [16:38:42] Rendering HTML isn't useless. It's the long way around, if I had to guess. Give me a couple minutes. [16:41:05] Yes. That is one valid road forwards. I would have to assemble the final representations by hand and I suspect there's going to be other problems besides that cannot be foreseen. [16:41:57] You seem strangely pessimistic about something I would regard as a fairly straightforward task... [16:42:14] Question - Why was semantic mediawiki put together with no simple way to render a static export? HTML dumps aren't the worst thing (didn't even realize you could do that to mediawiki) but I'd think that exporting semantic pages for import in a non-SMW wiki would have been foreseen. [16:42:50] XML has shown a talent for kicking my aft end. I don't like working with it, in any form. [16:42:56] There's never been a strong reason for it, I suppose... [16:43:44] It's not common to want to export an in-wiki visualization to outside the wiki. [16:44:38] Also thought mediawiki had a way to include static versions of templates inline. You wrote some special markup and then when you saved it the markup was replaced in page source with the template as it was at that time. [16:44:58] Yes, you can do that with #subst. [16:46:00] I wonder how well that would work? Or if it can be called during export for all templates? [16:46:26] The first question basically amounts to ruining the wiki... so I guess not well unless you worked around it. [16:46:46] The second is more-or-less what I'm looking for, since I walked in here. [16:47:12] I don't get it - don't you actually want the HTML? [16:50:54] No. The tool I'm working with wants a MediaWiki export. [16:51:06] Standard XML format. [16:51:27] Yes, but what is that you want to show up in the XML for each page? [16:51:39] Maybe some more specificity would make this easier. [16:51:50] I mean, can you give an example? [17:00:34] Let's say I wanted to get one page, in my wiki "Tenebris Anecdota", exported nicely and neatly. An export with related pages and templates looks like this: http://pastebin.com/KBrYCVS3 [17:00:44] (That has been cut down for brevity's sake.) [17:01:01] All the way at the end you'll find the major semantic template used here. [17:04:40] greysondn: oh...... so you just want the wikitext? [17:05:56] Optimistically I'd like to see that first pastebin become something similar to this one: http://pastebin.com/dN0Q0E1Z [17:06:24] All I've done to create the second one is used #subst on templates. Twice. [17:07:36] Man. So, #show should get called, but nothing else? [17:08:57] Any semantic queries need substituted out of the text by the time the XML export is generated. That would be the ideal. [17:09:32] #show is, of course, a semantic query. I'm a bit weak (hence the templates) but I'm aware that #show is not the only semantic query. [17:09:59] There's also #ask... but that can produce all sorts of HTML, and JavaScript. [17:12:48] That should be safe to substitute as well in a similar fashion. (reading https://semantic-mediawiki.org/wiki/Help:Inline_queries#Parser_function_.23ask ) [17:13:46] I confess I don't really understand any of this... for #ask you're fine with the HTML representation, but for #show you prefer wikitext, and for other parser functions you don't want any substitution at all? [17:15:02] What other parser functions from SMW does that leave? In other words, if we could substitute out the SMW queries, does that leave us with only parser functions that are from "stock" mediawiki? [17:15:32] The tool I'm using can handle stock mediawiki, but the strange syntax of SMW queries is likely to hang it up. [17:16:14] (Also, Mediawiki can handle inline HTML IIRC, so that template would be substituted as inline HTML into the source text of whatever article called it for #ask) [17:17:06] Well, core MediaWiki, and potentially whatever other extensions are installed. [17:19:49] Is this outside system also a MediaWiki wiki, by the way? And if not, how can it make use of wikitext? [17:21:49] Aardict? [17:22:23] http://aarddict.org/aardtools/doc/aardtools.html [17:22:42] Can confirm version of mediawiki is old enough to be able to use XML dumps. [17:22:58] On my todo list, but, ah, you know how broken extensions can be :/ [17:24:14] Oh, interesting - never heard of it. [17:25:24] * greysondn facepaws [17:25:43] This might be a difficult task - would require parsing of only certain elements of the page, etc. [17:26:39] If I'm reading the source correctly (as well as a fragment of the readme), the couchdb readout from mwscrape uses HTML output while preserving intrawiki links. [17:26:42] https://github.com/itkach/mwscrape [17:26:54] (Hence the facepawing.) [17:27:32] Granting that SMW maybe wants to facilitate exporting "useful" semantic pages en masse to non-semantic wikis this may have solved itself if that tool can use my wiki's somewhat dated API. [17:27:59] And I'm an idiot that wastes people's times. [17:28:03] but maybe not. We'll see. [17:28:21] Alright. Well, good luck. [17:28:29] Da. [17:28:33] Also, for what it's worth [17:29:09] It's the wiki I store all my debate notes and game walkthrough/etc data in that I want to export, but it's not on SMW yet. If it was on SMW, I could do a bit more with it than I presently do. [17:29:24] The incentive to try to find a way to be able to export it is there. [17:29:42] I carry a copy with me on my phone, using Aard Dictionary for Android. Useful, all that. [17:30:36] Ciao. Thanks for your help. [18:57:00] SemanticMediaWiki/SemanticCite#95 (I18n - 7408ab5 : mwjames): The build passed. [18:57:00] Change view : https://github.com/SemanticMediaWiki/SemanticCite/compare/I18n [18:57:00] Build details : https://travis-ci.org/SemanticMediaWiki/SemanticCite/builds/74288653 [21:39:16] [SemanticMediaWiki] mwjames opened pull request #1102: Add onoi/http-request (master...http-request) http://git.io/vO1jS [21:45:21] [SemanticMediaWiki] mwjames created param (+1 new commit): http://git.io/vOMfZ [21:45:21] SemanticMediaWiki/param 9994fa5 mwjames: ParserParameterProcessor::addParameter, value can be an array [21:45:46] [SemanticMediaWiki] mwjames opened pull request #1103: ParserParameterProcessor::addParameter, value can be an array (master...param) http://git.io/vOMf0 [21:50:08] [SemanticMediaWiki] JeroenDeDauw pushed 1 new commit to master: http://git.io/vOMUf [21:50:08] SemanticMediaWiki/master 4654201 Translation updater bot: Localisation updates from https://translatewiki.net.... [21:55:58] [SemanticResultFormats] JeroenDeDauw pushed 2 new commits to master: http://git.io/vOMk9 [21:55:58] SemanticResultFormats/master b641839 Translation updater bot: Localisation updates from https://translatewiki.net.... [21:55:58] SemanticResultFormats/master 987e6f6 jeroendedauw: Merge branch 'master' of ssh://wmfgerrit/mediawiki/extensions/SemanticResultFormats [23:13:04] SemanticMediaWiki/SemanticCite#105 (bib-author - 306383b : mwjames): The build passed. [23:13:04] Change view : https://github.com/SemanticMediaWiki/SemanticCite/commit/306383b03ac5 [23:13:04] Build details : https://travis-ci.org/SemanticMediaWiki/SemanticCite/builds/74327781 [23:44:46] [SemanticMediaWiki] mwjames force-pushed param from 9994fa5 to 5e9f352: http://git.io/vOMSS [23:44:46] SemanticMediaWiki/param 5e9f352 mwjames: ParserParameterProcessor::setParameter