mediawiki

Content of infobox of Wikipedia

不羁岁月 提交于 2019-12-17 19:05:02
问题 I need to get the content of an infobox of any movie. I know the name of the movie. One way is to get the complete content of a Wikipedia page and then parse it until I find {{Infobox and then get the content of the infobox. Is there any other way for the same using some API or parser? I am using Python and the pywikipediabot API. I am also familiar with the wikitools API. So instead of pywikipedia if someone has solution related to the wikitools API, please mention that as well. 回答1: Instead

Is there any API in Java to access wikipedia data

倖福魔咒の 提交于 2019-12-17 18:17:26
问题 I want to know: is there any API or a query interface through which I can access Wikipedia data? 回答1: Mediawiki, the wiki platform that wikipedia uses does have an HTTP based API. See MediaWiki API. For example, to get pages with the title stackoverflow, you call http://en.wikipedia.org/w/api.php?action=query&titles=Stackoverflow There are some (incomplete) Java wrappers around the API - see the Client Code - Java section of the API page for more detail. 回答2: For the use with Java, try http:/

Parsing a Wikipedia dump

一世执手 提交于 2019-12-17 10:59:18
问题 For example using this Wikipedia dump: http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=lebron%20james&rvprop=content&redirects=true&format=xmlfm Is there an existing library for Python that I can use to create an array with the mapping of subjects and values? For example: {height_ft,6},{nationality, American} 回答1: It looks like you really want to be able to parse MediaWiki markup. There is a python library designed for this purpose called mwlib. You can use python's built

MediaWiki Authentication from external form

混江龙づ霸主 提交于 2019-12-14 03:54:05
问题 I have already installed mediawiki , but I want to make users authenticate from external authentication form.When they enter the right username and password , they are redirected to the wiki page and do not need to retype the Login data again , and hence they can go to edit the wiki the way they want.How can I achieve that? 回答1: Use the mediawiki API with action=login . See http://en.wikipedia.org/w/api.php 回答2: If you have external authentication service that provides web authenticaion

Get all page titles on Wikipedia that contain a specific word

假如想象 提交于 2019-12-14 03:27:57
问题 I am writing an "auto-wikifier" tool using HTML and JavaScript. For each word in the text to be wikified, I need to obtain a list of pages that contain that word (so that the matching phrases in the text can be automatically wikified, if they are found). Is there a way to obtain a list of all Wikipedia pages that contain a specific word, using one of Wikipedia's APIs or web services? function getMatchingPageTitles(theString){ //get a list of all matching page titles for a specific string,

In MediaWiki, is there a way I can apply [[Image:<name>]] style resizing to external images?

醉酒当歌 提交于 2019-12-14 02:17:03
问题 MediaWiki has a great built-in way for finessing the display of images, e.g. from http://www.mediawiki.org/wiki/Help:Images : [[File:MediaWiki:Image sample|thumb|50px]] [[File:MediaWiki:Image sample|border|50px]] However, unfortunately, the MediaWiki repository I have to work with has disabled image uploads. I'm wondering if there's a way I can apply the above convenience shortcuts to an externally hosted image URL, e.g. ideal would be: [[File:http://somewhere.com/image.jpg|thumb|50px]] Is

Wordpress MediaWiki Cookie Integration

浪尽此生 提交于 2019-12-13 16:24:01
问题 I have my Wordpress install and MediaWiki sharing the same login information. Unfortunately, users need to log into both separately, but at least they use the same credentials. What I would like to do is cause a successful login on the Wordpress blog to also cause a login for MediaWiki (ideally both directions). There are two ways this could happen: Logging in causes a login on the other application (writes the cookie and creates the session in the DB) Accessing an application checks for the

MediaWiki custom skin: check if current page is main page

你。 提交于 2019-12-13 15:27:38
问题 I'm setting up a bunch of different language mediawiki's on one codebase. So far most of it is working, but I want to use a main page that looks different than the rest of the pages. To do this I originally just added some css rules that only applied to the main_page class: body .page-Main_Page { <rules> } The problem is that in other languages the main page is called differently (and the class changes accordingly), so I either have to add css rules for all possible main page titles (not

MediaWiki categories not updating automatically

强颜欢笑 提交于 2019-12-13 13:37:20
问题 I have a MediaWiki instance running on a Linux server that does not seem to automatically update its categories whenever a page edit is submitted. I have never seen this on any other wikis I've worked with, so I'm wondering if there's some script that's not configured correctly. Periodically running the rebuildAll.php or refreshLinks.php script isn't really viable when we have hundreds of edits happening per hour and need the categories to be populated instantaneously. Running rebuildAll.php

Transclude a category in MediaWiki

对着背影说爱祢 提交于 2019-12-13 12:26:15
问题 I'm not quite sure if this is possible in MediaWiki. I've got several categories, each containing a few pages. If you open a category page you'll see the contents of the category that usualy consists of these three parts: A user defined text (which can be edited by using the edit link). All subcategories that are attached to this category. All pages that are attached to this category. My goal is to create a page that includes at least part #3 of several categories. A page that shows me all