Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-27-2023, 12:25 PM   #31
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: 7,657
Karma: 5433388
Join Date: Nov 2009
Device: many
Quote:
[ without using a plug in]
One question ... why rule out plugins as a potential solution? Sigil plugins are integrated right into Sigil itself. Sigil implements many things using plugin/embedded python technology and will continue to do so. We consider Sigil 's python plugins to be a critical feature meant to help meet more user's needs without pushing feature-creep onto everyone.

Numbering chapters or headers seems to be a perfect subject for a plugin.

Just wondering?

Or are all you just saying is that pre-plugins the solution you suggested will work and I am just misunderstanding?

Last edited by KevinH; 07-27-2023 at 12:37 PM.
KevinH is offline   Reply With Quote
Old 07-27-2023, 05:00 PM   #32
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,107
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
@KevinH

Personally, I avoid editing plugins. I would rather try to accomplish an edit using a S&R Regex. Weirdly, I actually enjoy it when I can complete a relatively complex task with some simple regex and logical steps. It's a bit of a challenge.

I am in no way against plugins at all.

Doing it this manual way, I can see what is changing and why I need to change it, and that gives me a much better understanding of html, css and the other aspects of ebooks. Plus, having done it this way for quite a while (going onto 3 years), its second nature and I do it with barely a thought.

Simply pressing a button is no fun
Karellen is online now   Reply With Quote
Advert
Old 07-27-2023, 05:25 PM   #33
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: 7,657
Karma: 5433388
Join Date: Nov 2009
Device: many
I can understand that. Unfortunately some things require a real xhtml parser and need the ability to keep state information which can not be easily (or even at all sometimes) done with regex.

I guess to each their own!
KevinH is offline   Reply With Quote
Old 07-27-2023, 05:33 PM   #34
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: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
But it's not possible to do all editing that needs to be done with regex alone -- simple or complex. People often run into disaster trying to use regex to try to parse xhtml. Simple edits, sure. But when it comes to nested tag quagmires, regex alone is not your friend.

Not to mention that with Sigil's Checkpoint feature, it's still quite possible to see exactly what is changing and why with a plugin, too.

Not that I'm trying to change your mind, or anything, but not all Edit Plugin functionality can be replaced with judicious use of even the most ingenious regex.
DiapDealer is offline   Reply With Quote
Old 07-27-2023, 05:52 PM   #35
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,107
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by DiapDealer View Post
But it's not possible to do all editing that needs to be done with regex alone -- simple or complex.
I keep reading that sentiment in this forum, but so far I have to disagree.

I am yet to come across an edit that I can't fix. Maybe it needs two or three steps instead of one (the challenge), but it gets done. And I have come across coding that I can only describe as trash in some ebooks.
Yes, those nested tags can be a problem, but working inside to out is the way I work around it.

When you come across coding that you believe can't be done by regex alone, I'd love to have a crack at it.

Last edited by Karellen; 07-27-2023 at 05:54 PM.
Karellen is online now   Reply With Quote
Advert
Old 07-27-2023, 07:41 PM   #36
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: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Karellen View Post
I keep reading that sentiment in this forum, but so far I have to disagree.

I am yet to come across an edit that I can't fix. Maybe it needs two or three steps instead of one (the challenge), but it gets done. And I have come across coding that I can only describe as trash in some ebooks.
Yes, those nested tags can be a problem, but working inside to out is the way I work around it.

When you come across coding that you believe can't be done by regex alone, I'd love to have a crack at it.
Well yes.... If you're tackling it in multiple steps, there's nothing you probably can't eventually solve with regex and time alone.

I was talking about those who look for the perfect one-pass regex to parse a rats nest of tag soup (while also covering all edge cases).

When people say "you can't parse html with regex," assume they mean "in one go". Because that's what most people are looking for when they come asking (and have to be let down).
DiapDealer is offline   Reply With Quote
Old 07-27-2023, 07:44 PM   #37
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,107
Karma: 4911876
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by DiapDealer View Post
When people say "you can't parse html with regex," assume they mean "in one go". Because that's what most people are looking for when they come asking (and have to be let down).
Gotcha. Thanks
Then yes, I agree. Some fixes can't be done in one step using regex.
Karellen is online now   Reply With Quote
Old 07-27-2023, 09:44 PM   #38
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: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
No worries. I understand the challenge part as well.
DiapDealer is offline   Reply With Quote
Old 07-28-2023, 02:55 AM   #39
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by Turtle91 View Post
Sorry, no.

1. BeckyEbook posted an answer to your question within 2 HOURS...not days.

2. Also, you never said [without using a plugin] until just now... If you don't want to use a plugin, that's fine, but that is how we are telling you to "elegantly solve your problem."

3. It appears you have several of the people on this thread 'blocked', or you just refuse to read their posts...that, I'm afraid, is on you.

4. You probably won't be able to read this thread either so

1. I read every post. I do not block people
2. "Solution" offered after 2 hours was to open each of 144 chapter files and add each chapter number manually. For me, that was not a solution
3. It was days before anyone said"there's a plug in for that". By then I had done it the hard way.

The crux of the problem seems to be that to create chapter numbers you need them to be present already somewhere in the header code, in order to finagle them out using regex.

The plug in, at first glance, seems to require those numbers to be already present in toc Id tags.

So, please just answer this:
Take it that I have a chapterised epub, each file is to be a chapter. Each chapter begins with a h2 placeholder tag. <H2> placeholder </h2>

There are no numbers anywhere
There are no images

What is the best way, plug ins allowed, to get from there to having all chapters sequentially numbered , with numbers in the toc and on the page at start of each chapter. I promise to read the answer.

(Assume that I am too handicapped to open each of 144 files and insert numeric text in each.)
.............
....
ps the rules whereby sigil decides whether to create a toc ID and how to number them still elude me.
E.g. in one early attempt at splitting etc, I somehow got toc IDs in my h3 tags, that would run sequentially for say 1 to 28, then start over at 1. I think that was because there were a springing of toc ID in h2 tags some pre chapterised version.
stumped is offline   Reply With Quote
Old 07-28-2023, 04:47 AM   #40
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
If you had written right away that these images are as many as 144, I would undoubtedly have given a different solution.

Last edited by BeckyEbook; 07-31-2023 at 02:12 AM. Reason: Patience is a virtue, but not mine.
BeckyEbook is offline   Reply With Quote
Old 07-28-2023, 06:47 AM   #41
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,101
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Read the 4th entry on page 1. That answers all your questions.

- automatically adds numbers to all 144+ chapters
- gives the regex needed to have the image you want
- has the chapter number in the TOC

The 12th post I expanded the explanation and included pictures.

The 20th post I explained how to get Sigil to automatically split a single file into multiple based on your example of having the chapter header image.

Last edited by Turtle91; 07-28-2023 at 10:19 AM.
Turtle91 is offline   Reply With Quote
Old 08-01-2023, 05:40 AM   #42
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
OK

1. the " not reading posts thing- solved"
i relied on the MR email notifications of new post contents. They always did contain a threat of no more notifications until you visit.. which I would ignore because they used to just keep coming anyway.
now they dont. it seems I only get 1 follow up email per visit.

2. the plug in.
wasted 30 mins with this. learnt how to add plugins to sigil, tracked it down, installed it, does not work.
tried lots of books,
, read all the 2018 launch thread & posted there.
Unless the author is still around to offer better support and documentation I will abandon it.

Last edited by stumped; 08-01-2023 at 05:44 AM.
stumped is offline   Reply With Quote
Old 08-01-2023, 11:39 AM   #43
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,101
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Which plug-in are you trying?? The ReworkChapterHeads plug-in works fine… I use it all the time. Once you have it installed the steps (with picture) I provided in post 12 are exactly what I use:

- select ALL the file(s) you want to re-work in the book browser.
- run the plug-in
— skip the first option (to delete headers)
— set the fields exactly as I have them in the picture for the second option
— click OK

EDIT:
Ahh, just saw that you didn’t have the plug-in installed properly. Follow KevinH’s instructions and all should be well.

Last edited by Turtle91; 08-01-2023 at 11:44 AM.
Turtle91 is offline   Reply With Quote
Old 08-02-2023, 01:37 AM   #44
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 3,305
Karma: 10259306
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
Quote:
Originally Posted by Turtle91 View Post
Which plug-in are you trying?? The ReworkChapterHeads plug-in works fine… I use it all the time. Once you have it installed the steps (with picture) I provided in post 12 are exactly what I use:

- select ALL the file(s) you want to re-work in the book browser.
- run the plug-in
— skip the first option (to delete headers)
— set the fields exactly as I have them in the picture for the second option
— click OK

EDIT:
Ahh, just saw that you didn’t have the plug-in installed properly. Follow KevinH’s instructions and all should be well.

thats the plug in i tried
ReworkChapterHeads_v022.zip
sourced from https://www.mobileread.com/forums/sh...d.php?t=301108
i followed these instructions exactly:
Installation
* Select Manage Plugins from the Plugins menu. In the dialog box, select either the Bundled Python or the External Python(Python 3.4+ should be installed on your computer to run this plugin externally).

* Click Add Plugin and select ReworkChapterHeads_vXXX.zip. This will load and install the plugin into Sigil, which you can then select and run using Plugins > Edit > ReworkChapterHeads


there is no mention of needing other installs, yet I suspect some python versions clash.
if i untick use bundled python 3.4 then it does not even try to work- just complains.

i select all books, run plug in- it does something ( a green progress bar briefly fills) then it stops with the failed message

according to the 2018 thread, it should initiate some dialogue as to what run-option I want, but that does not happen

its pointless anyway because according to same thread it can only cope with 100 chapters max

I would need a 200 chapter max for the Wilbur smiths books - all have 100+ chapters when done manually


with practice , it takes <2 mins to do a book the hard way.
I have already wasted enough time on that plug in to have done another 20 books, and I don't even have 20 unchapterised ones in my library.

its basically just this one author. ( if I have others I cant remember which ones and I am not going to open evey book in my library to check.

PS
"Ahh, just saw that you didn’t have the plug-in installed properly. Follow KevinH’s instructions and all should be well."
and how did you remotely diagnose that - curious.[ i found KevinH instructions in the other thread, but they only echo what i already did]

Last edited by stumped; 08-02-2023 at 02:00 AM.
stumped is offline   Reply With Quote
Old 08-02-2023, 07:53 AM   #45
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,101
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
This conversation should be continued on that thread...your issues are very common for known installation snafus.
Turtle91 is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating hidden or invisible page numbers jmurphy Workshop 9 03-10-2023 02:49 PM
Remove Chapter Numbers Rahm Conversion 3 11-04-2021 01:39 PM
Free (nook/Kindle/iTunes/ePub) Elegant Solution [Xtian 1720s Mathematical Thriller] ATDrake Deals and Resources (No Self-Promotion or Affiliate Links) 1 01-27-2015 10:43 AM
Regex Solution to hidden href search? MizSuz Sigil 16 09-29-2012 07:40 PM
chapter numbers are graphical alansplace Sigil 6 07-04-2011 10:10 AM


All times are GMT -4. The time now is 12:44 AM.


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