Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2024, 07:50 AM   #241
dearleuk
Enthusiast
dearleuk began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2008
Device: sony
Quote:
Originally Posted by Turtle91 View Post
Just a thought, and not sure if it’s required, do you have the files selected/highlighted that you want it to process?
Yes I do. Tried selecting all files and just one, neither works
dearleuk is offline   Reply With Quote
Old 11-23-2024, 08:28 AM   #242
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,884
Karma: 6120478
Join Date: Nov 2009
Device: many
This plugin still works for a normally structured epub2 even under Sigil 2.3.1:

So a few things to check:

- make sure you are using the very latest version of the plugin
- try with epub2 instead of epub3
- try *after* you run the "Restructure Epub to Sigil Norm" tool (see the Sigil Tools menu).
KevinH is offline   Reply With Quote
Old 11-23-2024, 10:06 AM   #243
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,739
Karma: 24031403
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by dearleuk View Post
There are no error messages, when the plugin is launched it starts up as normal, but when I select the file/ files and press Process Text, nothing happens.
It might help to rename or delete the preference file.

Edit > Preferences > Open Preferences location > plugins_prefs > ePubTidyTool > ePubTidyTool.json

I tested it with a non-standard epub3 book and the Process span tags option and it worked just fine.
What's your operating system and which option(s) didn't work for you?
Doitsu is offline   Reply With Quote
Old 11-25-2024, 06:14 AM   #244
dearleuk
Enthusiast
dearleuk began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2008
Device: sony
Quote:
Originally Posted by KevinH View Post
This plugin still works for a normally structured epub2 even under Sigil 2.3.1:


- try *after* you run the "Restructure Epub to Sigil Norm" tool (see the Sigil Tools menu).
Tried this and it doesn't work, it fails with a error messager about the epub headers not been valid.

If I edit the headers and replace them with headers form other epubs, all is well and the plugin runs fine.

The epubs come from ABBYY FineReader PDF 15 and I don't think I can change how it generates them.

Is there any other way of replacing the headers other than manually?

And thanks for your help
dearleuk is offline   Reply With Quote
Old 11-25-2024, 07:32 AM   #245
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,361
Karma: 20212223
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
I replace all headers on all html files as a matter of course using Sigil’s “Tools/Add Cover” and then regex.

- Add a new cover, this puts the correct header for the type of ePub (version 2 or 3). You can also set a template file (“cover-template2.xhtml” or “cover-template3.xhtml”) with any special coding that you like into Sigil’s preferences folder that will be used by Sigil. (See the users manual)

- I then link the stylesheet to that new cover file.

- I choose to put the title of the book in the <title> tag but it is preferable to put more detailed info to meet accessibility standards - I usually do this as one of the last steps in the production.

- I then use a basic regex to replace all the headers with the one from the new cover page. First, highlight and copy (ctrl-c) the entire header from the beginning to, and including, the </head> tag. Then use the following regex:
Code:
Find: .*?</head>
Replace: paste (ctrl-v) the header you copied here.
Make sure you have regex mode, “All HTML Files”, and “Dot All” selected in the Regex Options.

I set the find code as a clip in Sigil so I don’t have to type it every time. This all takes a couple of seconds for each book.
Turtle91 is offline   Reply With Quote
Old 11-25-2024, 08:03 AM   #246
dearleuk
Enthusiast
dearleuk began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2008
Device: sony
Brilliant, thank you Turtle91, I'll give this a whirl

EDIT

Worked a treat, I can't thank you enough, saved me hours of faffing around

Thanks again

Last edited by dearleuk; 11-25-2024 at 09:05 AM.
dearleuk is offline   Reply With Quote
Old 12-10-2024, 08:18 AM   #247
dearleuk
Enthusiast
dearleuk began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2008
Device: sony
This has stopped working for me again. It's obviously something I'm doing, but have no idea what.

The plugin just doesn't run with my recent epubs. Even if I get the headers from an epub that works with the plugin, no joy, no error message, no nothing, the plugin just doesn't work.

I'm running Windows 10. I tried the Restructure Epub to Sigil Norm" tool and no joy

Anyone got any ideas I can try to make it work? It's such a useful plugin

Thank you

Last edited by dearleuk; 12-10-2024 at 08:28 AM.
dearleuk is offline   Reply With Quote
Old 12-10-2024, 09:40 AM   #248
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,689
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by dearleuk View Post
The plugin just doesn't run with my recent epubs. Even if I get the headers from an epub that works with the plugin, no joy, no error message, no nothing, the plugin just doesn't work.
There has to be a message of SOME kind. Sigil's plugin framework performs some work before the plugin even begins to run. So at the very least, the framework should be producing errors. You may have to expand the Plugin Runner window to see those messages. If nothing pups up when you successfully launch the plugin (and how exactly are you trying to launch the plugin?), then there's something terribly wrong with Sigil in general.
DiapDealer is online now   Reply With Quote
Old 12-10-2024, 10:04 AM   #249
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,884
Karma: 6120478
Join Date: Nov 2009
Device: many
Perhaps pm DiapDealer or myself with a private link to your problem epub, and let us try to see what is happening.
KevinH is offline   Reply With Quote
Old 12-11-2024, 04:13 AM   #250
dearleuk
Enthusiast
dearleuk began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2008
Device: sony


This is a screenshot of the plugin. I only know one way to launch the plugin, plugins, edit. I've selected all the files and pressed Process text and as you can see there is nothing happening.
httpsREMOVE://i.postimg.cc/d0Hyvzf2/screenshot.jpg

Is that any better?
Attached Thumbnails
Click image for larger version

Name:	screenshot.jpg
Views:	56
Size:	321.2 KB
ID:	212448  

Last edited by dearleuk; 12-11-2024 at 05:56 AM.
dearleuk is offline   Reply With Quote
Old 12-11-2024, 04:49 AM   #251
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,966
Karma: 147448039
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by dearleuk View Post


This is a screenshot of the plugin. I only know one way to launch the plugin, plugins, edit. I've selected all the files and pressed Process text and as you can see there is nothing happening.
It would help if the screenshot was an attachment at the full size so the text is actually readable.

Last edited by JSWolf; 12-11-2024 at 05:25 AM.
JSWolf is offline   Reply With Quote
Old 12-11-2024, 06:34 AM   #252
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,689
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
OK. So the plugin is actually running. Its GUI dialog opens and allows you to make selections. It's after you try to process your requests that nothing seems to happen. Unless the epub (or its html files) are huge and you're simply not waiting long enough, my guest guess is that there's something about the epub(s) that's causing the plugin to hang. Have you made sure there's not a Pop up that's hiding underneath the other Windows? Nothing has changed with Sigil or this plugin since you last reported success on 25 November 2024. Unless you're running some sort of beta build of Sigil?
DiapDealer is online now   Reply With Quote
Old 12-11-2024, 10:14 AM   #253
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,884
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay, I am now working with a copy of the problem epub. This epub passes epubcheck. In all ways it just looks normal.

I then made a Checkpoint of the epub in order to look for any changes.

I then fired up ePubTidy and the plugin gui started up just fine.

I used the same setting as in the picture posted above and ran it and got nothing to indicate that anything was done.

I then checked the procecess span tags, and hit Process Text again and a list of 3 span tags immediately appeared.

So the plugin is running and at least properly handling span tags.

I will now try to add some debug print output to epubtidy to see what is going on.
KevinH is offline   Reply With Quote
Old 12-11-2024, 10:43 AM   #254
dearleuk
Enthusiast
dearleuk began at the beginning.
 
Posts: 43
Karma: 10
Join Date: Oct 2008
Device: sony
Thank you both
dearleuk is offline   Reply With Quote
Old 12-11-2024, 10:53 AM   #255
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,884
Karma: 6120478
Join Date: Nov 2009
Device: many
It all appears to be running just fine.

There is a call to HTMLProcessor code but it is hard coded.

This is with the latest version of ePubTidyTool.

Update: there is code to check the "FormatHTML" preference check in HTMLProcessor

It does look for the FormatHTML prefs setting and if it changes anything, it prints to the screen that changes were made.

So my guess is there are no changes that need to be made for the FormatHTML checkbox and so no output is generated.

That said, debug output in the processHTML routine in HTMLProcessor.py shows it is hanging for some reason.

So we are back to something in the files causing a hang. But I can not tell what.

Last edited by KevinH; 12-11-2024 at 11:16 AM.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Tidying Up My Kindle selectortone Calibre 2 07-17-2013 10:35 AM
developping a Plugin for Presentation files abdlink Plugins 4 04-15-2013 11:27 AM
Plugin to fix fb2 files oviksna Plugins 3 01-28-2013 08:53 AM
Tidying Up My Library JayLaFunk Library Management 2 09-20-2011 09:12 AM
Calibre 0.7.50 can't see plugin files mb_webguy Calibre 5 04-29-2011 03:41 AM


All times are GMT -4. The time now is 06:20 PM.


MobileRead.com is a privately owned, operated and funded community.