11-26-2013, 04:22 PM | #1 |
Zealot
Posts: 115
Karma: 20
Join Date: Jul 2010
Device: Kindle3 3G, Kindle Paperwhite 2
|
How to insert links between articles?
Hi,
I would like to introduce links between articles of a periodical. My idea was to introduce an anchor in front of every article title: Code:
<a name="anchor"><\a><title>Whatever<\title> Code:
<a href="#anchor">Link</a> To my understanding all the articles are flattened into the same mobi file. So these types of links should work right? Are there any other ways of doing this? Thanks, Jens |
11-26-2013, 09:35 PM | #2 |
creator of calibre
Posts: 43,964
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You cant do that, you need to include the file name as well. However, doing so is not trivial, since articles are downloaded asynchrously so you dont know what filename an article will have in advance.
What you should do is use a uuid as the anchor and then implement postprocess_book to insert the links. |
Advert | |
|
11-27-2013, 04:34 AM | #3 |
Zealot
Posts: 115
Karma: 20
Join Date: Jul 2010
Device: Kindle3 3G, Kindle Paperwhite 2
|
Thanks for the fast reply!
Do you have any more detailed documentation about postprocess_book? I get an oeb object in that function. How can I explore this object, extract the filenames and access the html code inside them. Sounds like an elegant solution. However, if everything fails I can still predict the feednumbers and filenames if I only allow a singe download at a time, right? Thanks, Jens |
11-27-2013, 04:37 AM | #4 |
creator of calibre
Posts: 43,964
Karma: 22669822
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There is no documentation, but thge oeb object is the same as that used throughout the calibre conversion pipeline. If you just search the calibre code for postprocess_book, you will see some examples.
Yes, restricting to a single thread should yield predictable filenames. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
0.6 best way to insert hyperlinks?? | phossler | Sigil | 16 | 11-21-2012 09:36 AM |
Insert a Picture? | MickeyC | Feedback | 6 | 06-13-2011 12:39 PM |
Insert Hyperlinks in Feed Articles | Bushwil | Recipes | 1 | 01-21-2011 02:51 PM |
Links to URLs work, internal links don't? | NewDay | ePub | 36 | 10-27-2010 04:09 AM |
Insert metadata | Landrovan | Calibre | 1 | 10-05-2009 01:36 PM |