I’m embedding Wikipedia pages in my app, and I’d like to show the same simplified abstract that Google Earth shows. (It gives the first several paragraphs and a link to the full content, without any serious layout.)
I know about the printable=true option, but that’s not what I’m looking for.
You might want to consider using the API : you can grab a “text” version of any article. Afterwards, it is up to you to extract the summary.
Another option is just to request the page in raw format:
Raw (Wikitext) page processing: sending a action=raw or a action=raw&templates=expand GET request to index.php will give the unprocessed wikitext source code of a page.E.g.
http://en.wikipedia.org/wiki/Main_Page?action=rawOf course you’ll need to do a bit a scraping. Going through the API might prove more efficient as you have better control of what you can pull from the database directly (wikitext if you wish).