turnermm / epub Goto Github PK
View Code? Open in Web Editor NEWDokuwiki plugin for creating ebooks
Home Page: http://www.dokuwiki.org/plugin:epub
Dokuwiki plugin for creating ebooks
Home Page: http://www.dokuwiki.org/plugin:epub
Hi,
Love your plugin. Just wondering how difficult it would be to add support for audio? As in, could we turn a dokuwiki link to an MP3 or OGG file into something like: <audio src="audio/clip01.mp3"/>
?
Please see: https://forum.dokuwiki.org/d/22311-site-export-is-not-making-directories/2
Also https://opencpn.org/wiki/dokuwiki/doku.php?id=opencpn:manual_basic:sidebar
I had concerns that this problem was created by recent changes to indexmenu, which we do use,
However I made a separate sidebar page under opencpn:manual_basic:sidebar that does not use indexmenu and is totally flat and manually entered and epbub still does not create all necessary sub-namespaces.
For example which I have clumsily tried to fix in sigil
2024_june_6_10-09-13-sigil.zip
When I tried this plugin, it treated all internal links like external, linking to the wiki site instead of the corresponding page in the book. Is there a way to link to the section?
i.e.
<epub:Book>
[[dictionary|Dictionary]]
[[word|Word]]
<epub>
dictionary.html:
[[word]]
epub:
word [1]
[1]: http://localhost/doku.php?id=word
I'm using the default dokuwiki template, release 2020-07-29, all links have the wikilink1
class.
We are getting this error on all exported pages. Myron, How can we fix this?
Error: Call to undefined function epub_clean_name()
An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the epub plugin.
More info has been written to the DokuWiki error log.
2024-07-11 06:02:39Warning: current file modification time is older than last revision date/home/szlhykiz/public_html/wiki/dokuwiki/data/media/opencpn/manual_basic/quick_start_guide/connect_to/navionicsconnection.png
File revision: 1716594259 2024-05-24 23:44:19
Last revision: 1716594260 2024-05-24 23:44:20
2024-07-11 10:05:49Error: Call to a member function getConf() on null/home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/captcha/wav.php(24)
#0 {main}
2024-07-11 11:43:04Error: Call to undefined function epub_clean_name()/home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/epub/renderer.php(352)
#0 /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/epub/renderer.php(118): renderer_plugin_epub->copy_media('opencpn:logo.pn...', false)
#1 /home/szlhykiz/public_html/wiki/dokuwiki/inc/parser/xhtml.php(1859): renderer_plugin_epub->_media('opencpn:logo.pn...', 'OpenCPN.org', NULL, '80', NULL, 'cache')
#2 /home/szlhykiz/public_html/wiki/dokuwiki/inc/parser/xhtml.php(1821): Doku_Renderer_xhtml->_imageTitle(Array)
#3 /home/szlhykiz/public_html/wiki/dokuwiki/inc/parser/xhtml.php(971): Doku_Renderer_xhtml->getLinkTitle(Array, 'https://opencpn...', true)
#4 /home/szlhykiz/public_html/wiki/dokuwiki/inc/parserutils.php(691): Doku_Renderer_xhtml->externallink('https://opencpn...', Array)
#5 /home/szlhykiz/public_html/wiki/dokuwiki/inc/parserutils.php(158): p_render('epub', Array, NULL)
#6 /home/szlhykiz/public_html/wiki/dokuwiki/inc/Action/Export.php(90): p_cached_output('/home/szlhykiz/...', 'epub', 'opencpn:manual...')
#7 /home/szlhykiz/public_html/wiki/dokuwiki/inc/ActionRouter.php(86): dokuwiki\Action\Export->preProcess()
#8 /home/szlhykiz/public_html/wiki/dokuwiki/inc/ActionRouter.php(49): dokuwiki\ActionRouter->setupAction('export_epub')
#9 /home/szlhykiz/public_html/wiki/dokuwiki/inc/ActionRouter.php(62): dokuwiki\ActionRouter->__construct()
#10 /home/szlhykiz/public_html/wiki/dokuwiki/inc/actions.php(19): dokuwiki\ActionRouter::getInstance(true)
#11 /home/szlhykiz/public_html/wiki/dokuwiki/doku.php(131): act_dispatch()
#12 {main}
###Under deprecated
2024-07-11 11:48:27require_once() is deprecated. It was called from require() in /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/ckgedit/action/delete.php:4 Autoloading should be used instead!
2024-07-11 11:48:51require_once() is deprecated. It was called from require() in /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/ckgedit/action/delete.php:4 Autoloading should be used instead!
2024-07-11 11:48:51require_once() is deprecated. It was called from require() in /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/ckgedit/action/delete.php:4 Autoloading should be used instead!
2024-07-11 11:48:53require_once() is deprecated. It was called from require() in /home/szlhykiz/public_html/wiki/dokuwiki/lib/plugins/ckgedit/action/delete.php:4 Autoloading should be used instead!
2024-07-11 11:43:04The file was not a PDF (manual_basic.html).
manual_basic.html
2024-07-11 11:43:04Event Data After:
{
"media": "wiki:siteexport:siteexport.zip",
"file": "/home/szlhykiz/public_html/wiki/dokuwiki/data/cache/2/2c357e6e4aefb1d58c1586d059212edf.siteexport.zip",
"orig": "/home/szlhykiz/public_html/wiki/dokuwiki/data/media/wiki/siteexport/siteexport.zip",
"mime": "application/zip",
"download": true,
"cache": 0,
"ext": "zip",
"width": 0,
"height": 0,
"status": 200,
"statusmessage": "Not Found",
"ispublic": true,
"csp": {
"default-src": "'none'",
"style-src": "'unsafe-inline'",
"media-src": "'self'",
"object-src": "'self'",
"font-src": "'self' data:",
"form-action": "'none'",
"frame-ancestors": "'self'"
}
}
Hello,
After upgrading to DokuWiki Release 2022-07-31 "Igor", I'd started receiving the following error when I access the built-in DokuWiki's Configuration Manager:
Warning: Declaration of renderer_plugin_epub::header($text, $level, $pos) should be compatible with Doku_Renderer_xhtml::header($text, $level, $pos, $returnonly = false) in /home/eduardo/public_html/wiki/lib/plugins/epub/renderer.php on line 94
Warning: Cannot modify header information - headers already sent by (output started at /home/eduardo/public_html/wiki/lib/plugins/epub/renderer.php:473) in /home/eduardo/public_html/wiki/inc/actions.php on line 38
The issue persists after upgrading to DokuWiki Release 2022-07-31a "Igor".
Please let me know if anymore information are needed to troubleshoot this issue.
2024-06-10 11:22:09 C:\xampp\htdocs\dokuwiki\lib\plugins\epub\action.php(104) E_WARNING: Trying to access array offset on value of type null
#0 C:\xampp\htdocs\dokuwiki\lib\plugins\epub\action.php(104): dokuwiki\ErrorHandler::errorHandler(2, 'Trying to acces...', 'C:\\xampp\\htdocs...', 104)
#1 C:\xampp\htdocs\dokuwiki\inc\Extension\EventHandler.php(80): action_plugin_epub->prevent_cache(Object(dokuwiki\Extension\Event), NULL)
#2 C:\xampp\htdocs\dokuwiki\inc\Extension\Event.php(75): dokuwiki\Extension\EventHandler->process_event(Object(dokuwiki\Extension\Event), 'BEFORE')
#3 C:\xampp\htdocs\dokuwiki\inc\Extension\Event.php(133): dokuwiki\Extension\Event->advise_before(true)
#4 C:\xampp\htdocs\dokuwiki\inc\Extension\Event.php(200): dokuwiki\Extension\Event->trigger(Array, true)
#5 C:\xampp\htdocs\dokuwiki\inc\Cache\Cache.php(86): dokuwiki\Extension\Event::createAndTrigger('PARSER_CACHE_US...', Object(dokuwiki\Cache\CacheRenderer), Array)
#6 C:\xampp\htdocs\dokuwiki\inc\parserutils.php(289): dokuwiki\Cache\Cache->useCache()
#7 C:\xampp\htdocs\dokuwiki\inc\common.php(262): p_get_metadata('opencpn:manual_...')
#8 C:\xampp\htdocs\dokuwiki\doku.php(101): pageinfo()
#9 {main}
2024-06-10 11:22:10 C:\xampp\htdocs\dokuwiki\lib\plugins\siteexport\helper.php(183) E_WARNING: Undefined array key "depthType"
#0 C:\xampp\htdocs\dokuwiki\lib\plugins\siteexport\helper.php(183): dokuwiki\ErrorHandler::errorHandler(2, 'Undefined array...', 'C:\\xampp\\htdocs...', 183)
#1 C:\xampp\htdocs\dokuwiki\lib\plugins\siteexport\admin.php(50): helper_plugin_siteexport->__siteexport_addpage()
#2 C:\xampp\htdocs\dokuwiki\inc\template.php(205): admin_plugin_siteexport->html()
#3 C:\xampp\htdocs\dokuwiki\inc\Action\Admin.php(43): tpl_admin()
#4 C:\xampp\htdocs\dokuwiki\inc\template.php(120): dokuwiki\Action\Admin->tplContent()
#5 [internal function]: tpl_content_core('admin')
#6 C:\xampp\htdocs\dokuwiki\inc\Extension\Event.php(134): call_user_func_array('tpl_content_cor...', Array)
#7 C:\xampp\htdocs\dokuwiki\inc\Extension\Event.php(200): dokuwiki\Extension\Event->trigger('tpl_content_cor...', true)
#8 C:\xampp\htdocs\dokuwiki\inc\template.php(102): dokuwiki\Extension\Event::createAndTrigger('TPL_ACT_RENDER', 'admin', 'tpl_content_cor...')
#9 C:\xampp\htdocs\dokuwiki\lib\tpl\dokuwiki\main.php(60): tpl_content()
#10 C:\xampp\htdocs\dokuwiki\inc\actions.php(30): include('C:\\xampp\\htdocs...')
#11 C:\xampp\htdocs\dokuwiki\doku.php(131): act_dispatch()
#12 {main}
It would be very helpful if we could process multiple levels (up to 5 or 6 levels) with this kind of coding for creating epubs
<epub:OpenCPN Basic User Manual - Manage Routes>
opencpn:manual_basic:*:*
</epub>
with the results shown down below. I would like to be able to use
opencpn:manual_basic:*:*:*:*)
to process multiple levels.
These are the results.
Directory: /home/szlhykiz/public_html/wiki/dokuwiki/data/pages/opencpn/manual_basic
Found following pages in opencpn:manual_basic:*:* namespace:
Array
(
[0] => opencpn:manual_basic:*:ui_user_interface
[1] => opencpn:manual_basic:*:tracking
[2] => opencpn:manual_basic:*:toolbar
[3] => opencpn:manual_basic:*:toc_flat
[4] => opencpn:manual_basic:*:toc
[5] => opencpn:manual_basic:*:terminology
[6] => opencpn:manual_basic:*:set_options
[7] => opencpn:manual_basic:*:route_manager
[8] => opencpn:manual_basic:*:release
[9] => opencpn:manual_basic:*:quick_start_guide
[10] => opencpn:manual_basic:*:plugins
[11] => opencpn:manual_basic:*:oldsidebar
[12] => opencpn:manual_basic:*:nmea0183
[13] => opencpn:manual_basic:*:mob
[14] => opencpn:manual_basic:*:menubar
[15] => opencpn:manual_basic:*:license_authors
[16] => opencpn:manual_basic:*:faq
[17] => opencpn:manual_basic:*:editors
[18] => opencpn:manual_basic:*:create_routes
[19] => opencpn:manual_basic:*:chart_panel
[20] => opencpn:manual_basic:*:change_color_scheme
[21] => opencpn:manual_basic:*:blank
[22] => opencpn:manual_basic:*:about
)
Saving namespace pages
Created following titles:
Array
(
[0] => Ui User Interface
[1] => Tracking
[2] => Toolbar
[3] => Toc Flat
[4] => Toc
[5] => Terminology
[6] => Set Options
[7] => Route Manager
[8] => Release
[9] => Quick Start Guide
[10] => Plugins
[11] => Oldsidebar
[12] => Nmea0183
[13] => Mob
[14] => Menubar
[15] => License Authors
[16] => Faq
[17] => Editors
[18] => Create Routes
[19] => Chart Panel
[20] => Change Color Scheme
[21] => Blank
[22] => About
)
Which there is an option to take name from first heading instead of file name.
This is the setting that I use with IndexMenu or AlphaIndex plugins on Dokuwiki as it is a multilingual wiki using translation plugin which require file name to be the same across languages.
Hello
tried out epub yesterday (for the first time), but for some reasons the page sequence in the output is not as given in the epub page, it is sorted by the reversed alphabetical sort order of the page names instead. Is there something I do wrong?
a configuration like
<epub>
b_page
z_page
d_page
a_page
</epub>
comes out as
z_page
d_page
b_page
a_page
any idea?
regards
Steffen
Hello,
I upgraded my DokuWiki instance to PHP 8.1 (PHP 7.4 is deprecated now) and the following errors are being shown at the top of my Wiki:
Warning: Trying to access array offset on value of type null in /home/robertinho/public_html/wiki/lib/plugins/epub/action.php on line 104
Warning: Cannot modify header information - headers already sent by (output started at /home/robertinho/public_html/wiki/lib/plugins/dw2pdf/action.php:914) in /home/robertinho/public_html/wiki/inc/actions.php on line 38
Disabling the plug-in fixes the issue.
Please let me know if there's any information I can provide to troubleshoot and fix this issue.
I create an E-book creator page --- I see the "start" button and everything.
But when I click the "start" button ----- nothing happens. Absolutely nothing at all. What is wrong and how can I fix it?
Hi,
thanks for the epub-exportfunctionality.
What do you think about an integration of this plugin in Dokuwiki's bookcreater-Plugin? Many users would benefit from it i think. And of course more user would get notice of your plugin.
After upgrading to DokuWiki Igor stable release (2022-07-31), I'm receiving the following warnings when accessing the DokuWiki Configuration Page:
Warning: Declaration of renderer_plugin_epub::header($text, $level, $pos) should be compatible with Doku_Renderer_xhtml::header($text, $level, $pos, $returnonly = false) in /home/robertinho/public_html/wiki/lib/plugins/epub/renderer.php on line 94
Warning: Cannot modify header information - headers already sent by (output started at /home/robertinho/public_html/wiki/lib/plugins/epub/renderer.php:473) in /home/robertinho/public_html/wiki/inc/common.php on line 1817
Please let me know if there's anymore information that I can provide to fix this warnings.
Greetings from Kenya,
It seems that the epub plugin does not export image maps created with the Dokuwiki imagemapping plugin. In fact, no image is displayed at all inside the e-book, just the link.
Am I missing something?
Thank you!
Chris
There is a small bug in the generated link for the ePub after processing.
The link is malformed like that
http://domain.comhttp//domain.com/lib/exe/fetch.php?media=epub:type:2019_march_31_11-14-36.epub
It's easy to correct it manually to have the functional link but I don't know where to fix this link generation ?
Dokuwiki 2014-09-29d "Hrun" (Debian package), various installations with various plugins. epub 2015-02-15.
Javascript console message "Uncaught ReferenceError: Invalid left-hand side expression in postfix operation" (minify error?)
This is a recent event, likely the result of upgrading other plugins, however 1x1 didn't show which one - only that removing or downgrading epub make the toolbar reappear.
The problem does not occur when using Konqueror web-browser.
Rolling back to the 2013-02-08 version of epub brings back the edit toolbar.
Example of other plugins used in an installation: abbr 2014-08-18, acl 2014-06-04, ajaxloader 2009-12-11, alphaindex 2008-10-18, authad 2014-04-03, authldap 2014-05-18, authmysql 2014-02-15, authpgsql 2014-02-15, authplain 2014-07-01, blockquote 2013-05-05, bookcreator 2015-06-11, bureaucracy 2015-01-22, cellbg 2013-10-09, columns 2015-05-30, config 2014-03-18, data 2015-05-16, dig 2015-02-26, do 2014-11-01, dw2pdf 2015-06-25, edittable 2015-06-17, epub 2013-02-08, extension 2014-06-15, fancysearch 2015-02-26, fckg 2014-12-15, fontsize2 2010-03-26, gallery 2014-05-18, hidden 2015-08-21, imagemap 2015-08-13, imgpaste 2015-02-26, info 2014-03-05, konsole 2015-08-18, log 2015-02-26, nslist 2015-02-26, odt 2015-02-26, pagebreak 2015-07-13, pagemod 2014-11-10, pagenav 2015-02-26, popularity 2013-10-14, qc 2015-06-17, revert 2013-11-21, safefnrecode 2012-07-28, searchpattern 2013-06-16c, sqlite 2015-05-04, todo 2014-11-26, toucher 2012-09-16, usercontact 2015-02-26, usermanager 2014-03-05, wikipediasnippet 2013-04-06, wrap 2015-07-19
Hi.
Thanks for the plugin.
I tried to use it to build an ePub export out of a regularly updated namespace.
The namespace option is really nice for that as there is no need to list each page but I can't find a way to exclude some page (as start, sidebar, or _template) which are purely technical and doesn't have to be in the generated ePub.
Is there a synthax t append to namespace to exclude certain pages ?
Best regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.