Extension:Offline
|
Offline Release status: experimental |
|||
|---|---|---|---|
| Implementation | Database | ||
| Description | Read backup dump files as a database. | ||
| Author(s) | Adam Wight (adamwTalk) | ||
| Last version | 0.6.1 | ||
| MediaWiki | 1.16.1, 1.18.0, 1.19alpha | ||
| License | GPL | ||
| Download |
Download snapshot (Git master)
, or the git archive: Project pageGit [?]: repo summary • tree • code changes SVN [?]: checkout-url • tree • code changes Download snapshot Git [Help] |
||
|
|||
|
Check usage (experimental) |
|||
Contents |
[edit] Overview
This extension provides an offline viewing mode for Wikipedia or other dumps made from a mediawiki project. It is similar to the kiwix / zim offline reader, but requires the user to run a webserver. As a proof-of-concept, it demonstrates that mediawiki can be made suitable The challenge is to elaborate this concept into something useful and usable, an editable, offline reader compatible with mediawiki.
Wikimedia officially recommends the kiwix offline reader and the zim file format. See also other projects.
See the Extension:Offline/Todo project page, or the old project page for wikipedia-offline-patch.
Be aware that you will need a Wikipedia dump in .xml.bz2 format, and the corresponding index, see step 2 below for an explanation covering how to create an index yourself.
To prepare an article dump for use with this extension, there are two steps,
1) Download the -pages-articles.xml dump, for example, visit the dump page at download.wikimedia.org for the english wikipedia dated Dec 1, 2011, and download the xml dump (7.4GB). Or, browse backup dumps covering other languages and projects. The Tagalog wikipedia has been prepared with an index, [[1]]. A very minimal sample database is also included in the tests/ directory of this project.
2) Build an index.
The old project page has binary distributions for macos, windows, and linux, which include a webserver and supporting libraries.
There is an unusual dependency: the Xapian indexing library and its PHP bindings. Also, you will have to configure some type of revision_text caching by setting $wgRevisionCacheExpiry and $wgCacheType. memcached is a popular one.
[edit] Configuring MediaWiki
///////////////////////////// // configuration specific to wikipedia-offline-patch require_once( "$IP/extensions/Offline/Offline.php" ); // The file path to article dumps. These may be split along bz2 chunk // boundaries, see DumpReader.php // Windows will use something like this: //$wgOfflineWiki = "I:/wikipedia-offline-patch/wiki-splits"; // on linux, you might use $wgOfflineWikiPath = "../wiki-splits/"; // Caching must be set up. You should install a php accelerator such as memcached $wgMainCacheType = CACHE_ACCEL; // just one of those things. $wgRevisionCacheExpiry = 3600000; // In theory you can configure Extension:Offline as either the primary or the secondary data source, // but an external bug is preventing this.
[edit] User rights
[edit] Acknowledgements
The current maintainer is Adam Wight, who can be reached at adamw on ludd.net.
Thanassis Tsiodras has a great page explaining how to build an offline wikipedia from simple tools you might find around the house.
Wikipedia Offline Client was the starting point of the code here.
MediaWiki developers contributed valuable insight.
This software and its source code are licensed as GPL.