04-02-2012, 11:58 AM | #1 |
Junior Member
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 |
04-02-2012, 12:45 PM | #2 | |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
|
|
Advert | |
|
04-02-2012, 12:55 PM | #3 |
Junior Member
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.
|
04-02-2012, 01:14 PM | #4 | |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
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> 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 ..... |
|
04-02-2012, 01:21 PM | #5 |
Junior Member
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.
|
Advert | |
|
04-02-2012, 01:25 PM | #6 |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
|
04-02-2012, 01:36 PM | #7 |
Junior Member
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
|
is in order:
a: a = id65 note: 21105 b: b = id66 note: 21106 etc ... |
04-02-2012, 02:03 PM | #8 | |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
Maybe someone else does. If there is no copyrightviolation, attach the book to your message so that we can have a look on it |
|
04-02-2012, 02:12 PM | #9 |
Junior Member
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
|
ok
|
04-02-2012, 02:32 PM | #10 |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
|
04-02-2012, 03:15 PM | #11 |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
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 ? |
04-02-2012, 03:34 PM | #12 |
Junior Member
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? |
04-02-2012, 03:52 PM | #13 | |
Berti
Posts: 1,196
Karma: 4985964
Join Date: Jan 2012
Location: Zischebattem
Device: Acer Lumiread
|
Quote:
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"> </span>" with " " 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>( <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> 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. |
|
04-02-2012, 05:37 PM | #14 |
Junior Member
Posts: 7
Karma: 10
Join Date: Apr 2012
Device: ipad
|
assistance is really rewarding. thank you very much!
|
04-14-2012, 10:32 AM | #15 |
Karmaniac
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. |
|
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 |