![]() |
#1 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Aug 2011
Device: Amazon Kindle 3
|
How to force calibre to download images?
Hello. I made recipe for page which uses flash player to display images (cgm.pl). In preprocess_html function I extract image ID from flash tag and replace it with image tag. Problem is that that images aren't downloaded. I meant they aren't downloaded to file. When I open it calibre ebook viewer download all photos to memory. How to force calibre to download those images to file? Thanks for help!
preprocess_html function Spoiler:
flash tag Spoiler:
|
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That should work just fine. The news download system looks for images to download after preprocess has run. Look in the log to see why the images are not downloading. Also rather than using replaceWith just set
img.name = 'img' img['src'] = 'whatever' |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() Posts: 34
Karma: 10
Join Date: Aug 2011
Device: Amazon Kindle 3
|
Thanks. That works.
I looked at log and when I used replaceWith() function calibre didn't know that it must fetch those images. Same thing when I did insert Code:
sometag.insert(pos, '<img src="link" />') |
![]() |
![]() |
![]() |
#4 |
Old Linux User
![]() Posts: 36
Karma: 12
Join Date: Jan 2012
Device: NST
|
![]()
Thanks for this post.
This is how I achived the same. You can see I used the same trick to make article title better standing out. Spoiler:
|
![]() |
![]() |
![]() |
#5 | |
Old Linux User
![]() Posts: 36
Karma: 12
Join Date: Jan 2012
Device: NST
|
![]() Quote:
After fetching all the images using the above code, they all become inline with the text. I would like to put a new line between an image and the text before/after. Tried couple of techniques including Tag(soup,'br /') and tag.insert but all ended up eliminating the image all together in the final file. I also attached the example epub that shows the behavior I am referring to. Spoiler:
Any idea? Last edited by kiavash; 02-09-2012 at 05:59 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
img['style'] = 'display:block'
|
![]() |
![]() |
![]() |
#7 |
Old Linux User
![]() Posts: 36
Karma: 12
Join Date: Jan 2012
Device: NST
|
Perfect! thanks!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Force Calibre to make one Job at a time? | JayKindle | Calibre | 2 | 09-11-2011 04:05 PM |
Force Download | face | Nook Color & Nook Tablet | 11 | 01-16-2011 06:10 AM |
Force Sony Reader Library to re-download all my books? | stodge | Sony Reader | 4 | 11-13-2010 03:45 PM |
How do I force Calibre to request format change on PDF | lunixer | Calibre | 6 | 08-11-2010 01:00 PM |
How can I force Calibre to use a certain format for conversion? | Sydney's Mom | Calibre | 5 | 02-01-2010 11:43 AM |