![]() |
#1 |
Enthusiast
![]() Posts: 46
Karma: 10
Join Date: Mar 2024
Device: none
|
Borkify Plugin - Possible limitation?
Hello,
I have an epub which causes Sigil to crash when I attempt to restructure it to Sigil Norm. Normally I would use the borkify plugin on the epub to allow me to post it for further investigation, however the borkify plugin crashes with the following error message ..converting: cover.xhtml with manifest id: cover Traceback (most recent call last): File "/usr/local/share/sigil/plugin_launchers/python/launcher.py", line 142, in launch self.exitcode = target_script.run(container) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/karl/.local/share/sigil-ebook/sigil/plugins/Borkify/plugin.py", line 113, in run with open(fpath, "wb") as f: ^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmphk94al94/OEBPS/cover.xhtml' Error: [Errno 2] No such file or directory: '/tmp/tmphk94al94/OEBPS/cover.xhtml' I've manually unpacked the epub and there isn't an OEBPS directory, so I'm assuming the borkify plugin will only work on standard epubs which already have the correct directory structure. Any suggestions as to how I could get round this? Thanks Karl |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 717
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Various
|
Borkify plugin is 7 years old, actually only accepts the standard folder structure (Sigil Norm) inside the EPUB file.
The solutions are two: 1. restructure first, then Borkify. 2. improve the Borkify plugin to take into account a different folder structure. The change is relatively simple. If I'm looking correctly, all you need to do is replace the lines in the plugin.py file: Code:
if "/" in href: destdir, filename = unquote(filename).split("/") fpath = os.path.join(temp_dir, "OEBPS", destdir, filename) Code:
if bk.launcher_version() >= 20190927: fpath = os.path.join(bk._w.ebook_root, bk.get_opfbookpath()) else: fpath = os.path.join(bk._w.ebook_root, 'OEBPS', opf_name) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 46
Karma: 10
Join Date: Mar 2024
Device: none
|
Hi Becky,
Thanks for the quick reply. Restructuring is not an option, as it's the restructuring that causes Sigil to crash! :-) I replaced the code in plugin.py as you suggested. That certainly fixed the crash, but the output file isn't borkified at all. Last time I had an issue with an epub, I shared it via Proton Drive. If you like I can do this again and then you can let me know after you've grabbed it and I can remove the share. |
![]() |
![]() |
![]() |
#4 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,128
Karma: 18727091
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I also get occasional failures of the restructuring algorithm but usually it’s due to malformed coding in the epub and is easily fixable. I would ignore the whole Borkify issue until you get it to pass the restructuring.
When you first open the epub in Sigil hit F7 to run a well-formed check. That should give you a list of problems to fix. When fixed you should be able to restructure, then Borkify (if you still need to). |
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() Posts: 46
Karma: 10
Join Date: Mar 2024
Device: none
|
Hi Dion,
Already tried that. No problems found, but Sigil still crashes when I attempt a restructure. Karl |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,864
Karma: 5449552
Join Date: Nov 2009
Device: many
|
You could just pm a private link to DiapDealer or myself here on MR. We can then use it to track down and fix the bug without you needing to make it publicly available.
BTW, Alternatively, try using Find and Replace to a selected body tag contents with the same a single paragraph of text. If Restructuring the that works, then you know the issue is with that file's content links of some sort. But depending on the number of files, this may take a long time. Or try find and replace and turn on the Text Mode flag and replace all (ie outside tags) with nonsense text. Or, make a Checkpoint, then run Mend on all HTML files and see if the restructure bug still happens. If not compare it to the Checkpoint to see what changed. Please do let us know what you find, as Sigil should never crash. Last edited by KevinH; Today at 09:19 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
kepub limitation? | CyberPaul | Kobo Reader | 16 | 06-08-2022 04:01 PM |
Borkify ePUB | Toxaris | Plugins | 18 | 01-26-2017 06:21 PM |
Kepub limitation | aluisscp | Kobo Reader | 7 | 06-29-2014 04:22 PM |
Library Limitation | Catlady | General Discussions | 11 | 04-21-2014 07:26 PM |
Size limitation? | Kumabjorn | Calibre | 2 | 02-19-2012 11:12 AM |