DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:epub

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
plugin:epub [2018-08-31 01:11] – [Links] turnermmplugin:epub [2024-02-26 10:33] (current) Aleksandr
Line 6: Line 6:
 email      : turnermm02@shaw.ca  email      : turnermm02@shaw.ca 
 type       : syntax, render type       : syntax, render
-lastupdate : 2018-08-30  +lastupdate : 2022-10-05 
-compatible : anteater, rincewind, angua, adora belle, weatherwax, ponder stibbons, binky,hrun,detritus,"Elenor Of Tsort","Frusterick Manners",Greebo+compatible : anteater, rincewind, angua, adora belle, weatherwax, ponder stibbons, binky,hrun,detritus,"Elenor Of Tsort","Frusterick Manners",Greebo,hogfather
 depends    :  depends    : 
 conflicts  conflicts 
 similar    :  similar    : 
-tags       : export, books, ebook+tags       : export, books, ebook, epub
  
 downloadurl: https://github.com/turnermm/epub/archive/master.zip downloadurl: https://github.com/turnermm/epub/archive/master.zip
Line 21: Line 21:
 ---- ----
  
-====== Intro ======+===== Intro =====
  
 epub is a plugin that will create EBooks from Dokuwiki pages that can be read in standard ebook readers. See [[#ebook_readers]] below. epub is a plugin that will create EBooks from Dokuwiki pages that can be read in standard ebook readers. See [[#ebook_readers]] below.
Line 27: Line 27:
 EPUB is an open specification for digital books based on XML, CSS, and XHTML, and EPUB files can be read on portable e-ink devices, mobile phones, and desktop computers. The specification is overseen by the [[http://idpf.org/epub|International Digital Publishing Forum]]. EPUB is an open specification for digital books based on XML, CSS, and XHTML, and EPUB files can be read on portable e-ink devices, mobile phones, and desktop computers. The specification is overseen by the [[http://idpf.org/epub|International Digital Publishing Forum]].
  
-Unlike pdf files which have a standardized output, epub output is e-reader dependent, much like web pages, to which they are directly related.  An epub page is XHTML with CSS styling.  Ebooks can be collected in an e-reader's library of e-books and consulted off-line, making them always available.+Unlike pdf files which have a standardized output, epub output is e-reader dependent, much like web pages, to which they are directly related. An epub page is XHTML with CSS styling. Ebooks can be collected in an e-reader's library of e-books and consulted off-line, making them always available.
  
  
Line 34: Line 34:
 Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
-The version of the epub plugin available from the Download button above is not compatible with Dokuwiki distributions prior to Angua. For earlier distributions of Dokuwiki, you must substitute for epub/script.js the alternate script.js. which is found in the epub/scripts directory. The pre-angua scipt.js uses the javascript sack class for making ajax requests, and angua (and later) uses jQuery.  +The version of the epub plugin available from the Download button above is not compatible with Dokuwiki distributions prior to Angua. For earlier distributions of Dokuwiki, you must substitute for epub/script.js the alternate script.js. which is found in the epub/scripts directory. The pre-angua scipt.js uses the javascript sack class for making ajax requests, and angua (and later) uses jQuery.
  
-The plugin has recently been upgraded to conform to epub naming conventions, which does not allow ''@'' signs in ids.  The most recent distributions substitute underscores for the earlier ''@'' signs.  Should this cause any problems, you can revert to the earlier version: [[https://github.com/turnermm/epub/tarball/b111076dad|turnermm-epub-b111076.tar.gz]].  If this occurs, please report an error.+The plugin has recently been upgraded to conform to epub naming conventions, which does not allow ''@'' signs in ids. The most recent distributions substitute underscores for the earlier ''@'' signs. Should this cause any problems, you can revert to the earlier version: [[https://github.com/turnermm/epub/tarball/b111076dad|turnermm-epub-b111076.tar.gz]]. If this occurs, please report an error.
  
 ==== Download Links ==== ==== Download Links ====
  
-The epub plugin keeps a link on the page where the ebook has been created.  This link is updated every time the book is updated.  ACL rules apply. So, for this to work, users and/or visitors must have read access to the page.  See below [[#configuration_and_settings|configuration and settings]].  There is an administration panel where the administrator can prune the cache that keeps track of these links and the pages on which they appear, as well as enabling the admin to delete epubs no longer in use when entries are deleted from the cache. While deletions from the cache can be done on a page-by-page basis using the **Remove** button (see [[#configuration_and_settings|configuration and settings]]), the admin panel provides a systematic view of the status of the epubs on your system. +The epub plugin keeps a link on the page where the ebook has been created. This link is updated every time the book is updated. ACL rules apply. So, for this to work, users and/or visitors must have read access to the page. See below [[#configuration_and_settings|configuration and settings]]. There is an administration panel where the administrator can prune the cache that keeps track of these links and the pages on which they appear, as well as enabling the admin to delete epubs no longer in use when entries are deleted from the cache. While deletions from the cache can be done on a page-by-page basis using the **Remove** button (see [[#configuration_and_settings|configuration and settings]]), the admin panel provides a systematic view of the status of the epubs on your system. 
  
-There is also a configuration option which allows for hiding the link.  This version also has the capacity to delete the working directories in data/cache, where the epubs are created; this facility is controlled also by a configuration option. +There is also a configuration option which allows for hiding the link. This version also has the capacity to delete the working directories in data/cache, where the epubs are created; this facility is controlled also by a configuration option. 
  
  
 ==== System Requirements ==== ==== System Requirements ====
    
-eBooks are zip files with the '.epub' extension.  So, in order to create ebooks the plugin will have to be able to create zip files.  The epub plugin will first look for the PHP ZipArchive class; if it doesn't find it, on Linux systems, it will try to use the command line ''zip'' utility.  This is not found on Windows systems.  The ZipArchive class can usually be downloaded as a .dll and easily installed on Windows by updating the extensions assignments in php.ini.  It can also be installed on *nix systems using a package manager like yum or apt-get or directly from a GUI software installer.  But my experience has been that the PHP version has to be 5.2 and above.  +eBooks are zip files with the '.epub' extension. So, in order to create ebooks the plugin will have to be able to create zip files. The epub plugin will first look for the PHP ZipArchive class; if it doesn't find it, on Linux systems, it will try to use the command line ''zip'' utility. This is not found on Windows systems. The ZipArchive class can usually be downloaded as a .dll and easily installed on Windows by updating the extensions assignments in php.ini. It can also be installed on *nix systems using a package manager like yum or apt-get or directly from a GUI software installer. But my experience has been that the PHP version has to be 5.2 and above. 
  
 If epub does not find either the ZipArchive class or a working copy of the zip utility, it will use Dokuwiki's own ZipLib class. If epub does not find either the ZipArchive class or a working copy of the zip utility, it will use Dokuwiki's own ZipLib class.
Line 56: Line 56:
 ===== Syntax ===== ===== Syntax =====
  
-Open a page in the namespace named "epub". Then create a list of pages as follows, in  the order in which you want them to appear.  The page names can be inserted using the link wizard on the Dokuwiki toolbar (these are  in the square brackets). +Open a page in the namespace named "epub". Then create a list of pages as follows, in  the order in which you want them to appear. The page names can be inserted using the link wizard on the Dokuwiki toolbar (these are  in the square brackets). 
  
 <code> <code>
Line 70: Line 70:
 </code> </code>
  
-Book-1 is the title of the ebook. It is the name that the book will be known by in ebook readers.  There is also an author, whose name is taken from the user's actual name as it was entered upon the user's registration.+Book-1 is the title of the ebook. It is the name that the book will be known by in ebook readers. There is also an author, whose name is taken from the user's actual name as it was entered upon the user's registration.
  
-When the page is saved a **Start** button will appear on the page.  When it's clicked a throbber comes up, which will disappear when the book is complete.  It will be replaced by a status report and a link to the newly created ebook.  The Start button should always be active until the page used for creating the ebook is removed from the list of these pages (see [[#how_to_use_the_above_options|below]]).((If for some reason the Start button is not re-activated, you can make a small change to the page and re-save.))+When the page is saved a **Start** button will appear on the page. When it's clicked a throbber comes up, which will disappear when the book is complete. It will be replaced by a status report and a link to the newly created ebook. The Start button should always be active until the page used for creating the ebook is removed from the list of these pages (see [[#how_to_use_the_above_options|below]]).((If for some reason the Start button is not re-activated, you can make a small change to the page and re-save.))
  
-The book will be saved to the media directory in a sub-folder named **epub/<user_name>**.   You should create the **epub** directory yourself, in advance, and give ebook creators upload permission to the **epub** namespace (See [[#configuration_and_settings|below]]).+The book will be saved to the media directory in a sub-folder named **epub/<user_name>**. You should create the **epub** directory yourself, in advance, and give ebook creators upload permission to the **epub** namespace (See [[#configuration_and_settings|below]]).
  
-The name of the new book will be based on the date and time.  For instance: ** 2012_march_7_07-58-49.epub**.  This makes it possible to recreate a book without accidentally over-writing a prior copy. The status report tells you the name of the newly created book.  In other words, you can feel free to edit your page list and the contents of the pages themselves, without fear of losing a previous version of the ebook.+The name of the new book will be based on the date and time. For instance: ** 2012_march_7_07-58-49.epub**. This makes it possible to recreate a book without accidentally over-writing a prior copy. The status report tells you the name of the newly created book. In other words, you can feel free to edit your page list and the contents of the pages themselves, without fear of losing a previous version of the ebook.
  
 The scratch directory for the book is in meta/epub/username/ in an md5 subdirectory which is created for each new ebook instance (i.e. each time you click the Start button). For instance: The scratch directory for the book is in meta/epub/username/ in an md5 subdirectory which is created for each new ebook instance (i.e. each time you click the Start button). For instance:
   meta/epub/jack/f7a146947dc9dd5e8c42d22c12c33ec9      meta/epub/jack/f7a146947dc9dd5e8c42d22c12c33ec9   
-A lot of files can accumulate here, which the plugin will attempt to delete.  However, you might want to check and if necessary clean them out manually.+A lot of files can accumulate here, which the plugin will attempt to delete. However, you might want to check and if necessary clean them out manually.
  
 ==== Cover Page ==== ==== Cover Page ====
  
-eBooks generally have a 'cover' page.  Depending on the ebook reader, this may be displayed as the first page of the book, or in a sidebar, or both.  The epub plugin comes with a default cover page which consists simply of the title 'Dokuwiki Ebook'and the Dokuwiki logo image.  You can, however, create your own cover from within Dokuwiki.  Name the cover page **title** and place it first in the list of pages to be processed.  The cover __must__ have  one image, and one image only, and this image must be named **cover.png**.  +eBooks generally have a 'cover' page. Depending on the ebook reader, this may be displayed as the first page of the book, or in a sidebar, or both. The epub plugin comes with a default cover page which consists simply of the title 'Dokuwiki Ebook'and the Dokuwiki logo image. You can, however, create your own cover from within Dokuwiki. Name the cover page **title** and place it first in the list of pages to be processed. The cover __must__ have  one image, and one image only, and this image must be named **cover.png**. 
  
-Both the cover page and the cover page image can be included in a namespace, so that **namespace:title** and **namespace:cover.png** are both acceptable.  This makes it possible to have different title pages for different projects and users.+Both the cover page and the cover page image can be included in a namespace, so that **namespace:title** and **namespace:cover.png** are both acceptable. This makes it possible to have different title pages for different projects and users.
  
-While you can include text in the cover page, not all ebook readers display the text.  So, you might consider putting all that you want to say in **cover.png**.+While you can include text in the cover page, not all ebook readers display the text. So, you might consider putting all that you want to say in **cover.png**.
  
  
Line 95: Line 95:
 === Internal Links === === Internal Links ===
  
-The epub plugin distinguishes between links to external resources and internal links to pages included in the ebook.  Links to pages included in the ebook appear in the text and can be used to navigate between pages.  Most ebook readers will have a back button, like a browser, making it possible to return to the page where the link appeared.+The epub plugin distinguishes between links to external resources and internal links to pages included in the ebook. Links to pages included in the ebook appear in the text and can be used to navigate between pages. Most ebook readers will have a back button, like a browser, making it possible to return to the page where the link appeared.
  
-The plugin also supports links to headers, as in this DokuWiki markup: +The plugin also supports internal links that link to headers, as in this DokuWiki markup: 
-   [[page#header_text|]] + 
-   +  [[page_id#header_text|]] 
 + 
 +The header text must conform to Dokuwiki's protocol for [[:pagename|Page Names]]. If in doubt, you can check the table of contents for the page, where you will find the correct name for the ''header_text''.
  
 === End Notes === === End Notes ===
  
-The epub plugin lists references to external resources on an end-note page. For convenience, the end notes are referenced by active footnote numbers. Clicking on a footnote number takes you to the end notes and clicking on an end-note number returns you to the place on your page.  For instance, your page might have this note:+The epub plugin lists references to external resources on an end-note page. For convenience, the end notes are referenced by active footnote numbers. Clicking on a footnote number takes you to the end notes and clicking on an end-note number returns you to the place on your page. For instance, your page might have this note:
   You can find out more about plugins on Dokuwiki [7]    You can find out more about plugins on Dokuwiki [7] 
 Clicking on [7] takes you to the end notes where you might find: Clicking on [7] takes you to the end notes where you might find:
-  [7] http://www.dokuwiki.org/plugins +  [7] https://www.dokuwiki.org/plugins 
-Clicking on the end-note number will return you to the original page and place on the page. Clicking on %%http://www.dokuwiki.org/plugins%% will take you to [[:plugins|]] on Dokuwiki.org in your default browser.+Clicking on the end-note number will return you to the original page and place on the page. Clicking on %%https://www.dokuwiki.org/plugins%% will take you to [[:plugins|]] on Dokuwiki.org in your default browser.
  
  
 ==== Namespaces ==== ==== Namespaces ====
-The epub plugin supports a list that consists of an optional title page and a namespace.  The namespace is indicated using an asterisk and it must be the **first** item in the list of pages:+ 
 +The epub plugin supports a list that consists of an optional title page and a namespace. The namespace is indicated using an asterisk and it must be the **first** item in the list of pages:
   :namespace:   :namespace:
 The initial colon is recommended. The initial colon is recommended.
Line 123: Line 126:
   </epub>   </epub>
  
-Currently only one namespace is supported.  Moreover, only the topmost namespace directory is processed; so, if you have '':namespace_1:namespace_2'', only ''namespace_1'' is processed.  These limitations may be addressed after some testing and use.  If you omit the title page, a default title page will be inserted.+Currently only one namespace is supported. Moreover, only the topmost namespace directory is processed; so, if you have '':namespace_1:namespace_2'', only ''namespace_1'' is processed. These limitations may be addressed after some testing and use. If you omit the title page, a default title page will be inserted.
  
-After the namespace setting, you can add additional page ids.  A page id can consist of any standard DokuЦiki page identifier, for instance ''namespace:page'' or ''namespace_1:namespace_2:page''.+After the namespace setting, you can add additional page ids. A page id can consist of any standard DokuЦiki page identifier, for instance ''namespace:page'' or ''namespace_1:namespace_2:page''.
  
 === Chapter Headings === === Chapter Headings ===
Line 136: Line 139:
 If you omit the link text, then a Chapter heading will be created from the page id, using both the namespace and the page name. If you omit the link text, then a Chapter heading will be created from the page id, using both the namespace and the page name.
  
-If you use the [[#namespaces|namespace]] technique described above, the plugin will create Chapter headings from the page names, without the namespace. This is analogous to the way in which Dokuwiki implements its trace feature.   +If you use the [[#namespaces|namespace]] technique described above, the plugin will create Chapter headings from the page names, without the namespace. This is analogous to the way in which Dokuwiki implements its trace feature. 
  
 === External Images === === External Images ===
  
-The epub plugin will import external images into the ebook, which differs from the way in which the plugin handles other external resources as described in the Links section above.  For this to work, you must have a PHP installation which allows external resources to be accessed. This facility is enabled in php.ini by setting+The epub plugin will import external images into the ebook, which differs from the way in which the plugin handles other external resources as described in the Links section above. For this to work, you must have a PHP installation which allows external resources to be accessed. This facility is enabled in php.ini by setting
   allow_url_fopen = on   allow_url_fopen = on
 Or Or
   allow_url_fopen = 1   allow_url_fopen = 1
 +
 === CSS Processing === === CSS Processing ===
  
-With the release of Binky, Dokuwiki uses the LESS CSS compiler for CSS which requires it.  The latest epub release supports the LESS compiler as implemented by Dokuwiki.  If for any reason you do not wish to use LESS, you can turn it off using the ''Configuration Settings'' +With the release of Binky, Dokuwiki uses the LESS CSS compiler for CSS which requires it. The latest epub release supports the LESS compiler as implemented by Dokuwiki. If for any reason you do not wish to use LESS, you can turn it off using the ''Configuration Settings''
  
 ==== Audio Files ==== ==== Audio Files ====
-The epub plugin supports audio files. It has so far been tested only with ''.mp3'', mimetype: ''audio/mpeg'' By default, the plugin includes the name of the audio file and a footnote link to the file, making it possible to  download the mpeg file, if it is publicly available.   This behavior can be turned off in the configuration + 
 +The epub plugin supports audio files. It has so far been tested only with ''.mp3'', mimetype: ''audio/mpeg''. By default, the plugin includes the name of the audio file and a footnote link to the file, making it possible to  download the mpeg file, if it is publicly available. This behavior can be turned off in the configuration 
 options. The display text of the footnotes acts as a title and is placed beneath the audio controls. This title can be controlled by adding link names to the link markup:   options. The display text of the footnotes acts as a title and is placed beneath the audio controls. This title can be controlled by adding link names to the link markup:  
    {{ mpeg:mpeg_file | display text }}    {{ mpeg:mpeg_file | display text }}
    {{ audio:mpeg_file | display text }}    {{ audio:mpeg_file | display text }}
-For this to work correctly the audio file must be in a namespace set with the ''audio_fn'' configuration option, which defaults to ''audio,mpeg''. This assures that the footnote's link to the audio file will be correct.  The namespace can be up to two levels deep, e.g ''audio:mp3'' When this link is clicked, the audio file will open in the default browser and, if supported, will play.+For this to work correctly the audio file must be in a namespace set with the ''audio_fn'' configuration option, which defaults to ''audio,mpeg''. This assures that the footnote's link to the audio file will be correct. The namespace can be up to two levels deep, e.g ''audio:mp3''. When this link is clicked, the audio file will open in the default browser and, if supported, will play
 + 
 +For illustrations see the discussion on github: https://github.com/turnermm/epub/issues/23. There is also a small sample audio file of three Shakespeare sonnets at that location.
  
-For illustrations see the discussion on github: https://github.com/turnermm/epub/issues/23.  There is also a small sample audio file of three Shakespeare sonnets at that location. 
 ==== Video Files ==== ==== Video Files ====
-The latest distributions of ''epub'' include support for mp4 video.  The description above of [[#audio_files]] also applies to video files.  In this case, ''video_fn'' must be set to ''true''. The namespaces where video files will be found must be set in ''video_nmsp'', which defaults to ''video,mpeg''+ 
 +The latest distributions of ''epub'' include support for mp4 video. The description above of [[#audio_files]] also applies to video files. In this case, ''video_fn'' must be set to ''true''. The namespaces where video files will be found must be set in ''video_nmsp'', which defaults to ''video,mpeg'' 
 ===== Configuration and Settings ===== ===== Configuration and Settings =====
  
Line 163: Line 171:
  
 ^ Name        ^ Description                                                                                                                                                                                             ^ Default  ^ ^ Name        ^ Description                                                                                                                                                                                             ^ Default  ^
-| group       | Name of group which has permission to create ebooks.  This setting is optional and has effect only where a user does not have upload permission to the epub namespace.                                  | epub     | +| group       | Name of group which has permission to create ebooks. This setting is optional and has effect only where a user does not have upload permission to the epub namespace.                            | epub     | 
-| rmdir       | Remove scratch directory after the ebook has been created.                                                                                                                                              | y        |+| rmdir       | Remove scratch directory after the ebook has been created.                                                                                                                                        | y        |
 | permalink   | Keep a permanent download link on the book creator page                                                                                                                                                 | true     | | permalink   | Keep a permanent download link on the book creator page                                                                                                                                                 | true     |
-| less        | The LESS CSS compiler will be used if present, unless this option is set to false.                                                                                                                      | true     | +| less        | The LESS CSS compiler will be used if present, unless this option is set to false.                                                                                                                | true     | 
-| compress    | If the LESS compiler is used, the style sheet will be compressed if this option is set to true.                                                                                                         | false    |+| compress    | If the LESS compiler is used, the style sheet will be compressed if this option is set to true.                                                                                                   | false    |
 | sort        | Pages processed using the namespace markup will appear in alphabetical order, unless this option is set to false (unchecked)                                                                            | true     | | sort        | Pages processed using the namespace markup will appear in alphabetical order, unless this option is set to false (unchecked)                                                                            | true     |
-| audio_fn    | For audio files, include the name of the audio file or its title and a footnote link to the audio file itself beneath the controls. See [[#audio_files]].                                               | true     | +| audio_fn    | For audio files, include the name of the audio file or its title and a footnote link to the audio file itself beneath the controls. See [[#audio_files]].                                         | true     | 
-| audio_nmsp  | Comma separated list of namespaces where audio files will be found.  These can be up to two levels deep. It defaults to ''mpeg,audio''  Required only if using footnote links. See [[#audio_files]].  |          |+| audio_nmsp  | Comma separated list of namespaces where audio files will be found. These can be up to two levels deep. It defaults to ''mpeg,audio''. Required only if using footnote links. See [[#audio_files]]. |          |
 | video_fn    | When  using video files, include the name of the  file or its title and a footnote link to the video file itself beneath the controls                                                                            | | video_fn    | When  using video files, include the name of the  file or its title and a footnote link to the video file itself beneath the controls                                                                            |
-| video_nmsp  | Comma separated list of namespaces where video files will be found.  These can be up to two levels deep. Used only when creating footnotes. Default: ''video,mpeg''                                              |+| video_nmsp  | Comma separated list of namespaces where video files will be found. These can be up to two levels deep. Used only when creating footnotes. Default: ''video,mpeg''                                              |
  
 ==== How to use the above Options ==== ==== How to use the above Options ====
    
-1. Create a namespace named **epub** and set its ACL at 0.  This namespace should be kept exclusively for creating ebooks. Then give upload permission to the **epub** namespace to those users who will be creating ebooks. This setup has two effects:+1. Create a namespace named **epub** and set its ACL at 0. This namespace should be kept exclusively for creating ebooks. Then give upload permission to the **epub** namespace to those users who will be creating ebooks. This setup has two effects:
   - With this setup, only users with upload permission to the **epub** namespace can create ebooks.    - With this setup, only users with upload permission to the **epub** namespace can create ebooks. 
   - The Start button will appear only on pages in the **epub** namespace.   - The Start button will appear only on pages in the **epub** namespace.
-A download link is written to the page from which the ebook has been created.  This enables users with access to the page to download the book directly from that page.  In this case you might want to give people read access to the page and use method number 2 below for your security.+A download link is written to the page from which the ebook has been created. This enables users with access to the page to download the book directly from that page. In this case you might want to give people read access to the page and use method number 2 below for your security.
  
 2. Assign ebook creators to the ebook creator group. \\ 2. Assign ebook creators to the ebook creator group. \\
-The default group name is ''epub'', which can be changed in the Configuration Manager.  If a user belongs to this group, then the user does not need upload permission for the epub namespace.  The book may then be created in a sub-directory of the epub namespace, i.e. it must still exist in the epub namespace hierarchy. +The default group name is ''epub'', which can be changed in the Configuration Manager. If a user belongs to this group, then the user does not need upload permission for the epub namespace. The book may then be created in a sub-directory of the epub namespace, i.e. it must still exist in the epub namespace hierarchy. 
  
-3. The user must have create permission for pages on which the ebook is created.  While this may seem self-evident, it is also a further safety check, because it means that users without create permission for an epub page cannot re-create an ebook from the data on that page, even if they might otherwise have access to the page.  +3. The user must have create permission for pages on which the ebook is created. While this may seem self-evident, it is also a further safety check, because it means that users without create permission for an epub page cannot re-create an ebook from the data on that page, even if they might otherwise have access to the page. 
  
 The plugin keeps a list of pages which have created ebooks. This prevents the plugin from placing a Start button on all pages in the **epub** namespace, regardless of whether they contain epub syntax. If you wish to use an epub page for some other purpose, you can remove its name from the list using a second button which appears beneath the **Start** button and has the following label: **Remove Page from Creator List**. The plugin keeps a list of pages which have created ebooks. This prevents the plugin from placing a Start button on all pages in the **epub** namespace, regardless of whether they contain epub syntax. If you wish to use an epub page for some other purpose, you can remove its name from the list using a second button which appears beneath the **Start** button and has the following label: **Remove Page from Creator List**.
Line 192: Line 200:
  
 ==== Uploading epub files ==== ==== Uploading epub files ====
 +
 To upload epub files to Dokuwiki, you will have to enter its mime type in conf/mime.local.conf:  To upload epub files to Dokuwiki, you will have to enter its mime type in conf/mime.local.conf: 
   epub application/epub+zip   epub application/epub+zip
Line 197: Line 206:
  
 ==== ACL ==== ==== ACL ====
 +
   - The first ACL control is the permission to upload to the epub namespace (see above)   - The first ACL control is the permission to upload to the epub namespace (see above)
-  - Secondly, users can only add page id's to an epub if they have read permission for that page.  If a user does not have read permission, the page will be ''ignored'' +  - Secondly, users can only add page id's to an epub if they have read permission for that page. If a user does not have read permission, the page will be ''ignored''
  
-But "ignored" is not an iron-clad guarantee of security, because Dokuwiki will have cached the page.  To be completely secure you should remove your page from the list of epub ids by clicking the **Remove** button.  This forces a new user to make changes to the page in order to re-activate the **Start** button, at which point the page will be re-processed and its list of included id's will be re-checked for ACL permissions.+But "ignored" is not an iron-clad guarantee of security, because Dokuwiki will have cached the page. To be completely secure you should remove your page from the list of epub ids by clicking the **Remove** button. This forces a new user to make changes to the page in order to re-activate the **Start** button, at which point the page will be re-processed and its list of included id's will be re-checked for ACL permissions.
  
 As noted [[#syntax|above]], the epub plugin places all new ebooks in a namespace created from the user's name: As noted [[#syntax|above]], the epub plugin places all new ebooks in a namespace created from the user's name:
   epub:user   epub:user
-It might be useful to give your ebook creators delete permission to their own epub namespaces.  This will give them complete control over the books they have created.+It might be useful to give your ebook creators delete permission to their own epub namespaces. This will give them complete control over the books they have created.
  
 +==== Enhanced Table of Contents ====
 +
 +You can create an enhanced table of contents as follows:
 +  * Load your epub into Sigil, click on Tools→Table of Contents→Generate Table of Contents. You could probably make your book a bit smaller by loading it into the Calibre editor and removing unused CSS. Ignore any messages about CSS issues. These are non-critical problems in Dokuwiki itself. 
 +  * Save your book
 +  
 ===== Plugin Support ===== ===== Plugin Support =====
  
-''epub'' renders a wide range of syntax plugins, as long as they attach their output to the current page renderer.  Exceptions to this rule are several plugins which attach output to the the page using javascript: [[plugin:ditaa]], [[plugin:mathpublish]], and [[mathjax]].  For these, the epub reader must support inclusion of javascript files downloaded from the Internet.  The reliability of the mathjax inclusions may be limited, so testing is required.+''epub'' renders a wide range of syntax plugins, as long as they attach their output to the current page renderer. Exceptions to this rule are several plugins which attach output to the the page using javascript: [[plugin:ditaa]], [[plugin:mathpublish]], and [[mathjax]]. For these, the epub reader must support inclusion of javascript files downloaded from the Internet. The reliability of the mathjax inclusions may be limited, so testing is required.
  
 If you find syntax plugins which do not work in epub, please post them to the forum. If you find syntax plugins which do not work in epub, please post them to the forum.
  
 ''epub'' does not support action plugins, that is, if you are using an action plugin which inserts text into the output stream, these insertions will not be captured by epub. ''epub'' does not support action plugins, that is, if you are using an action plugin which inserts text into the output stream, these insertions will not be captured by epub.
 +
 +==== Image Map Plugins ====
 +
 +''epub''  supports the [[plugin:imagemapping|imagemapping]] plugin and will probably support any plugin which creates standard image maps. You can also create an image map directly: for a How-To see: https://github.com/turnermm/epub/issues/30.
  
  
Line 220: Line 240:
  
   * **Calibre**\\ This is an excellent ebook reader. The latest version has the capability to pop-up tables and zoom in on them when you right-click on a table. Tested on Windows and Linux. It is open source.\\ See: http://calibre-ebook.com/   * **Calibre**\\ This is an excellent ebook reader. The latest version has the capability to pop-up tables and zoom in on them when you right-click on a table. Tested on Windows and Linux. It is open source.\\ See: http://calibre-ebook.com/
-  * **EPUBReader**\\ This is a Firefox add-on and seems to handle whatever you can throw at it.  It probably has the advantage of being hooked into Firefox and gets HTML support from there. An advantage to installing this plugin, if you use Firefox,is that you can click on the link to your ebook and immediately see the result.+  * **EPUBReader**\\ This is a Firefox add-on and seems to handle whatever you can throw at it. It probably has the advantage of being hooked into Firefox and gets HTML support from there. An advantage to installing this plugin, if you use Firefox,is that you can click on the link to your ebook and immediately see the result.
   * **FBreader**\\ Good but does not produce tables, instead converting them to long columns of one-liners for each cell. (Open source)\\ See: http://www.fbreader.org/   * **FBreader**\\ Good but does not produce tables, instead converting them to long columns of one-liners for each cell. (Open source)\\ See: http://www.fbreader.org/
   * **Adobe Digital Editions**\\ This is an excellent reader which has been dramatically improved over the past year.\\ The current version is 2.x: http://www.adobe.com/ca/products/digital-editions/download.html   * **Adobe Digital Editions**\\ This is an excellent reader which has been dramatically improved over the past year.\\ The current version is 2.x: http://www.adobe.com/ca/products/digital-editions/download.html
 +  * ** Readium **\\ This is an extension for Chrome and it is also a very good reader. See: https://readium.org/ 
  
  
 ==== Sample ebook ==== ==== Sample ebook ====
  
-A sample of an ebook created by epub can be downloaded here: [[http://www.mturner.org/fckgLite/doku.php?id=ebook|fckgLite manual]].+A sample of an ebook created by epub can be downloaded here: [[https://www.mturner.org/devel/epub_sample|Sample E-book]].
  
 ===== Development ===== ===== Development =====
Line 234: Line 255:
  
 {{rss>https://github.com/turnermm/epub/commits/master.atom date count=15}} {{rss>https://github.com/turnermm/epub/commits/master.atom date count=15}}
-For a complete listing of changes see: https://github.com/turnermm/epub/commits/master.  First commit March 3, 2012.+For a complete listing of changes see: https://github.com/turnermm/epub/commits/master. First commit March 3, 2012. 
 === Known Bugs and Issues === === Known Bugs and Issues ===
  
Line 245: Line 267:
 ===== FAQ ===== ===== FAQ =====
  
-Please put your questions on the discussion page. Or use the forum. Thanks.+Please ask your questions on the forum or on the GitHub issues linked to under ''bugs'' above. Thanks.
  
 ===== Discussion ===== ===== Discussion =====
  
-Discussions have been moved to a separate page: [[::plugin:epub:discussion|epub:discussions]].  +:!: Old discussion pages are retained here but are no longer used. 
 + 
 +Discussions have been moved to a separate page: [[::plugin:epub:discussion|epub:discussions]]. 
  
plugin/epub.1535670696.txt.gz · Last modified: 2018-08-31 01:11 by turnermm

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki