Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 08-04-2014, 01:13 PM   #1
mauropiccolo
Member
mauropiccolo began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Sep 2013
Device: kindle
Django doc recipe ( need some tip )

Hi,
I wrote this recipe for read django documentation on my kindle.
( I like kindle news menu )
There is a better solution ? ( es not news recupe but something else?)

I like to manage "internal" link , so I need convert url like
<a class="reference internal" href="../../ref/contrib/admin/#django.contrib.admin.ModelAdmin.fieldsets" ......</a>

to something like
<a class="reference internal" href="/feed_1/article_15/index.xhtml#django.contrib.admin.ModelAdmin.fields ets" ......</a>

1) there is already some function to do this ?
2) if not, where is the right place ( method name ) where:
- record download_url -> feed/article
- parse and substitute url
3) which is the correct format of new url ?

in the meantime I can try to fix errors like:
Referenced file u'/tmp/calibre_1.47.0_tmp_u8U8s8/pylBRj_plumber/feed_3/article_4/index.xhtml' not found
that seems correlated.

Hope You can understand regardless my bad english.

Regards, Mauro
Attached Files
File Type: zip django.recipe_1.zip (1.3 KB, 133 views)
mauropiccolo is offline   Reply With Quote
Old 08-05-2014, 12:21 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,363
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The recipe system automatically rewrites any link that it follows and downloads. You need to use recursions and is_link_wanted() in your recipe to control which links are followed.
kovidgoyal is offline   Reply With Quote
Advert
Old 08-05-2014, 11:58 AM   #3
mauropiccolo
Member
mauropiccolo began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Sep 2013
Device: kindle
Thanks for response, but may be I need furter help.

here new recipe, with recursions and is_link_wanted() , but still link are not converted.

See the log, may be there is a bug in rewriting.

"Referenced file u'/tmp/calibre_1.47.0_tmp_HTY8tN/ZCDmzW_plumber/feed_4/article_79/index.xhtml' not found "

Calibre version 1.47 on ubuntu 14.04

Regards, Mauro

If it can help, pages are not downloaded because the link to follow,
but each page is like an article,
so must link to the right article.
Attached Files
File Type: zip django.recipe_2.zip (1.5 KB, 134 views)
File Type: zip django.log.zip (4.8 KB, 134 views)

Last edited by mauropiccolo; 08-05-2014 at 12:04 PM.
mauropiccolo is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


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


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