Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-02-2012, 11:58 AM   #1
sebito
Junior Member
sebito began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
181.000 Footnotes

Hi all ,

I have a serious problem, I am developing epub conversion to a Catholic Bible.

The base file from which you started to work is an RTF styles and footnotes have already created. In the RTF (seeing it from atlantiswordprocessor) I can scroll through the notes, go round but I can not do the same back. The same happens when I try to do from the HTML.

eg

In the beginning of everything, God created <a id="a65"> </ a> {<span <a href="notes.html#a21105"> class="t30"> a </ span>} </ a > heaven and earth.

and note I have :

<a id="a21105"> </ a> a </ span> <span class="t72"> 1.1 </ span> <span class="t73"> created :: ...

I need to know and from the Atlantis I make those notes that have already established link back, or automated the process from the html. Given that approximately 181,000 are footnotes.

PS: Sorry for the English, but I do not know much Latin and English.
Translation: Google translator
sebito is offline   Reply With Quote
Old 04-02-2012, 12:45 PM   #2
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by sebito View Post
I have a serious problem, I am developing epub conversion to a Catholic Bible.

In the beginning of everything, God created <a id="a65"> </ a> {<span <a href="notes.html#a21105"> class="t30"> a </ span>} </ a > heaven and earth.

and note I have :

<a id="a21105"> </ a> a </ span> <span class="t72"> 1.1 </ span> <span class="t73"> created :: ...
Try to remove the blanks after each /
mmat1 is offline   Reply With Quote
Advert
Old 04-02-2012, 12:55 PM   #3
sebito
Junior Member
sebito began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
ok, but that's not the problem, the problem is the creation of links back of 181,000 footnotes. I need an automatic way to do it.
sebito is offline   Reply With Quote
Old 04-02-2012, 01:14 PM   #4
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by sebito View Post
ok, but that's not the problem, the problem is the creation of links back of 181,000 footnotes. I need an automatic way to do it.
First of all: Footnote and Text-Anchor should have the same number. Your code should read:

Code:
In the beginning of everything, God created <a id="a65"> </a> <a href="notes.html#n65"> hyperlinktext</a>

and then note:

<p><a id="n65"></a>Genesis 1.1</p>
In your example, the number of the note is 21105 and the number of the text to jump back is 65. How should a programm guess, that the backreference of 21105 is 65 ???

If the references were build as shown in my example, it would be just a question of a simple regex to build the backlink, but in this case i'm nearly out of ideas .....
mmat1 is offline   Reply With Quote
Old 04-02-2012, 01:21 PM   #5
sebito
Junior Member
sebito began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
it is true what you say, but unfortunately the export of RFT - ePub, the atlantiswordprocessor generates these numbers and I can not control it.
sebito is offline   Reply With Quote
Advert
Old 04-02-2012, 01:25 PM   #6
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by sebito View Post
it is true what you say, but unfortunately the export of RFT - ePub, the atlantiswordprocessor generates these numbers and I can not control it.
Are the footnotes in the same order than the text which refers to them ?
mmat1 is offline   Reply With Quote
Old 04-02-2012, 01:36 PM   #7
sebito
Junior Member
sebito began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
is in order:
a: a = id65 note: 21105
b: b = id66 note: 21106
etc ...
sebito is offline   Reply With Quote
Old 04-02-2012, 02:03 PM   #8
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by sebito View Post
is in order:
a: a = id65 note: 21105
b: b = id66 note: 21106
etc ...
Meanwhile i had some thoughts over it. I do not know a way of correction without writing some code in a programming environment (which is probably quite easy since there is a rule).

Maybe someone else does.

If there is no copyrightviolation, attach the book to your message so that we can have a look on it
mmat1 is offline   Reply With Quote
Old 04-02-2012, 02:12 PM   #9
sebito
Junior Member
sebito began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
ok
Attached Files
File Type: zip try.zip (76.0 KB, 147 views)
sebito is offline   Reply With Quote
Old 04-02-2012, 02:32 PM   #10
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by sebito View Post
ok
I guess i asked for it This will take some time ...
mmat1 is offline   Reply With Quote
Old 04-02-2012, 03:15 PM   #11
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by mmat1 View Post
I guess i asked for it This will take some time ...
Back again

Here you are....

There are still some links broken, i guess i didn't get the full story >(most of the text is missing...)

I did it with sigil and regex only. Are you familiar with sigil ?
Attached Files
File Type: epub Bible.epub (81.8 KB, 155 views)
mmat1 is offline   Reply With Quote
Old 04-02-2012, 03:34 PM   #12
sebito
Junior Member
sebito began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
OMG

You make it sound easy ...

I am familiar with sigil, but do not see the functionality at this time. I and I have tried my epub, in fact both you send HTML, are part of the full epub. Are you used regular expressions after the sigil? Do you applied to HTML?
sebito is offline   Reply With Quote
Old 04-02-2012, 03:52 PM   #13
mmat1
Berti
mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.mmat1 ought to be getting tired of karma fortunes by now.
 
mmat1's Avatar
 
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
Quote:
Originally Posted by sebito View Post
OMG

You make it sound easy ...

I am familiar with sigil, but do not see the functionality at this time. I and I have tried my epub, in fact both you send HTML, are part of the full epub. Are you used regular expressions after the sigil? Do you applied to HTML?
OK, thats in general the strategy
1. I noticed that none of the href-values has a filename, that must be corrected fist. So i merged the 2 files and added a "../Text/015.html" to any "#a\d+?".

2. I split the two files and Sigil corrects the filenames automatically. Some of your links are pointing to an anchor within the same file. Only links which now point to notes.html will be threated in the next steps.

3. I added a "id"-attribute with the same number as the href to any link, which points to "notes.html", preceeding with "t" (within 015.html only).

4. Due to the weird formatting it get's a bit tougher in notes.html. First i replaced "<span class="tpublidisa70">&nbsp;</span>" with "&nbsp;" since i see no point to give a blank a special format and it will make the following regex easier.

5. Regex (in notes.html only)
Code:
Find: <a id="a(\d\d?\d?\d?\d?)(">)</a>(&nbsp;<span class="tpublidisa71">)<a href="../Text/Text.html#a65">(.+?)</a></span>
Replace: <a href="../Text/Text.html#t\1" id="a\1\2\3\4</span></a>
This uses your "<a href="../Text/Text.html#a65">" as endpoint (well in most cases it's just "<a href="">" and tosses it out for good.

done

----------------------------------------------------

Edit: There's no special functiony within Sigil. It's just dividing the job into small steps and usage of regex. It is easy, with a few hundred links. I guess it's still a tedious job with 181000...

Last edited by mmat1; 04-02-2012 at 04:01 PM.
mmat1 is offline   Reply With Quote
Old 04-02-2012, 05:37 PM   #14
sebito
Junior Member
sebito began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
assistance is really rewarding. thank you very much!
sebito is offline   Reply With Quote
Old 04-14-2012, 10:32 AM   #15
ProDigit
Karmaniac
ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.ProDigit ought to be getting tired of karma fortunes by now.
 
Posts: 2,553
Karma: 11499146
Join Date: Oct 2008
Location: Miami FL
Device: PRS-505, Jetbook, + Mini, +Color, Astak Ez Reader Pro, PPW1, Aura H2O
For html edits, I only use notepad++.
Their search and replace functions are far superior to anything out there, equal if not better to MS Office; definitely faster than MS Office (though I find MS Office a lot easier to use).

As far as linking back to the previous link, normally most readers have a back button.
But if not, it's going to be quite some work! It might be easier linking those footnotes back to a chapter or something.
ProDigit is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
1,000,000+ Cyanogen devices afv011 News 25 01-14-2012 03:05 PM
'The Help': 1,000,000 copy seller on Kindle RockdaMan News 61 08-23-2011 03:38 PM
Race to 1,000,000...pages read... snipenekkid General Discussions 16 03-05-2011 02:36 PM
2,000,000 free e-books from the 4th Annual World eBook Fair Sonist Deals and Resources (No Self-Promotion or Affiliate Links) 4 07-15-2009 11:31 PM
4,000 e-book uploads? Yup, 4,000 uploads! Alexander Turcic Announcements 17 03-01-2008 04:20 AM


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


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