mediawiki

Wikipedia Category Hierarchy from dumps

谁说胖子不能爱 提交于 2019-12-03 10:20:01
问题 Using Wikipedia's dumps I want to build a hierarchy for its categories. I have downloaded the main dump (enwiki-latest-pages-articles) and the category SQL dump (enwiki-latest-category). But I can't find the hierarchy information. For example, the SQL categories' dump has entries for each category but I can't find anything about how they relate to each other. The other dump (latest-pages-articles) says the parent categories for each page but in an unordered way. It just states all the parents

TEXTAREAs scroll by themselves (on IE8) every time you type one character

人盡茶涼 提交于 2019-12-03 08:55:49
问题 IE8 has a known bug (per connect.microsoft.com) where typing or pasting text into a TEXTAREA element will cause the textarea to scroll by itself. This is hugely annoying and shows up in many community sites, including Wikipedia. The repro is this: open the HTML below with IE8 (or use any long page on wikipedia which will exhibit the same problem until they fix it) size the browser full-screen paste a few pages of text into the TEXTAREA move the scrollbar to the middle position now type one

How to get image URL in wiki api?

折月煮酒 提交于 2019-12-03 07:12:32
When I call wiki APIs for accessing image URLs, I get image URLs like this, File:Ad-tech London 2010 (2).JPG How to get the correct URL of this file from wiki API? brightbyte You can get the propert URLs from an imageinfo query like this: https://en.wikipedia.org/w/api.php?action=query&titles=File:Test.jpg&prop=imageinfo&iilimit=50&iiend=2007-12-31T23:59:59Z&iiprop=timestamp|user|url More info at MediaWiki API Help . There's little documentation on image/thumbnail URLs besides T153497 . You can use Special:FilePath and/or thumb.php : https://commons.wikimedia.org/wiki/Special:FilePath/Ad-tech

Convert MediaWiki wikitext format to HTML using command line

让人想犯罪 __ 提交于 2019-12-03 06:33:28
I tend to write a good amount of documentation so the MediaWiki format to me is easy for me to understand plus it saves me a lot of time than having to write traditional HTML. I, however, also write a blog and find that switching from keyboard to mouse all the time to input the correct tags for HTML adds a lot of time. I'd like to be able to write my articles in Mediawiki syntax and then convert it to HTML for use on my blog. I've tried Google-ing but must need better nomenclature as surprisingly I haven't been able to find anything. I use Linux and would prefer to do this from the command

Any better way to create MediaWiki numbered lists?

爷,独闯天下 提交于 2019-12-03 05:26:12
问题 When using MediaWiki's markup language, the only thing that I hate is creating numbered lists. The only way I know to create a list is to do something like this: #Item1 #Item2 However, if I want to add spaces or some other text between those lines, the numbering gets lost. For example, the following will create text that has two number one items: #Item1 Somestuff #Item2 Is there any way around this, or should I just use bullet points instead? I noticed just now that the stackoverflow system

Wikipedia api fulltext search to return articles with title, snippet and image

百般思念 提交于 2019-12-03 04:32:51
问题 I've been looking for a way to query the wikipedia api based on a search string for a list of articles with the following properties: Title Snippet/Description One or more images related to the article. I also have to make the query using jsonp. I've tried using the list=search parameter http://en.wikipedia.org/w/api.php?action=query&list=search&prop=images&format=json&srsearch=test&srnamespace=0&srprop=snippet&srlimit=10&imlimit=1 But it seems to ignore the prop=images, I've also tried

Searching Wikipedia using API

守給你的承諾、 提交于 2019-12-03 03:10:05
问题 I want to search Wikipedia using the query action. I am using this url: http://en.wikipedia.org/w/api.php?action=query&format=json&list=search&srsearch=apple That works but I want to get into the first result of the search. How can I do that? Note: That url works fine when there is only one result.. I just need the title and some short description. 回答1: I don't think you can do both in one query. 1. To get the first result, use the Opensearch API. https://en.wikipedia.org/w/api.php?action

Convert MediaWiki wikitext format to HTML using command line

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I tend to write a good amount of documentation so the MediaWiki format to me is easy for me to understand plus it saves me a lot of time than having to write traditional HTML. I, however, also write a blog and find that switching from keyboard to mouse all the time to input the correct tags for HTML adds a lot of time. I'd like to be able to write my articles in Mediawiki syntax and then convert it to HTML for use on my blog. I've tried Google-ing but must need better nomenclature as surprisingly I haven't been able to find anything. I use

How can I fix the MediaWiki error “Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again.”?

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The problem I am having is that I can not log on to my newly created wiki that I made using MediaWiki. I have searched the web for an answer, and the ones I found did not help with this specific issue (like this one: problem with mediawiki cookies ) I have tried with multiple browsers and changed the setting to make sure that cookies are enabled, but I keep getting the same error: " Wiki uses cookies to log in users. You have cookies disabled. Please enable them and try again. " I'm not sure whether this is a problem with my

Get Text Content from mediawiki page via API

匿名 (未验证) 提交于 2019-12-03 02:12:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm quite new to MediaWiki, and now I have a bit of a problem. I have the title of some Wiki page, and I want to get just the text of a said page using api.php , but all that I have found in the API is a way to obtain the Wiki content of the page (with wiki markup). I used this HTTP request... /api.php?action=query&prop=revisions&rvlimit=1&rvprop=content&format=xml&titles=test But I need only the textual content, without the Wiki markup. Is that possible with the MediaWiki API? 回答1: I don't think it is possible using the API to get just the