Wikipedia API - return entire page as JSON - json

I'm trying to figure out how to use the Wikipedia API to get an entire Wikipedia page in JSON format.
Here is my current query. It's not giving me nearly all the content from the page.
https://en.wikipedia.org/w/api.php?origin=*&action=query&format=json&formatversion=2&redirects&prop=revisions&rvprop=content&titles=Albert+Einstein
Does anybody know how to return a Wikipedia page's entire content as JSON?
All the similar questions I've seen have answers like how to get just the snippet from the Wikipedia page, or just images. I want the entire Wikipedia page in JSON format so it can be parsed by a computer for analysis.

Related

RSS feed image format broken

We are providing a RSS feed for our blog. A couple of customers are complaining about broken image formatting. I have tried it using "Vienna RSS reader" and it is indeed broken. The images seem weirdly warped. Apart from that everything kind of seems to work.
It seems my company is always sending the whole article via RSS. I am not sure this is the right way. Is it not smarter to send a small message like in twitter via RSS accompanied by a link?
Please give me your opinion on the matter. Does it seems weird to send pictures via RSS feed at all?
Edit 1: I am wondering if i should strive to fix the images, or rather change our whole concept of sending the complete article into sending a link only.
Edit 2: Is there a golden standard of RSS that i should follow? How is RSS meant to work?
Edit 3: Back on topic then: How can i fix my images? How should they be formatted? In my RSS reader every image seems to have the same ratio.

How do I retrieve text and images from websites (in HTML or JSON) on iOS Swift?

I looked around the Internet to figure out how to get data from websites using SWIFT, and have narrowed it down to roughly JSON or HTML, which I am not familiar with.
As far as I know, there are third party libraries for me to use to parse the data. I have been following Dani Arnaout’s Working with JSON in Swift Tutorial as a reference. However, I have not been able to find the way to retrieve the JSON from any random website. Only the iTunes JSON page, which is included in the tutorial, works.
What I want to do: Make an app that downloads images and also some text from many different websites, either by HTML or JSON. The problem right now is that I have no idea how to start doing it. A simple demo would be helpful.
Questions
How do I get the JSON of any random website on the Internet?
How do I make use of the HTML data from websites to turn it into a readable format? I’m retrieving the HTML using Google Chrome, and it seems to be gibberish: I can’t find the text anywhere.
Question 1: Not all websites expose their content formatted as JSON.
Question 2: I think you should look at a couple of resources. First Ray Wenderlich has a tutorial on how to parse HTML. Although it is using Objective-C you should be able to learn quite a lot there.
When you have read that tutorial I would recommend you look at the Swift library Alamofire. There is another tutorial on the Wenderlich site covering this library.
Happy coding!

Media Wiki JSON response

I am little bit new in media wiki and now I am developing a extension. I would like to print a JSON response when it’s makes a request for one of my special pages, that the extension creates. The JSON response is not a content of Wikipedia page, it’s a public key that I want to print, and only that. I find for solutions but I don’t find nothing. What it’s the best way to print that? API, Jquery, Special pages?
The API. See API:Extensions for instructions.

How to parse a PDF using AS3? (air)

is there a way to parse a pdf using AS3 via Air in mobile?.
I don't need the full content of the PDF, only some data, is that possible?.
Edit for clarification:
I got a PDF file that was originally created based on a XML, what I'd need is to be able to retrieve that XML. Or at least, to find a string inside that PDF so I can make a call to a web service.
Original:
There's nothing native in AS3 for this kind of stuff but AlivePDF. It won't let you traverse things like XML so much, as it seems like you're trying to do by taking a small bit of a PDF, but it will let you create pdf's, add pages and change fonts etc.
You weren't entirely clear on what you're attempting to achieve, if you update your question a with a bit more detail we may be able to help a bit more.
Edit:
From the refined question, AlivePDF is not what you're after as it's really only for PDF generation. I'm assuming you're after a method to traverse the document like you would XML, by looking for a tag and extracting the information. I've not found a way to do this other than iterating through the document and searching manually which probably isn't what you're after.
After some searching I found an as3-pdfreader which doesn't seem to be complete at the moment. However on the Project Home the roadmap says parsing pdf files is complete, I've not been able to try it out yet though.

Need to stack subpages on home page of Google Sites — how?

This is a rephrasing of my original question https://stackoverflow.com/questions/14516983/google-sites-trying-to-script-announcements-page-on-steroids:
I've been looking into ways to make subpages of a parent page appear in a grid like "articles" on the home page of my Google Site — like on a Joomla home page and almost like a standard "Announcements" template, except:
The articles should appear in a configurable order, not chronologically (or alphabetically).
The first two articles should be displayed full-width and the ones beneath in two columns.
All articles will contain one or more images, and at least the first one should be displayed.
The timestamp and author of each subpage/article shouldn't be displayed.
At the moment I don't care if everything except the ordering is hardcoded, but ideally there should be a place to input prefs like the number of articles displayed, image size, snippet length, css styling etc.
My progress so far:
I tried using an iframe with an outside-hosted Javascript (using google.feeds.Feed) that pulls the RSS feed from the "Announcements" template, but I can't configure the order of the articles. One possibility would be to have a number at the beginning of every subpage title and parse it, but it's going to mess up with time and the number would also be visible on the standalone article page. Or could the number be hidden with Javascript?
I tried making a spreadsheet with a row for each article with columns "OrderId", "Title", "Content", "Image" and process and format the data with a Google App Script (using createHTML and createImage), but a) there doesn't seem to be a way to get a spreadsheet image to show up inside the webapp and b) these articles are not "real" pages that can be linked to easily on the menus.
This feature would be super-useful for lots of sites, and to me it just seems odd that it isn't a standard gadget (edit: or template). Ideas, anyone?
I don't know if this is helpful, but I wanted something similar and used the RSS XML announcements feed within a Google Gadget embedded into my sites page
Example gadget / site:
http://hosting.gmodules.com/ig/gadgets/file/105840169337292240573/CBC_news_v3_1.xml
http://www.cambridgebridgeclub.org
It is badly written, messy and I'm sure someone could do better than me, but it seems to work fairly reliably. The xml seems to have all the necessary data to be able to chop up articles, and I seem to remember it has image urls as well, so can play with them (although not implemented in my gadget).
Apologies if I am missing the point. I agree with your feature request - it would be great not to have to get so low-level to implement stuff like this in sites....