Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-04-2012, 09:15 PM   #16
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by WS64 View Post
I had a few crashes with Sigil 0.5, and ALL were while replacing in Current File, there is something very faulty with that one...
QPlainTextEdit cannot handle a large number of QTextCursor replace operations. Doing a replace all on a large document with a large number of replaces will cause it to crash.

Also, replacing within the xml declaration will cause data loss.
user_none is offline   Reply With Quote
Old 02-05-2012, 03:05 AM   #17
WS64
WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.WS64 ought to be getting tired of karma fortunes by now.
 
WS64's Avatar
 
Posts: 661
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
Quote:
Originally Posted by user_none View Post
QPlainTextEdit cannot handle a large number of QTextCursor replace operations. Doing a replace all on a large document with a large number of replaces will cause it to crash.

Also, replacing within the xml declaration will cause data loss.
QPlainTextEdit , does that mean BV?
I do not use BV at all for F&R, my crashes were at F&R in CV for the current file. All files always works.
WS64 is offline   Reply With Quote
Advert
Old 02-05-2012, 04:03 AM   #18
John2011
Enthusiast
John2011 began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jan 2011
Device: Kobo 1
Further to my previous post about replacing <p> with <p class="small">

When ever I paste a text file into the BV, then go to the CV Sigil puts
<div> xxxxxxxxx</div>
on all the paragraphs.

OK, no big deal, I go to the trusty Find and Replace and

find <div>
Replace <p>

Click all and away it goes and does it, the whole chapter no problems.

When Tiny teddy adds the </p> for me, I go back into CV and ask Find and Replace to
Find <p>&nbsp;</p>
Replace with nothing

This is because there is a blank line between <p>s

I click all and away it goes again quite happily.

But ask it to do <p class="small"> and it all falls over. Strange.

It is 0.5.0 I am using.

I like where the F&R is now, BTW no more hiding text with that pesky floating window.

Peace,
John P.
John2011 is offline   Reply With Quote
Old 02-05-2012, 05:12 AM   #19
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Quote:
Originally Posted by user_none View Post
QPlainTextEdit cannot handle a large number of QTextCursor replace operations. Doing a replace all on a large document with a large number of replaces will cause it to crash.
This sounds exactly as the behavior I am seeing. I must say that repeating the action after a restart sometimes does work, but not always. Also, on older versions this was not the case.
It affects my way of working, because I usually do all kind or S&R on the whole book before splitting.

Is this a problem with the current version of QT? Any ideas about a solution for it?
Toxaris is offline   Reply With Quote
Old 02-05-2012, 05:56 AM   #20
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
Just to expand on what user_none said:

If you replace in the Current File (BV or CV), and your file is large, and your find and replace text will cause a lot of replacements, Sigil will crash due to a bug in the Qt editor that is used to display/edit your text. Replace in All Files does not crash since it does not do the replacement interactively. Replace All in Current File uses the same logic now as Find Next so that you can undo replacements - but this means QTextCursor is called to update your position in the document, and the QTextCursor routine from Qt just can't handle large replacements.

If you replace in All Files, and you replace something within the xml declaration (like a ") then, since Sigil will try to auto-correct the code in your files, you will have data loss. If you mess up the html badly, then you've got problems.

Replacing in Book View is also unpredictable due to the way the code converts from html to plain text and should be avoided, which will soon be taken care of for you.

These issues cannot/won't be fixed in the current code. They require a rewrite with a new approach to editing. I believe user_none will be working on this for a later version, but in the meantime just be aware of the issues.
meme is offline   Reply With Quote
Advert
Old 02-05-2012, 08:37 AM   #21
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,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by meme
Replacing in Book View is also unpredictable due to the way the code converts from html to plain text and should be avoided,
It's not unpredictable anymore. It just flat-out eats large random chunks of your text—each and every time you attempt it (F&R in BV). It very predictably... just plain doesn't work at all anymore.

Quote:
which will soon be taken care of for you.
Glad to hear it.

So who's got the best regex for capturing all of the text (including unicode) between two normal (straight) double-quotes into a backreference(s)—all the while ignoring the quoted content (attributes) inside of html tags?

It doesn't have to be perfect (I'm used to manually massaging the results), but bulk replacing straight quotes with curly-quotes was one of the only situations where I attempted to use F&R in BV (where the current document was always small in size).

Last edited by DiapDealer; 02-05-2012 at 10:50 AM.
DiapDealer is offline   Reply With Quote
Old 02-05-2012, 10:36 AM   #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: 31,047
Karma: 60358908
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 meme View Post
If you replace in All Files, and you replace something within the xml declaration (like a ") then, since Sigil will try to auto-correct the code in your files, you will have data loss. If you mess up the html badly, then you've got problems.

Replacing in Book View is also unpredictable due to the way the code converts from html to plain text and should be avoided, which will soon be taken care of for you.
This exact issue (1) is why I always test my finds by stepping through a whole bunch of times (sometimes a bunch of different sections) before I hit All.
Sometimes I determine, I am unable to craft a bullet proof Find and step through the whole book, doing Next or Replace.

Crash is not good as a quick and dirty, can we get a toggle (button) to disable the Undo logging?
BTW I always start/obtain my Find in CV. BV is for visually locating errors and adding/removing Paragraph breaks
(My work flow is probably biased by the fact my first word processor was Wordstar 2, with Dot Code format commands )

Last edited by Jellby; 02-05-2012 at 10:57 AM. Reason: fixed markup
theducks is offline   Reply With Quote
Old 02-05-2012, 12:49 PM   #23
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
The replace in BV will be taken care of by not doing it

As for a toggle, the effort/impact for doing this is troublesome when its planned to replace the cause. I know user_none's said this before, but now I can see why he says it A bit more patience and hopefully a more solid version will be forthcoming after the 5.1 release.

As for the find/replace in BV, I was wondering how to address the very common issues that users have of wanting to only replace certain sections of text. Instead of cluttering up this thread, I'll start a new one requesting Regex suggestions.
meme is offline   Reply With Quote
Old 02-05-2012, 06:11 PM   #24
meme
Sigil developer
meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.meme ought to be getting tired of karma fortunes by now.
 
Posts: 1,274
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
@theducks. Now that 0.5.1 is out, you can use Replace in Selected Files to avoid the crash issue when replacing in current file - just select 1 file (or more) in the Book Browser and set Look: Selected HTML Files and it will run like Replace All.
meme is offline   Reply With Quote
Old 02-05-2012, 06:48 PM   #25
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: 31,047
Karma: 60358908
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 meme View Post
@theducks. Now that 0.5.1 is out, you can use Replace in Selected Files to avoid the crash issue when replacing in current file - just select 1 file (or more) in the Book Browser and set Look: Selected HTML Files and it will run like Replace All.
Thanks for thet

BTW
I just tried the Bulk file rename feature.
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Loss of Energy clintbradford Kobo Reader 13 07-31-2010 04:58 PM
Data loss situations earthq Calibre 0 06-26-2009 03:54 PM
Mourning a loss astrodad Sony Reader 38 02-23-2009 02:57 PM
Data loss FuzzyGamer Sony Reader 4 06-25-2007 04:24 PM


All times are GMT -4. The time now is 03:57 AM.


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