turnermm / epub

Dokuwiki plugin for creating ebooks
http://www.dokuwiki.org/plugin:epub
15 stars 9 forks source link

Pages sorted reversed alphabetical, but not by sequence in epub file #11

Closed stko closed 10 years ago

stko commented 10 years ago

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

turnermm commented 10 years ago

I have no idea why this is happening and have never seen it before. Here is the markup for an ebook which I create on a regular basis:

[[:introduction|Introduction]]
[[:configuration|Configuration]]
[[:features|Features]]
[[:media|Media Links Images]] 
[[:file_browser_install|Installing File Browser]]
[[:v06|Important Upgrades in Version 6]]
[[:faq|Miscellaneous Solutions]]
[[:internal_to_external|Convert Internal to External Link]]
[[:entities|HTML Entities How-To]]
[[:plugins|Plugins: Use and Examples]]
[[:docs:auto_install|Install with Plugin Manager]]
[[docs:ie9_ff6|Browser Compatiblity Issues]]
[[:fckglite_lang_interface|fckgLite UI Language file]]
[[:lang_template|Javascript Language Additons ]]
[[:dailies|Dailies]]
[[:switch|Editor Switching]]

This is the result: http://www.mturner.org/fckgLite/lib/exe/fetch.php?media=fckglite.epub I suppose I would need to know more about your system and what your steps are.

stko commented 10 years ago

Hello Myron thanks for the quick response and don't be surprised about the time, when I'm writing this, I'm just located in China :-)

The epub configuration page I'm using you can find here http://www.oobd.org/doku.php?id=doc:epub&do=edit&rev=0

I also tried just now to do a re-creation of the epub to show the log file, but the process just does nothing when I press the start button, but that could have the following reason: The wiki runs on a hosted webspace which often comes back with "503: Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."

That might also a potential root cause, that the server kills any too long running client processes. The first translation took over 60 secs, and I really can't say if not some translation processes have been killed during that. There was only one warning at the end of the log file that a temporary directory couldn't be deleted.

As soon as the server allows me again to let the translation run, I'll support an actual log.

many thanks for your help!

regards Steffen

turnermm commented 10 years ago

I just updated the plugin so that now the Start button is (or should) always be active.

I see you are using fckgLite. For best results you should switch over to the Dokuwiki native editor when setting up your epub page.

stko commented 10 years ago

Sorry for the late answer, but it took me two days (with breaks..) to understand that I really have to change something, not just to re-save a page to start the conversion (as the start-button was, after your plugin update, always visible but without doing something :-)

So finally I now got the following log:

Directory: /mnt/web7/e3/27/51360227/htdocs/oobdwiki/data/pages/doc Found following pages in :doc:* namespace: Array ( [0] => :doc:cygwininstall [1] => :doc:dev_androidlivecd [2] => :doc:dev_clientdesignguide [3] => :doc:dev_cygwininstall [4] => :doc:dev_googlesetup [5] => :doc:dev_links [6] => :doc:dev_readotherformats [7] => :doc:dev_setupandroid [8] => :doc:dev_setupfirmware [9] => :doc:dev_setupme [10] => :doc:dev_start [11] => :doc:dev_systemspec [12] => :doc:epub [13] => :doc:faq [14] => :doc:hw_assembly-cupv5 [15] => :doc:hw_bootloader [16] => :doc:hw_busswitch [17] => :doc:hw_firmware [18] => :doc:hw_flash-from-usb-stick [19] => :doc:hw_quickstart [20] => :doc:hw_start [21] => :doc:hw_syntax [22] => :doc:lua_make-your-own-scripts [23] => :doc:lua_make [24] => :doc:lua_start [25] => :doc:lua_tutorial [26] => :doc:pgp_setup [27] => :doc:rfc_canraw-mode [28] => :doc:rfc_onion [29] => :doc:rfc_pgp-encrypting-sensible-data-with-pgp [30] => :doc:rfc_rtd-real-time-data-protocol-for-the-oobd-firmware [31] => :doc:rfc_start [32] => :doc:sidebar [33] => :doc:start [34] => :doc:startup_android [35] => :doc:startup_javame [36] => :doc:startup_oobdscript [37] => :doc:startup_usage [38] => :doc:startup_windows [39] => :doc:tools_cortex-crc32 [40] => :doc:tools_filelist [41] => :doc:tools_olp [42] => :doc:tools_oobdcopyshop [43] => :doc:tools_oobdtemple [44] => :doc:tools_oodbcreate [45] => :doc:tools_opendiagx [46] => :doc:tools_start ) Saving namespace pages Created following titles: Array ( [0] => Cygwininstall [1] => Dev Androidlivecd [2] => Dev Clientdesignguide [3] => Dev Cygwininstall [4] => Dev Googlesetup [5] => Dev Links [6] => Dev Readotherformats [7] => Dev Setupandroid [8] => Dev Setupfirmware [9] => Dev Setupme [10] => Dev Start [11] => Dev Systemspec [12] => Epub [13] => Faq [14] => Hw Assembly-cupv5 [15] => Hw Bootloader [16] => Hw Busswitch [17] => Hw Firmware [18] => Hw Flash-from-usb-stick [19] => Hw Quickstart [20] => Hw Start [21] => Hw Syntax [22] => Lua Make-your-own-scripts [23] => Lua Make [24] => Lua Start [25] => Lua Tutorial [26] => Pgp Setup [27] => Rfc Canraw-mode [28] => Rfc Onion [29] => Rfc Pgp-encrypting-sensible-data-with-pgp [30] => Rfc Rtd-real-time-data-protocol-for-the-oobd-firmware [31] => Rfc Start [32] => Sidebar [33] => Start [34] => Startup Android [35] => Startup Javame [36] => Startup Oobdscript [37] => Startup Usage [38] => Startup Windows [39] => Tools Cortex-crc32 [40] => Tools Filelist [41] => Tools Olp [42] => Tools Oobdcopyshop [43] => Tools Oobdtemple [44] => Tools Oodbcreate [45] => Tools Opendiagx [46] => Tools Start ) processed: :doc:tools_start processed: :doc:tools_opendiagx processed: :doc:tools_oodbcreate processed: :doc:tools_oobdtemple processed: :doc:tools_oobdcopyshop processed: :doc:tools_olp processed: :doc:tools_filelist processed: :doc:tools_cortex-crc32 processed: :doc:startup_windows processed: :doc:startup_usage processed: :doc:startup_oobdscript processed: :doc:startup_javame processed: :doc:startup_android processed: :doc:start processed: :doc:sidebar processed: :doc:rfc_start processed: :doc:rfc_rtd-real-time-data-protocol-for-the-oobd-firmware processed: :doc:rfc_pgp-encrypting-sensible-data-with-pgp processed: :doc:rfc_onion processed: :doc:rfc_canraw-mode processed: :doc:pgp_setup processed: :doc:lua_tutorial processed: :doc:lua_start processed: :doc:lua_make processed: :doc:lua_make-your-own-scripts processed: :doc:hw_syntax processed: :doc:hw_start processed: :doc:hw_quickstart processed: :doc:hw_flash-from-usb-stick processed: :doc:hw_firmware processed: :doc:hw_busswitch processed: :doc:hw_bootloader processed: :doc:hw_assembly-cupv5 processed: :doc:faq processed: :doc:epub processed: :doc:dev_systemspec processed: :doc:dev_start processed: :doc:dev_setupme processed: :doc:dev_setupfirmware processed: :doc:dev_setupandroid processed: :doc:dev_readotherformats processed: :doc:dev_links processed: :doc:dev_googlesetup processed: :doc:dev_cygwininstall processed: :doc:dev_clientdesignguide processed: :doc:dev_androidlivecd processed: :doc:cygwininstall processed: start :startup_javame not found :startup_android not found :startup_windows not found :startup_usage not found :startup_oobdscript not found :lua_start not found :lua_make-your-own-scripts not found :lua_tutorial not found :lua_make not found :hw_start not found :hw_quickstart not found :hw_assembly-cupv5 not found :hw_busswitch not found :hw_bootloader not found :hw_firmware not found :hw_flash-from-usb-stick not found :hw_syntax not found :tools_start not found :tools_cortex-crc32 not found :tools_filelist not found :tools_olp not found :tools_oobdcopyshop not found :tools_oobdtemple not found :tools_oodbcreate not found :tools_opendiagx not found :pgp_setup not found :dev_start not found :dev_googlesetup not found :dev_cygwininstall not found :dev_setupswing not found :dev_setupme not found :dev_setupandroid not found :dev_androidlivecd not found :dev_setupfirmware not found :dev_clientdesignguide not found :dev_systemspec not found :dev_readotherformats not found :dev_links not found :rfc_start not found :rfc_canraw-mode not found :rfc_pgp-encrypting-sensible-data-with-pgp not found :rfc_rtd-real-time-data-protocol-for-the-oobd-firmware not found :rfc_onion not found :faq not found Using LESS: css3.php found Title Page for Text/title.html found Tools Start for Text/doc_tools_start.html found Tools Opendiagx for Text/doc_tools_opendiagx.html found Tools Oodbcreate for Text/doc_tools_oodbcreate.html found Tools Oobdtemple for Text/doc_tools_oobdtemple.html found Tools Oobdcopyshop for Text/doc_tools_oobdcopyshop.html found Tools Olp for Text/doc_tools_olp.html found Tools Filelist for Text/doc_tools_filelist.html found Tools Cortex-crc32 for Text/doc_tools_cortex-crc32.html found Startup Windows for Text/doc_startup_windows.html found Startup Usage for Text/doc_startup_usage.html found Startup Oobdscript for Text/doc_startup_oobdscript.html found Startup Javame for Text/doc_startup_javame.html found Startup Android for Text/doc_startup_android.html found Start for Text/doc_start.html found Sidebar for Text/doc_sidebar.html found Rfc Start for Text/doc_rfc_start.html found Rfc Rtd-real-time-data-protocol-for-the-oobd-firmware for Text/doc_rfc_rtd-real-time-data-protocol-for-the-oobd-firmware.html found Rfc Pgp-encrypting-sensible-data-with-pgp for Text/doc_rfc_pgp-encrypting-sensible-data-with-pgp.html found Rfc Onion for Text/doc_rfc_onion.html found Rfc Canraw-mode for Text/doc_rfc_canraw-mode.html found Pgp Setup for Text/doc_pgp_setup.html found Lua Tutorial for Text/doc_lua_tutorial.html found Lua Start for Text/doc_lua_start.html found Lua Make for Text/doc_lua_make.html found Lua Make-your-own-scripts for Text/doc_lua_make-your-own-scripts.html found Hw Syntax for Text/doc_hw_syntax.html found Hw Start for Text/doc_hw_start.html found Hw Quickstart for Text/doc_hw_quickstart.html found Hw Flash-from-usb-stick for Text/doc_hw_flash-from-usb-stick.html found Hw Firmware for Text/doc_hw_firmware.html found Hw Busswitch for Text/doc_hw_busswitch.html found Hw Bootloader for Text/doc_hw_bootloader.html found Hw Assembly-cupv5 for Text/doc_hw_assembly-cupv5.html found Faq for Text/doc_faq.html found Epub for Text/doc_epub.html found Dev Systemspec for Text/doc_dev_systemspec.html found Dev Start for Text/doc_dev_start.html found Dev Setupme for Text/doc_dev_setupme.html found Dev Setupfirmware for Text/doc_dev_setupfirmware.html found Dev Setupandroid for Text/doc_dev_setupandroid.html found Dev Readotherformats for Text/doc_dev_readotherformats.html found Dev Links for Text/doc_dev_links.html found Dev Googlesetup for Text/doc_dev_googlesetup.html found Dev Cygwininstall for Text/doc_dev_cygwininstall.html found Dev Clientdesignguide for Text/doc_dev_clientdesignguide.html found Dev Androidlivecd for Text/doc_dev_androidlivecd.html found Cygwininstall for Text/doc_cygwininstall.html found Documentation for Text/start.html found Footnotes for Text/footnotes.html packing epub /mnt/web7/e3/27/51360227/htdocs/oobdwiki/data/meta/epub/admin/62d24c9c610f42310d2246e03650bb0e/ ziparchive used ebook id=doc:epub New Ebook: epub:admin:2014_march_6_06-00-47.epub unable to remove dir: /mnt/web7/e3/27/51360227/htdocs/oobdwiki/data/meta/epub/admin/62d24c9c610f42310d2246e03650bb0e/ error code: 2

And when finally looking into the finished epub, the result is as before. The pages are sorted in reversed alphabetical order.

I try to copy and paste a screenshot in here: (hopefully it works?)

image

stko commented 10 years ago

the first sceenshot failed, trial Nr.2:

image

turnermm commented 10 years ago

You did not mention that you were using the namespace feature. I'll have to take a look at that.

turnermm commented 10 years ago

Pages now sorted a-z by default, otherwise left unsorted. This update might also solve your Start Button issue, which might have to do with your server.

stko commented 10 years ago

Hello Myron good news, everything is working now (and its working fine, the results are excellent -many thanks for your tool!)

So what happened:

At the beginning I created the epub config page inside a sub- namespace (e.g. mynamespace:epub). I've thought, that I can use relative page names also inside such a sub- namespace, so I referenced to my page (mynamespace:page) inside the epub config just relative like

[[page|My Page]]

That failed, because I found in the epub log file that a : is been added to each page name, so "page" became ":page", which does not exist, so the conversion failed.

Then I made the second fault by misunderstanding the namespace option. I added "namespace :mynamespace:*" to the epub config, but without realising, that this disables the list of given pages, using the whole namespace and mainly switches from the given page list to the sorted directory list.

Finally, after understanding this, I removed the namespace option again and made all my page references absolute by adding the namespace, so

[[page|My Page]]

became

[[:mynamespace:page|My Page]]

and now it's working fine.

So in fact I stumbled over the fact, that epub makes absolute pages out of relative ones by adding a ":". That caused that unexpected behaviour, as this is different as what Dokuwiki itself does.

But now it works - many thanks!

regards Steffen

turnermm commented 10 years ago

Yes, you are correct. It doesn't take relative namespaces into consideration. I'll have to look at that to see if I can fix it.

I don't understand this however: "Then I made the second fault by misunderstanding the namespace option. I added "namespace :mynamespace:*" to the epub config, but without realising, that this disables the list of given pages, using the whole namespace and mainly switches from the given page list to the sorted directory list." Do you mean that you added a namespace after the first entry? Could you explain further? Thanks.

stko commented 10 years ago

No, I did not add a namespace option after the first entry, I added it before. I had understood the meaning of the namespace option wrong because I've thought, that would make my relative page names valid (by declaring through the namespace, where these pages can be found)

And virtually that had the wanted effect: The pages, which I had listed, now appeared in the output, but not any more in the sequence I had listed them - but that was, as I now have understood, because the namespace option just took all pages of that namespace and ignored my own list behind.

So, simply said, I misunderstood the function of the namespace option... ;-)

turnermm commented 10 years ago

I think this is all fixed now so am closing.