Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 06-23-2010, 11:49 AM   #16
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by sherman View Post
Personally, for added safety (especially if your forget to check the minimal matching!!) I would use something like:

Find what: <p class="h1">([^<]+)</p>

The only difference from a users point of view is that you are guaranteed that the regex will stop at the first < it comes across.
That will fail to match p elements that have embedded spans in them (or <i>, <b> etc.). It would just silently ignore the whole element.

You should really use "<p class="h1">(.+)</p>" with minimal matching.
Valloric is offline   Reply With Quote
Old 06-23-2010, 01:22 PM   #17
Kivgaen
Enthusiast
Kivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enough
 
Kivgaen's Avatar
 
Posts: 38
Karma: 608
Join Date: Aug 2009
Location: Toronto
Device: all devices
Quote:
Originally Posted by Valloric View Post
That will fail to match p elements that have embedded spans in them (or <i>, <b> etc.). It would just silently ignore the whole element.

You should really use "<p class="h1">(.+)</p>" with minimal matching.
By the way -- I think there's a find and replace bug using the above in a document with multiple .xhtml files.

I tried the expression "<p class="h1">(.+)</p>" with minimal matching, and selecting "regular expression", and "all" radio buttons. When looking at the "current file", I found the first chapter heading, clicked "replace" and it appeared to work fine.

Then I changed it to "All files", and found NO matches. Yet when I selected the next file (find and replace window still open), I switched to Code View, and clicked "Find Next" again, and found the heading for Chapter 2!!.

I did the above process for the next 6 chapters, and then closed the find and replace window. Next I selected the TOC editor to find that there were NO headings in my table of contents. All of the changes I had made in the previous steps had vanished!

This was using the mac version, 0.2.3. I'm testing it on a PC now and if it's a problem there too I'll issue a defect report. But maybe I've done something wrong?

Cheers,

Luise
Kivgaen is offline   Reply With Quote
Advert
Old 06-23-2010, 01:38 PM   #18
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Kivgaen View Post
By the way -- I think there's a find and replace bug using the above in a document with multiple .xhtml files.

I tried the expression "<p class="h1">(.+)</p>" with minimal matching, and selecting "regular expression", and "all" radio buttons. When looking at the "current file", I found the first chapter heading, clicked "replace" and it appeared to work fine.
Were you in Codeview at the time? It's not clear to me if you were; the global s&r only works in Codeview, no matter what you're searching for (text or regex or...)

Quote:

Then I changed it to "All files", and found NO matches. Yet when I selected the next file (find and replace window still open), I switched to Code View, and clicked "Find Next" again, and found the heading for Chapter 2!!.

I did the above process for the next 6 chapters, and then closed the find and replace window. Next I selected the TOC editor to find that there were NO headings in my table of contents. All of the changes I had made in the previous steps had vanished!

This was using the mac version, 0.2.3. I'm testing it on a PC now and if it's a problem there too I'll issue a defect report. But maybe I've done something wrong?

Cheers,

Luise
Bugger. That sounds like the problem we had in 0.2.1 and 0.2.2. - the vanishing changes.
Hitch is online now   Reply With Quote
Old 06-23-2010, 02:44 PM   #19
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by Kivgaen View Post
Then I changed it to "All files", and found NO matches. Yet when I selected the next file (find and replace window still open), I switched to Code View, and clicked "Find Next" again, and found the heading for Chapter 2!!.

I did the above process for the next 6 chapters, and then closed the find and replace window. Next I selected the TOC editor to find that there were NO headings in my table of contents. All of the changes I had made in the previous steps had vanished!
Quote:
Originally Posted by Hitch View Post
Bugger. That sounds like the problem we had in 0.2.1 and 0.2.2. - the vanishing changes.
Life is cruel...

I'll take a look at it tomorrow.
Valloric is offline   Reply With Quote
Old 06-23-2010, 04:08 PM   #20
Kivgaen
Enthusiast
Kivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enough
 
Kivgaen's Avatar
 
Posts: 38
Karma: 608
Join Date: Aug 2009
Location: Toronto
Device: all devices
Quote:
Originally Posted by Valloric View Post
Life is cruel...

I'll take a look at it tomorrow.
The vanishing problem appeared to only happen on the mac... my PC version worked fine. We're running snow leopard, 10.6.2, I think.

As for the global find-and-replace thing, I just now tried opening up ALL the xhtml files in my book, switched them ALL to code view, and did a global "find and replace" and it worked... (that's really annoying, btw, having to open them all and switch them all to code view. Expecially when there are 100+ .xhtml documents in the book!).
Kivgaen is offline   Reply With Quote
Advert
Old 06-23-2010, 04:10 PM   #21
capidamonte
Not who you think I am...
capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
capidamonte's Avatar
 
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
Quote:
Originally Posted by Hitch View Post
Blob-blob-blob, blob-blob-aran,
Blob-blob-blob, blob-blob-aran
Oh Blob-ar-ah-an,
Come take my ha-a-nd....
Blob-ar-aaan,
You got me cutting-and-a-pastin',
searchin' and replacin'
Blob-a-ran blob blob
Blob blob-a-ran
Went to a File, Looking for a Style,
Saw Blab-a-ran, thought she'd go a mile,
With Blob-a-ran, blob-a-ran
Come Take my H-a-a-nd....
That's a lot of blobs. And a blab.

Not that I should blab about the blobs.

Thanks, blub! -- whoops, I mean "Thanks, bub!"

cap
capidamonte is offline   Reply With Quote
Old 06-23-2010, 04:14 PM   #22
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Valloric View Post
Life is cruel...

I'll take a look at it tomorrow.
I did an all files S&R to reduce a H1 to a H2 .

I started in CV

IT WORKED for all files. (I forgot to tick "minimal Matching" if that helps)
theducks is offline   Reply With Quote
Old 06-23-2010, 08:59 PM   #23
Kivgaen
Enthusiast
Kivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enough
 
Kivgaen's Avatar
 
Posts: 38
Karma: 608
Join Date: Aug 2009
Location: Toronto
Device: all devices
Quote:
Originally Posted by theducks View Post
I did an all files S&R to reduce a H1 to a H2 .

I started in CV

IT WORKED for all files. (I forgot to tick "minimal Matching" if that helps)
For me, if I started with one of the files open and in code view, it only found that one file. But if I then opened up all of the files and switched to code view, it found and replaced all of them... I was using a regular expression and had selected minimal matching at the time...
Kivgaen is offline   Reply With Quote
Old 06-23-2010, 09:14 PM   #24
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Kivgaen View Post
For me, if I started with one of the files open and in code view, it only found that one file. But if I then opened up all of the files and switched to code view, it found and replaced all of them... I was using a regular expression and had selected minimal matching at the time...
If you are in CV, on the first file, S&R will open every file if finds the matches.
(I ONLYselect Down or UP. I have had lockouts with "All" direction)
theducks is offline   Reply With Quote
Old 06-23-2010, 10:52 PM   #25
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Valloric View Post
That will fail to match p elements that have embedded spans in them (or <i>, <b> etc.). It would just silently ignore the whole element.

You should really use "<p class="h1">(.+)</p>" with minimal matching.
Sorry, should have been more clear I guess.

I was more talking about situations where you know there is no other tag other than the <p> tag.

I guess I try to be as specific as possible with my regex's these days. May not be strictly necessary. but I find it's good practice for me, as I am still quite the novice at them.

Also, I use Notepad++ as my primary editor, which doesn't have a minimal matching option, and I can't figure out what to use to make the expression lazy, as the '?' doesn't seem to work for this purpose.

Last edited by sherman; 06-23-2010 at 10:56 PM.
sherman is offline   Reply With Quote
Old 06-24-2010, 10:53 AM   #26
Kivgaen
Enthusiast
Kivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enoughKivgaen will become famous soon enough
 
Kivgaen's Avatar
 
Posts: 38
Karma: 608
Join Date: Aug 2009
Location: Toronto
Device: all devices
Quote:
Originally Posted by theducks View Post
If you are in CV, on the first file, S&R will open every file if finds the matches.
(I ONLYselect Down or UP. I have had lockouts with "All" direction)
Ya, that may be how it's "supposed" to work... but it didn't work that way for me.
Kivgaen is offline   Reply With Quote
Old 06-24-2010, 11:16 AM   #27
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Kivgaen View Post
Ya, that may be how it's "supposed" to work... but it didn't work that way for me.
This has to be driving Valloric up the wall.

XP with just 2 tabs (CSS and Ch01)
S&R
Find (first)
Replace (Repeat aftere every find)
All tabs with the search term are now open.
Tabs without the search term are NOT open
Tabs before the Start point, even if they have the term value, are NOT open (expected)

I have not tried a "Replace All", There are a few times I want to "skip" a replace.
theducks is offline   Reply With Quote
Old 06-24-2010, 08:47 PM   #28
Katdragon
Connoisseur
Katdragon began at the beginning.
 
Posts: 98
Karma: 40
Join Date: May 2010
Device: Kobo (currently out of commission), Kindle 3
Hi everyone,
I'm having some trouble with the TOC editor in terms of the fact that it doesn't seem to appear on the EPUB documents used by my Kobo. I've used the headings on the "Chapter One" text and then used the "Ctrl+Enter" to split the chapters but when I go to the navigation menu on the Kobo, it's still one chapter.
Katdragon is offline   Reply With Quote
Old 06-24-2010, 09:50 PM   #29
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,447
Karma: 157030631
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by Katdragon View Post
Hi everyone,
I'm having some trouble with the TOC editor in terms of the fact that it doesn't seem to appear on the EPUB documents used by my Kobo. I've used the headings on the "Chapter One" text and then used the "Ctrl+Enter" to split the chapters but when I go to the navigation menu on the Kobo, it's still one chapter.
Do the headings show up in the TOC editor inside of Sigil? And when you split the chapters, do they show up as separate xhtml files?

Hitch
Hitch is online now   Reply With Quote
Old 06-25-2010, 02:50 AM   #30
Katdragon
Connoisseur
Katdragon began at the beginning.
 
Posts: 98
Karma: 40
Join Date: May 2010
Device: Kobo (currently out of commission), Kindle 3
Yes and yes.
Here's a screencap:http://amygordon.com.au/SigilTOC.gif

Edit: I tried with another book, and although it generated a TOC on the Kobo menu, any attempts to go to a specific chapter (or "next/previous" chapter) in the menu took me to the start of the book.

When I loaded the original book on Sigil it was divided into the index splits already so I didn't have to do any editing as I did with the first book.

Last edited by Katdragon; 06-25-2010 at 07:40 AM. Reason: More info.
Katdragon is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sigil Toc editor Enesco Sigil 16 09-23-2010 06:41 AM
PRS-500 Software: LRF TOC Editor v1.02 hal9000 Sony Reader Dev Corner 29 07-04-2010 07:17 PM
Problem with TOC editor alecE Sigil 2 10-29-2009 01:30 AM
Getting TOC to work? enarchay Sony Reader 11 05-28-2009 05:46 AM
Making a TOC for LRFs? Issues with Calibre + LRF TOC editor not working Magitek LRF 0 05-06-2009 01:25 PM


All times are GMT -4. The time now is 04:46 PM.


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