![]() |
#16 | |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
Quote:
Also, replacing within the xml declaration will cause data loss. |
|
![]() |
![]() |
![]() |
#17 | |
♫
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 661
Karma: 506380
Join Date: Aug 2010
Location: Germany
Device: Kobo Aura / PB Lux 2 / Bookeen Frontlight / Kobo Mini / Nook Color
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#18 |
Enthusiast
![]() 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> </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. |
![]() |
![]() |
![]() |
#19 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
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? |
|
![]() |
![]() |
![]() |
#20 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
Advert | |
|
![]() |
#21 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,569
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
![]() Quote:
![]() 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. |
||
![]() |
![]() |
![]() |
#22 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
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 ![]() 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 |
|
![]() |
![]() |
![]() |
#23 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 ![]() 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. |
![]() |
![]() |
![]() |
#24 |
Sigil developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#25 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
BTW I just tried the Bulk file rename feature. ![]() ![]() |
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |