View Single Post
Old 08-20-2015, 07:36 AM   #33
Nick_1964
Bookworm
Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.Nick_1964 ought to be getting tired of karma fortunes by now.
 
Nick_1964's Avatar
 
Posts: 975
Karma: 768585
Join Date: Aug 2010
Location: Netherlands
Device: Sony prs-650, Kobo Glo HD (2x), Kobo Glo
Quote:
Originally Posted by mattmc View Post
Ew.

That's funny, because that markup looks similar to what InDesign produces, in terms of style tags covering everything. I actually already wrote a script that handles this. Specifically, it does this:

Code:
// Start:
<p><span class="123">Hello</span> <span class="123">World</span><span class="123">!</span></p>

// End:
<p><span class="123">Hello World!</span></p>
For example, I took your input and produced this:
Spoiler:

<p class="dlct-000"><span class="dlct-007">&apos;Ik weet het,&apos; zei Ro zacht. &apos;Ik heb alles gezien. Ik zat onder de tafel verstopt.</span></p>

<p class="dlct-000"><span class="dlct-007">Elena keek hem verbijsterd aan.</span></p>

<p class="dlct-000"><span class="dlct-007">&apos;Mijn moeder zei dat ze mij een afkoelperiode wilde geven en dat ik dan wel weer redelijk zou worden. Ze stopte mij in een kamer, maar ik kon ontsnappen. Joxy, mijn priv&#xE9;- bediende heb ik kunnen overhalen en zij verstopte mij onder de trolley die ze naar de grote zaal bracht. Toen ik zag dat daar van alles stond te gebeuren besloot ik mij onder tafel te verbergen. Ik heb alles gezien en nu kom ik je halen. We moeten weg hier. We moeten William en Charlotte bevrijden. Dat&#x2026; wezen is mijn moeder niet meer!&apos;</span></p>

<p class="dlct-000"><span class="dlct-007">Elena knikte en ze schreef opnieuw iets op het papier. &apos;Wat wil je doen? Samis heeft nu de twee boeken. Alles en iedereen is hier aangepast, gekruist of gemaakt. Greysdale is bewoond door zombies, Utopalta is half vergaan en Willowjinx is weg. Waar moeten we naartoe? Ik kan niets zo!&apos; Elena wees naar haar keel.</span></p>

<p class="dlct-000"><span class="dlct-007">&apos;Shit- ja!&apos; zei Ro net iets te hard. Meteen sloeg Elena een hand voor zijn mond.</span></p>

<p class="dlct-000"><span class="dlct-007">Ro haalde haar hand weg. &apos;Sorry,&apos; fluisterde hij. &apos;Ik weet het niet, maar we moeten iets doen.&apos;</span></p>

<p class="dlct-000"><span class="dlct-007">Met tegenzin schudde Elena haar hoofd. Ze pakte het papiertje en schreef verder. &apos;We hebben alleen het huis in het bos over. Misschien dat de professor ons kan helpen. Aan de Codex Trias hebben we niets. Die is veilig bij Bia en Luxis. Hier kunnen we niet blijven. We moeten William en Charlotte bevrijden en gaan dan naar het bos.&apos;</span></p>

<p class="dlct-000"><span class="dlct-007">&apos;Goed plan,&apos; fluisterde Ro.&amp;nbsp;</span></p>

<p class="dlct-000"><span class="dlct-007">Elena pakte het papier en gooide het in de open haard. Ro nam haar bij de hand en trok haar door de deur waar hij vandaan was gekomen. Ze kwam in een gelijksoortige kamer als die van haar alleen was het hier een stuk rommeliger.&amp;nbsp;</span></p>


Because I'm using an XML parsing engine, it does encode the apostrophes, ampersands and such. Is this acceptable?
It looks 20 times better, but I am on the right way now,and almost cleaned the books, the only problem I have is that it is hard to find where blanc lines (paragraps) have to be inserted.. I was hoping that at least a new paragraph would start with the same "dict code" to detect where one must be before removing everything,but no logics in there..

I am also busy with the regex search, to learn it, the problem is not much sites uses examples from practice.. there are explanations enough but in order to work for me,I must have examples like, insert this, than that happens.. not the dry explanation like enter a # for every single this or that because then I can't see the usage of it,when I can, I also know that I could use that or not.

Sorry for late responding, there is a DDoS attack on my provider for 2 days and internet is a bit difficult to access, I now use Googles DNS servers to bypass the attacked dns servers of my provider..
Nick_1964 is offline   Reply With Quote