Register Guidelines E-Books Today's Posts Search

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

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 04-19-2010, 08:51 AM   #1801
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by kiklop74 View Post
I would do this (add it to your recipe):

Code:
    extra_css = ' .boxocchiello2{font-size: small} .titoloRub{font-size: xx-large; font-weight: bold } .sezione{font-weight: bold} '

    conversion_options = {'linearize_tables':True}

    remove_attributes = ['colspan']

    keep_only_tags = [dict(attrs={'class':['boxocchiello2','titoloRub','sezione','articologirata']})]
Thanks, looks great now!

Last edited by gambarini; 04-19-2010 at 08:59 AM.
gambarini is offline  
Old 04-19-2010, 08:58 AM   #1802
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
With this feed
http://www.ilgiornale.it/?RSS=S
i must use
<code>
def get_article_url(self, article):
return article.get('guid', article.get('id', None))
</>
because it is a feedsportal.
But there is a problem:
with this article (and some other like this...)
http://www.ilgiornale.it/interni/rom...e=0-comments=1
the print link is the same, it's necessary only to replace "articolo-id" with "articolostampa-id"


i think that is necessary to use the print link, because when the article is divided into multiple page, it is impossible to read all the page.

the get_article_url return a link like
http://www.ilgiornale.it/a.pic1?ID=438656
but i am not able to find the print link...
gambarini is offline  
Advert
Old 04-19-2010, 11:37 AM   #1803
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by gambarini View Post
i think that is necessary to use the print link, because when the article is divided into multiple page, it is impossible to read all the page.
FYI, if you can't find a print link, you may need to handle multiple pages in the recipe. Many of the built-in recipes handle multiple pages. I believe the adventuregamers recipe has an example.
Starson17 is offline  
Old 04-19-2010, 12:58 PM   #1804
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by Starson17 View Post
FYI, if you can't find a print link, you may need to handle multiple pages in the recipe. Many of the built-in recipes handle multiple pages. I believe the adventuregamers recipe has an example.
uhm sounds good, i thake a look immediately.
gambarini is offline  
Old 04-19-2010, 01:29 PM   #1805
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by gambarini View Post
uhm sounds good, i thake a look immediately.
Multipage is fairly advanced. You want to keep it as simple as possible. The usual advice is to use the print version, where possible, but it's not always possible. Learning to handle multiple pages will give you great control over your recipes.
Starson17 is offline  
Advert
Old 04-19-2010, 02:37 PM   #1806
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by Starson17 View Post
FYI, if you can't find a print link, you may need to handle multiple pages in the recipe. Many of the built-in recipes handle multiple pages. I believe the adventuregamers recipe has an example.
i am not able to find the print link; there is a print link in the html, but there isn't any tag near the print link, or i am not able to find it...
gambarini is offline  
Old 04-19-2010, 02:38 PM   #1807
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Quote:
Originally Posted by Starson17 View Post
Multipage is fairly advanced. You want to keep it as simple as possible. The usual advice is to use the print version, where possible, but it's not always possible. Learning to handle multiple pages will give you great control over your recipes.
Yes, it is a powerful solution... but not simple.
gambarini is offline  
Old 04-19-2010, 03:05 PM   #1808
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by gambarini View Post
Yes, it is a powerful solution... but not simple.
Agreed. Once you understand BeautifulSoup and pre and post processing of html, you can do almost anything with a page. During the Olympics I used it to parse a Flash-based slideshow of photos. The Flash code on page 1 included a URL that pointed to XML data elsewhere on the web. BeautifulSoup let me extract the address for that data from the scripting on page 1. The XML data had pointers to photo images, with titles and comments for each photo for the Flash code to use. BeautifulSoup then let me extract the XML data and build a custom virtual page with each photo being labeled and having a comment. That custom page, despite not really existing anywhere, was passed to Calibre's recipe handler to build the EPUB.

Basically, BeautifulSoup will let you remove elements, swap or add elements, find elements, construct new pages, etc. IIRC, multipage recipes grab article text from subsequent pages and paste it into the first page before the first page gets processed by the recipe.

Last edited by Starson17; 04-19-2010 at 03:08 PM.
Starson17 is offline  
Old 04-19-2010, 03:16 PM   #1809
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by gambarini View Post
i think that is necessary to use the print link, because when the article is divided into multiple page, it is impossible to read all the page.

the get_article_url return a link like
http://www.ilgiornale.it/a.pic1?ID=438656
but i am not able to find the print link...
That page sends you to another page:
Code:
http://www.ilgiornale.it/interni/romiti_il_corriere_non_volevo_e_stato_bazoli_fare_tutto/18-04-2010/articolo-id=438656-page=0-comments=1
I see a print link on that page at:
Code:
http://www.ilgiornale.it/interni/romiti_il_corriere_non_volevo_e_stato_bazoli_fare_tutto/18-04-2010/articolostampa-id=438656-page=1-comments=1
Starson17 is offline  
Old 04-19-2010, 10:55 PM   #1810
dhiru
Connoisseur
dhiru began at the beginning.
 
Posts: 83
Karma: 10
Join Date: Aug 2009
Device: iphone, Irex iliad, sony prs950, kindle Dx, Ipad
Hindustan Times Recipe(India)
Attached Files
File Type: txt HT.txt (2.6 KB, 150 views)
dhiru is offline  
Old 04-19-2010, 11:40 PM   #1811
lenik
Junior Member
lenik began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Apr 2010
Device: prs-505
calibre 0.6.13/ubuntu 9.10. When I download news, they come not as one file for one source, but about maybe 10 files of approximately same size and almost same content for every source feed I use.

Is there any way to receive just a single file for every source feed?
lenik is offline  
Old 04-20-2010, 01:50 AM   #1812
PaxtonReader
Member
PaxtonReader began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Apr 2010
Device: Kindle 2 Global
A Wikipedia-to-Kindle program exists - go to http://www.edukindle.com/downloads/kindlepedia/ - this site creates a very nicely formatted Kindle book from an entered Wikipedia URL.
PaxtonReader is offline  
Old 04-20-2010, 08:00 AM   #1813
vietchovui
Zealot
vietchovui will become famous soon enoughvietchovui will become famous soon enoughvietchovui will become famous soon enoughvietchovui will become famous soon enoughvietchovui will become famous soon enoughvietchovui will become famous soon enough
 
Posts: 109
Karma: 556
Join Date: Nov 2009
Location: SaiGon VietNam
Device: PRS T1, Kobo Forma 8G, Kobo Libra H2O
Quote:
Originally Posted by kiklop74 View Post
This looks like a tough one. I hate sites that use feedsportal...
Please help me to create a recipe for The Saigontimes Online. This is a very good business info site in Vietnamese. I've tried many times to embed Gentium font type in the fetched epub file but I still have problem with unicode font in Vietnamese. ??? display instead of correct words.

Here is the RSS link: http://www.thesaigontimes.vn/rss/
Any help will be appreciated!
https://www.mobileread.com/forums/ima...t/thankyou.gif
vietchovui is offline  
Old 04-20-2010, 08:27 AM   #1814
Ricchione
Junior Member
Ricchione began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2010
Device: Kindle
Post Tagesspiegel recipe?

Hi there,

Could someone help me with a recipe for the website http://www.tagesspiegel.de

Thanks a lot.

Best,
Ricchione
Ricchione is offline  
Old 04-20-2010, 08:33 AM   #1815
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
New recipe for Vurtual Shackles comic:
Attached Files
File Type: zip virtual_shackles.zip (1.8 KB, 153 views)
kiklop74 is offline  
Closed Thread


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom column read ? pchrist7 Calibre 2 10-04-2010 02:52 AM
Archive for custom screensavers sleeplessdave Amazon Kindle 1 07-07-2010 12:33 PM
How to back up preferences and custom recipes? greenapple Calibre 3 03-29-2010 05:08 AM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 04:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 02:37 PM


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


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