10-04-2012, 09:44 AM | #1 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Replace with placeholder?
Is it possible in Sigil to replace the regular text with placeholder text?
|
10-04-2012, 02:01 PM | #2 |
Wanderer
Posts: 106
Karma: 472218
Join Date: Jan 2011
Device: Kindle 3, PaperWhite 2
|
Please clarify the question - I'm not sure I understand.
Bob |
10-04-2012, 03:26 PM | #3 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
I mean that I want to show people the book and layout without actually sharing the content. Thus replacing the actual text with placeholder stuff.
Of course I could cut and paste, cut and paste, but I was looking for a possible shortcut. Hope that was clearer. |
10-04-2012, 05:13 PM | #4 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
You could do a single letter search and replace several times to jumble the text.
Scrambling vowels and major consonants should do the trick. Watch for case. Or you could simply take some public domain text and put your CSS for the style sheet and that way they would see the layout without your text and import a few pictures for illustration. |
10-04-2012, 05:37 PM | #5 |
Addict
Posts: 320
Karma: 56788
Join Date: Jun 2011
Device: Kindle
|
In the latest Sigil beta (and the one before it), there's a Lorem Ispum clip. However, I don't see how you would go about applying that in a way that preserves all of your style coding...
|
10-04-2012, 06:43 PM | #6 | |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Quote:
Also taking a public domain text, yes. Good idea. Who knows, it might turn into a better book that way... |
|
10-05-2012, 04:19 AM | #7 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
I suddenly realise that I don´t know how that public domain text could be used.
Of course I could apply my CSS to it but I still have chapters with very specific layout in the chapter itself. So I would need a handy way to replace my original with the PD text. Is there another way to do that than to cut and paste? |
10-05-2012, 09:02 AM | #8 | |
Grand Sorcerer
Posts: 27,463
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Sorry, no. I don't believe that there's anything out there that will replace all the text/code in your existing html layout/structure/page with surrogate Lorem Ipsum text/code. But surely you don't need an entire novel Lorem Ipsumized to share/demonstrate layouts? And I wouldn't think the copy/paste work necessary to demonstrate how you would like to handle the "problem areas" of ebooks' formatting would be all that time consuming. Last edited by DiapDealer; 10-05-2012 at 12:50 PM. |
|
10-05-2012, 12:23 PM | #9 | |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Quote:
But this is no novel with words flowing in an even stream. Almost every chapter has special layout. |
|
10-05-2012, 12:43 PM | #10 |
Well trained by Cats
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
|
|
10-05-2012, 12:52 PM | #11 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
If you are stuck on a special layout, you are likely to be disappointed if you start changing size on a real device or on one of the PC versions, like the Sony Reader Library. You need to check it out.
PDF may be the way to go if you must have a fixed layout. But it has its own problems. You may be able to work around these by limiting the amount of text per page and size of images so the page can be increased in size without everything going sideways. |
10-06-2012, 04:34 AM | #12 |
frumious Bandersnatch
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Perform two regexp replaces: replace all consonants with "x", replace all vowels with "o".
|
10-06-2012, 07:50 AM | #13 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
To expand on that, here is one way to do this using a post by Timur to limit this to actual text without mangling all of your tags:
Find: (?si)[aeiou](?![^<>]*>)(?!.*<body[^>]*>) Replace: a Find: (?si)[bcdfghjklmnpqrstvwxyz](?![^<>]*>)(?!.*<body[^>]*>) Replace: b And in the beta you can put this in a group and run them both one after the other. Might add this as an example for amusement. |
10-06-2012, 08:52 AM | #14 |
Zealot
Posts: 101
Karma: 202774
Join Date: Apr 2012
Device: none
|
Thanks guys. Please don´t overestimate me. I am a writer but no programmer.
I know basic HTML, learned some CSS when I started to work with Sigil but Regex? I saw an ad for it in the thread but apart from that, terra inkognita! Can those operations that you mention be done from inside Sigil? |
10-06-2012, 09:24 AM | #15 |
Sigil developer
Posts: 1,275
Karma: 1101600
Join Date: Jan 2011
Location: UK
Device: Kindle PW, K4 NT, K3, Kobo Touch
|
Yes. Open the Find & Replace Window (Ctrl-F). In the Find text box put the Find text above. In the Replace put the replace text. Select Regex, All HTML Files and then click Replace All. Then do the second Find/Replace statement above the same way. It might take a few minutes. Replaces are done in Code View, but you can switch back to Book View after its done to see the result. Of course, since you have already saved and made a backup of your book you won't loose anything. Just don't save it over your real book
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PDF Placeholder for Calibre's Publisher Field | Themus | Calibre | 1 | 09-04-2012 11:56 PM |
Need Help with Search and Replace please! | worley | Conversion | 2 | 07-28-2012 09:29 AM |
Find Replace | unrulyguides | Sigil | 5 | 02-17-2012 08:38 PM |
search and replace - drops blanks in replace ? | cybmole | Conversion | 10 | 03-13-2011 03:07 AM |
regex replace??? | schuster | Conversion | 14 | 01-29-2011 09:02 AM |