mediawiki

How to get the result of a complex Wikipedia template?

谁说我不能喝 提交于 2019-12-10 11:24:06
问题 This is a question that is a bit hard to follow but I will do my best explaining it. First, let me present an example page: http://en.wikipedia.org/wiki/African_bush_elephant That's a wikipedia page, a specie page in particular since it has the 'taxobox' to the right. I'm trying to parse the attributes in that taxobox using PHP. There's two ways in Wikipedia to create such a taxobox: manually, or by using the special "auto taxobox" template. I can parse the manual one. I use Wikipedia's API

Resize images upon upload in Mediawiki

孤人 提交于 2019-12-10 03:44:07
问题 I am ideally after resizing and setting a maxWidth and maxHeight on all my image uploads to mediawiki. Having looked through the documentation of various different pages in mediawiki I am unable to find anything that says you can edit in anyway images uploaded to a site built on mediaWiki I have no problem in writing some custom PHP but truth is I have no idea where to start looking in mediaWiki. My thoughts are: imagemagick similarly to this: I think you need the > flag on the resize:

Get an article summary from the MediaWiki API

女生的网名这么多〃 提交于 2019-12-10 00:33:02
问题 I am looking for a mediawiki api using which I can get short description about any query string. For example , if I search for Nicolas Cage then it should return the short description for him. I tried http://en.wikipedia.org/w/api.php?%20format=json&action=query&titles=Nicolas%20Cage&prop=revisions&rvprop=content I am not sure if prop=revisions is right. My intention is to get a short description on the final version of the page. Also I need another api which can give the link of the

What's wrong with this authorization exchange?

泪湿孤枕 提交于 2019-12-09 18:35:57
问题 I've set up a MediaWiki server on an Azure website with the PluggableAuth and OpenID Connect extensions. The latter uses the PHP OpenID Connect Basic Client library. I am an administrator in the Azure AD domain example.com , wherein I've created an application with App ID URI, sign-on URL and reply URL all set to https://wiki.azurewebsites.net/ . When I navigate to the wiki, I observe the following behavior (cookie values omitted for now): Client Request GET https://wiki.azurewebsites.net/

login to mediawiki using RCurl

喜夏-厌秋 提交于 2019-12-09 13:54:09
问题 how can I login to a mediawiki with RCurl (or Curl, and I can adapt it to the R package)? I just want to parse a page but I need to login otherwise I can't access it. 回答1: The Mediawiki API has a login function which returns cookies and a token. You have to save and send both back to the API in order to authenticate the session and login. Here's a way to do it with curl and XMLstarlet in bash: Send a request for a login token, saving the cookies in cookies.txt and the output in output.xml.

Migrating MediaWiki Sites over to Windows Sharepoint Services Wiki

走远了吗. 提交于 2019-12-09 12:06:00
问题 Had anybody found a way to migrate MediaWiki pages over to WSS Wikis? We just put up Sharepoint 2007 and while it appears to meet our needs, it doesn't appear to be any tool provided by Microsoft to migrate MediaWiki pages over to WSS wikis. 回答1: Create aspx File and add template of wikipage Library page in source and then migrate as Wikipage library of sharepoint 2007 or 2010 回答2: There is no such tool provided by Microsoft at this time. There is one being developed though in the SharePoint

How to fix “readapidenied” error on mediawiki-api in Java

别说谁变了你拦得住时间么 提交于 2019-12-08 10:13:51
问题 I'm working on a project which use the mediawiki API and I have this error : error code=readapidenied info:'You need read permission to use this module.' INFOS: Could not retrieve Mediawiki Version via API - will assume Mediawiki 1.27 or before you might want to set the Version actively if you are on 1.28 and have the api blocked for non-logged in users This is my code : Mediawiki wiki=new Mediawiki(site); Login login=wiki.login(login,password); //error wiki.edit(title, content , summary);

How to get data from mediawiki api using Angularjs?

僤鯓⒐⒋嵵緔 提交于 2019-12-08 08:16:28
问题 While I try to access wiki api using Angularjs $http.get(), CORS issues occured. Here is my code $http.get('http://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=India') .success(function(data){ console.log('data' +data); }); And this is the error message XMLHttpRequest cannot load https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&exintro=&titles=India. No 'Access-Control-Allow-Origin' header is present on the requested resource.

Move mediawiki TOC to sidebar

邮差的信 提交于 2019-12-08 07:54:37
问题 I've been trying to find a method on moving the TOC in MediaWiki to the sidebar or any location really that I want it outside of the main content but with no success. The simplest looking solution brought up the following but it doesn't seem to actually move the TOC. <div id="toc_sidebar_holder"> </div> <script type="text/javascript"> var toc = document.getElementById('toc'); var toc_holder = document.getElementById('toc_sidebar_holder'); if(toc && toc_holder){ toc.parentNode.removeChild(toc)

Concurrent Python Wikipedia Package Requests

浪尽此生 提交于 2019-12-08 07:02:43
问题 I am making a python application which uses the python Wikipedia package to retrieve the body text of 3 different Wikipedia pages. However, I am noticing very slow performance when retrieving the articles one at a time. Is there a method that I can use to retrieve the body text of 3 Wikipedia pages in parallel? 回答1: If you want the 'raw' page you can use any python scraping library such as twisted/scrapy. But, if you are looking for the parsed wiki format you should use pywikibot