[01:40:53] Hey! [01:41:00] Hi! [01:45:17] I just started learning HTML + CSS, and I'm trying to understand how to extract the main info from any article in plaintext. And then plug that text in my local html file, is this possible and how do I do it? I have tried to understand by playing around in the API sandbox, but I can't get it in plaintext and I dont know how to plug it even [01:45:19] Thanks. [01:49:12] Hellos: There's a textextracts module. [01:49:28] Though I'm not sure you can get the full article text with it, maybe just the first section. [01:49:59] Extracting just the article text is shockingly difficult in some ways. [01:50:10] Because it's all one big blob, so you gotta figure out where to cut. [01:50:24] Infoboxes, navboxes, hatnotes, categories, etc. [01:51:03] https://en.wikipedia.org/w/api.php?action=help&modules=query%2Bextracts is the module I mentioned. [01:51:13] So enabling explaintext wont remove everything? [01:51:51] "Return extracts as plain text instead of limited HTML." [01:53:20] I'm fine with just the first section btw [01:53:27] As long as its clean text [01:53:30] Oh, if you just want the first few sentences, plaintext will work. [01:53:34] You can also clean text yourself. [01:53:39] Using a library such as BeautifulSoup or similar. [01:53:43] Removing HTML isn't so terrible. [01:54:46] https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=175&titles=Oprah+Winfrey&exlimit=1&explaintext=1 [01:55:53] This is what I got, and I understand now that its correct. But I don't know how to plug it. Hold on, my understanding is limited. [01:56:39] Do you understand what JSON is? [01:57:50] No sorry [01:58:59] So that api.php URL will return JSON. [01:59:03] If you add &format=json to the URL. [01:59:10] https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=175&titles=Oprah+Winfrey&exlimit=1&explaintext=1&format=json [01:59:41] JSON is a form of structured data. Other applications and scripts can ingest this JSON structured data and can rely on its format. [01:59:53] So your script or application would access that URL. [01:59:54] https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exchars=175&titles=Oprah+Winfrey&exlimit=1&explaintext=1&format=json [02:00:08] And take the body content from the response. [02:00:14] Which is all the JSON as encoded text. [02:00:35] And then you would parse that JSON in your application or script and re-use it as you'd like. [02:01:03] I see, thank you! [02:01:08] Yeah its that last part hehe [02:01:18] I'm starting in the wrong end I think [02:01:29] But I need a fun project to keep me interested [02:01:52]
[02:02:16] Okay thanks! I'll stay at it :) [02:03:30] Oh, left already. [02:03:46] Script: https://p.defau.lt/?_8XxqTHkfk2juutsscCPFQ [02:04:02] Output: https://p.defau.lt/?Yb4_2JrHjdKuNWstaVZ9ww [02:31:57] Hi again, I'm just wondering how to make an HTTP GET request for the extract URL. I'm trying to add it to my html document. [03:09:13] So transient, that one. [08:41:39] How can I disable 'Edit source' tab? Like to have VisualEditor as default [08:48:38] i ve got this error; Échec de l'importation : Expected tag, got [09:18:56] any idea about the problem? [09:25:21] too much french [09:26:23] importation failed [09:31:31] ok problem solved [09:32:18] more seriously, if you want somebody to help, get the complete error, "got" must be followed by something [09:32:42] and you're missing the mediawiki tag [09:33:35] this is the whole line [09:34:05] and i already close the tag [09:34:33] you didn't start it [09:34:37] i have also use a file that already worked [09:34:50] open & close [09:35:08] can you show the file [09:35:16] yes [09:37:00] http://www.libreidea.org/Test [09:40:46] did you import the correct file ? [09:41:14] yes and i made many try [09:41:15] https://www.mediawiki.org/wiki/Topic:S1839h8s2l1wxvfc [09:41:22] and check the character encoding of your file [09:41:38] it s UTF8 [09:41:50] i already see this page [09:41:52] also look at https://www.google.com/search?q=Expected+%3Cmediawiki%3E+tag%2C+got [09:42:20] https://www.mediawiki.org/w/index.php?title=Topic:Rcc7jb30b9pm4mge&topic_showPostId=rcpu5cn2q8k9ve81#flow-post-rcpu5cn2q8k9ve81 [09:45:05] i ve no idea how to do [09:45:38] first time it shows me the error but it has imported 2 pages of 8 [09:46:16] but now i can't succes to import a page [09:46:45] http://www.libreidea.org/Special:Log/import [09:58:25] can indentation be a problem? [10:10:27] there are lot of suggestions in these results [10:10:29] try them [10:21:01] rom1504, i have exported a page, change only the title, and same error; can the import module fucked? [11:09:59] Hello! Would you please tell me who can update a translation of an extenstion in one of the wikimedia projects? [11:11:15] and how is it done? [11:11:40] Yoosefp: can you do it ? [11:13:51] I actually have done the translation but I don't know how to include it in wikisource [11:22:10] Yoosefp: which extension it is ? [11:22:38] Proofreadpage [11:23:59] Yoosefp: do you know how to use github ? this is their project page https://github.com/wikimedia/mediawiki-extensions-ProofreadPage [11:25:24] I can exporth the Json file from translatewiki.net. Should I upload it to github? [11:28:16] Yoosefp: I'm trying to find how to open an issue but I can't on their github, if you can locate where they include the translations you can do a pull request if you know how [11:28:47] Yoosefp: else you can pm all the contributors on github and ask them to put it on for you [11:29:27] Yoosefp: https://github.com/wikimedia/mediawiki-extensions-ProofreadPage/tree/master/i18n [11:29:30] here are the jsons [11:29:58] log into github and press upload files on the upper right corner of that page [11:30:11] which language is your translation in ? [11:30:14] thank you [11:30:16] I try [11:31:42] your translation in dutch ? [11:32:24] no. It is in Persian. (fa) [11:32:37] ah ok [11:32:58] check this https://github.com/wikimedia/mediawiki-extensions-ProofreadPage/blob/master/i18n/fa.json [11:33:07] maybe if it is there already just improve it ? [11:35:04] Combined2857: I just singned up in Github. Is it possible for me to update the file? [11:35:48] Yoosefp: yeah sure just open that file and click the little pencil on the top right corner [11:36:08] when you done press open as pull request [11:38:50] the green button at the end of page [11:51:43] Combined2857: I updated the file. What will happen next? [11:51:45] !translate | Yoosefp [11:51:45] Yoosefp: You can help translating MediaWiki to your language at translatewiki.net [11:52:32] Yoosefp: we actually handle translations of mediawiki and most extensions via the TranslateWiki website [11:54:20] Combined2857: we don't actually use GitHub for our development (its a read only mirror), have a look at https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker to read about how we use Git and Gerrit to manage our code base [11:54:33] I'm sorry p858snake i didn't know [11:55:00] Yoosefp: i think p858snake knows much more about translations [11:56:53] Combined2857: That's ok [11:58:26] p858snake: I already have finished editing the translation file on translatewiki.org. Now I just want fa.wikisource.org to be updated [11:59:41] the translations for mediawiki extensions will sync over to wikisource projects automatically after 24hrs iirc [12:03:18] p858snake: Thank you [12:29:19] thank you Yoosefp for contributing mate [12:29:53] Thanks to you [12:57:50] mediawiki seem to have a very active dev team congrats [16:13:57] Hi. is it possible to define something like: and have all lines inbetween that block treated as list items? [18:08:11] I was wondering is there a way you can add "comments" in the source of a page that are not visable when the page is saved? [18:11:39] Jonathan_: HTML comments [18:17:55] So the /* style will work. Cool thanks. [18:18:57] HTML comments are [19:26:18] Hello [19:26:40] I need some help installing this skin: https://www.mediawiki.org/wiki/Skin:Minerva [19:27:26] I've followed the instructions in that page, but for some reason it just doesn't works, returning a blank page [20:04:52] !blankpage [20:04:52] A blank page or HTTP 500 error usually indicates a fatal PHP error. For information on debugging (including viewing errors), see . [20:05:01] oh, he left…