This extension is currently not actively maintained! Although it may still work, any bug reports or feature requests will more than likely be ignored.
Release status: unmaintained
|Implementation||Page action, Special page|
|Description||Generate e-book file from a Wikimedia page or group of pages, in epub format|
|Latest version||0.5.4 (2010-05-16)|
|License||GNU Lesser General Public License 2.1|
The ePubExport extension is based on Pdf Export extension. ePubExport adds a new link to the left nav menu named "export ePub". Clicking this link generates an epub file to read offline in electronic book or tablet. In addition, a new special page is added, "ePub Export". This special page enable to create an epub file from group of Wikimedia pages.
Download of the preferred archive file can be done from here. Currently there are tar.gz, bz2, rar and zip archives.
SVN is also available. Trunk is in https://svn.code.sf.net/p/epubexport/code/trunk/ePubExport/
To install this extension, extract the file in the extensions folder, then add the following to LocalSettings.php:
Directory tree should be as follow:
extensions | +->ePubExport | +-->epub | | | +-> EPub.php | +-> EPubChapterSplitter.php | +-> Zip.php | +-->fonts | | | +-> LICENSE | +-> DejaVuSans.ttf | +-> DejaVuSans-Bold.ttf | +-> DejaVuSans-BoldOblique.ttf | +-> DejaVuSans-Oblique.ttf | +-> ePubExport.i18n.alias.php +-> ePubExport.i18n.php +-> ePubExport.php +-> ePubExport_body.php
User-defined CSS file
Site administrator may change the default epub CSS to another file. In LocalSettings.php, just bellow the "require_once("$IP/extensions/ePubExport/ePubExport.php");" line, add
$wgePubExportProperties['css_file'] = your_css_file_name.
require_once("$IP/extensions/ePubExport/ePubExport.php"); $wgePubExportProperties['css_file'] = $IP . "/ebook.css";
For non-english wiki sites, as there is no way to know what will be the reading device, and if it has the font for the specific language or not, it is always a good idea to embed the fonts in the epub file. It does increase the size of the file, but it is readable.
ePubExport come with DejaVuSans fonts that support many languages. In order to embed these fonts in the epub file, the following configuration is required, because the font will not be embedded by default.
In LocalSettings.php, just below the "
require_once("$IP/extensions/ePubExport/ePubExport.php");" line, add
$wgePubExportProperties['embed_fonts'] = true;
Fonts Supported Languages
The DejaVuSans fonts cover the following languages:
Afar, Abkhazia, Afrikaans, Akan, Aragonese, Arabic, Asturian/Bable/Leonese/Asturleonese, Avaric, Aymara, Azerbaijani in Azerbaijan, Azerbaijani in Iran, Bashkir, Byelorussian, Berber in Algeria, Berber in Morocco, Bulgarian, Bislama, Edo or Bini, Bambara, Breton, Bosnian, Buriat (Buryat), Catalan, Chechen, Chamorro, Mari (Lower Cheremis / Upper Cheremis), Corsican, Crimean Tatar/Crimean Turkish, Czech, Kashubian, Old Church Slavonic, Chuvash, Welsh, Danish, German, Ewe, Greek, English, Esperanto, Spanish, Estonian, Basque, Persian, Fanti, Fulah (Fula), Finnish, Filipino, Fijian, Faroese, French, Friulian, Frisian, Irish, Scots Gaelic, Galician, Guarani, Manx Gaelic, Hausa, Hawaiian, Hebrew, Hiri Motu, Croatian, Upper Sorbian, Haitian/Haitian Creole, Hungarian, Armenian, Herero, Interlingua, Indonesian, Interlingue, Igbo, Inupiaq (Inupiak, Eskimo), Ido, Icelandic, Italian, Inuktitut, Javanese, Georgian, Kara-Kalpak (Karakalpak), Kabyle, Kikuyu, Kuanyama/Kwanyama, Kazakh, Greenlandic, Kanuri, Kurdish in Armenia, Kurdish in Iraq, Kurdish in Iran, Kurdish in Turkey, Kumyk, Komi (Komi-Permyak/Komi-Siryan), Cornish, Kwambi, Kirgiz, Latin, Luxembourgish (Letzeburgesch), Lezghian (Lezgian), Ganda, Limburgan/Limburger/Limburgish, Lingala, Lao, Lithuanian, Latvian, Malagasy, Marshallese, Maori, Macedonian, Mongolian in Mongolia, Moldavian, Malay, Maltese, Nauru, Norwegian Bokmal, Low Saxon, Ndonga, Dutch, Norwegian Nynorsk, Norwegian (Bokmal), Ndebele, South, Northern Sotho, Navajo/Navaho, Chichewa, Occitan, Oromo or Galla, Ossetic, Papiamento in Netherlands Antilles, Papiamento in Aruba, Polish, Portuguese, Quechua, Rhaeto-Romance (Romansch), Rundi, Romanian, Russian, Kinyarwanda, Yakut, Sardinian, Scots, North Sami, Selkup (Ostyak-Samoyed), Sango, Serbo-Croatian, Secwepemctsin, Slovak, Slovenian, Samoan, South Sami, Lule Sami, Inari Sami, Skolt Sami, Shona, Somali, Albanian, Serbian, Swati, Sotho, Southern, Sundanese, Swedish, Swahili, Tajik, Turkmen, Tagalog, Tswana, Tonga, Turkish, Tsonga, Tatar, Twi, Tahitian, Tuvinian, Uighur, Ukrainian, Uzbek, Venda, Vietnamese, Volapuk, Votic, Walloon, Sorbian languages (lower and upper), Wolof, Xhosa, Yapese, Yiddish, Yoruba, Zhuang/Chuang and Zulu
If the default fonts ars not fit or not support the wiki language, it is possible to embed another fonts. To do so, the
$wgePubExportProperties['embed_fonts'] property must be set to
Then, specify the fonts source as follows:
$wgePubExportProperties['fonts'] = _font_1_src_; $wgePubExportProperties['fonts'] = _font_2_src_; $wgePubExportProperties['fonts'] = _font_3_src_;
Font license is embedded as follows:
$wgePubExportProperties['font_license'] = _license_src_;
require_once("extensions/ePubExport/ePubExport.php"); $wgePubExportProperties['embed_fonts'] = true; $wgePubExportProperties['css_file'] = "$IP/ebook.css"; $wgePubExportProperties['fonts'] = 'extensions/ePubExport/fonts/DejaVuSans.ttf'; $wgePubExportProperties['fonts'] = 'extensions/ePubExport/fonts/DejaVuSans-Bold.ttf'; $wgePubExportProperties['fonts'] = 'extensions/ePubExport/fonts/DejaVuSans-BoldOblique.ttf'; $wgePubExportProperties['fonts'] = 'extensions/ePubExport/fonts/DejaVuSans-Oblique.ttf'; $wgePubExportProperties['font_license'] = 'extensions/ePubExport/fonts/LICENSE';
NOTE: Using user-defined font require user-defined CSS. ePubExport does not enforce that, but it won't work without CSS that defines and use the user-defined fonts.
These languages are used both in the Mediawiki text and menus as well as in the epub file itself.
These languages are used both in the Mediawiki text and menus as well as in the epub file itself. However, there are still several texts here and there that are not yet updated.
Will Maybe Work
All the languages listed in the Fonts Supported Languages section have no support in Mediawiki text and menus, but the epub file will probably created successfully.