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 06-11-2010, 09:13 PM   #2086
capidamonte
Not who you think I am...
capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.capidamonte can even cheer up an android equipped with a defective Genuine Personality Prototype.
 
capidamonte's Avatar
 
Posts: 374
Karma: 30283
Join Date: Jan 2010
Location: Honolulu
Device: PocketBook 360 -- Ivory
Quote:
Originally Posted by kiklop74 View Post
The updated recipes for these will be part of the next calibre release.
Thanks!

cap
capidamonte is offline  
Old 06-11-2010, 10:24 PM   #2087
HaoleKai
Enthusiast
HaoleKai began at the beginning.
 
Posts: 28
Karma: 14
Join Date: Jun 2010
Device: Kindle
Quote:
Originally Posted by kiklop74 View Post
The updated recipes for these will be part of the next calibre release.
mahalo nui loa!
(thank you very much!)
HaoleKai is offline  
Old 06-12-2010, 03:23 AM   #2088
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Revised Recipe

libero-news.it

Better viewing
Attached Files
File Type: zip libero.zip (938 Bytes, 261 views)
gambarini is offline  
Old 06-12-2010, 11:43 AM   #2089
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
Take a look at this feed:
http://www.auto.it/rss/prove+6.xml

Every link in the feed is about the first "tablet" of the entire article; the others tablets are about others arguments regarding the same "car". The link for all tablets into the same article change only in one part, and always in the same way for every other article (about others cars).

So an example:
is there the possibility to add the others tablets to the link of the feeds?
One option is to create an epub only for this feed, and use every link of the feed like a feed (a section title), and automatic create the details of the feed with all the links regarding tablet of the same article.

Is it correct?

Last edited by gambarini; 06-12-2010 at 11:49 AM.
gambarini is offline  
Old 06-12-2010, 12:35 PM   #2090
Daanish87
Member
Daanish87 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jun 2010
Device: none
Quote:
Originally Posted by kiklop74 View Post
What is wrong with the existing Globe and mail recipe?
Im an idiot please ignore my posts regarding the globe and mail. I didn't even notice the built in recipes. I modified the existing one just to get my desired feeds and it works perfectly.
Daanish87 is offline  
Old 06-12-2010, 12:58 PM   #2091
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
Take a look at this feed:
http://www.auto.it/rss/prove+6.xml
I looked. First, let me fix your English. It's far, far better than my Italian, but you used the word "tablet" and it took me a while to figure out you were asking about "tabs" on the article links that the feed sent you to.

Quote:
Every link in the feed links you to the first "tab" on an article page that has additional tabs; the additional tabs are about the same "car". The link for all tabs for each car on the first page/tab change only in one part, and always in the same way for every other article (about other cars).
The above revised phrasing would be a bit more clear, in case others want to pitch in. Basically, there is a single feed for multiple articles, each article being about a single car. The link takes you to a first page, and that page has additional tabs, each one being created the same way, so if you know the article link for a car, you can figure out the links to the other tabs for that car.

Quote:
is there the possibility to add the others tabs to the link of the feeds?
One option is to create an epub only for this feed, and use every link of the feed like a feed (a section title), and automatic create the details of the feed with all the links regarding tabs of the same article.

Is it correct?
Yes, you could do it that way, and I think it makes the most sense. You could scrape the RSS feed as a web page with parse_index. You would build a separate feed for each car, then build the article links for each car feed from the known way that the links for the tabs are created.

Another way would be to try to just allow recursion to the deeper tab links on each page. You might have to modify the page to get access to the links. This would give you a single feed, with a link to each car, and your reader would then link from the first page to the next pages.

A third way would be to use preprocess_html and the soup to grab the tab links and add them to each page - the way multipage is done.
Starson17 is offline  
Old 06-13-2010, 05:35 AM   #2092
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
I have created the collection of articles, but i don't understand how merge this collection to the other parsed feed.
gambarini is offline  
Old 06-13-2010, 07:47 AM   #2093
lordvetinari2
Zealot
lordvetinari2 is on a distinguished road
 
Posts: 137
Karma: 61
Join Date: Jun 2006
Location: Gijón, Spain
Device: Kindle 3G+WiFi & Galaxy Note
Hello,

I am trying to create a new recipe for Publico PT, because the bundled one does not work any more. I tried fixing it, but there was a regexp there that I do not understand. So I tried creating my own from scratch, and it mostly works, but I have a few problems.

The main problem is that certain parts of the website work differently, for some reason. Now, my recipe is checking for certain tags to remove unnecessary items (menus, icons, etc), and not every section uses the same tags. For instance, "http://economia.publico.pt/Noticia/g...e-2013_1441633" has the main article inside a div id="content", but the article "http://desporto.publico.pt/noticia.aspx?id=1441651" has a the main article inside a div class="containerMain". As my recipe stands now, when it does not find the tag defined under "keep_only_tags", it just returns an empty page. Is there any way to say, "check for this tag and if it's not there, check for the other one instead"?

I tried using the print_version method, but another problem is that not every article from the RSS feed has the same URI structure. As you can see in the example above, sometimes they use the full title for the URI and sometimes they use a number reference. Additionally, the print ("Imprimir" in Portuguese) mechanism for article URIs such as "http://desporto.publico.pt/noticia.aspx?id=1441651", fails miserably in the browser, while the one for "http://economia.publico.pt/Noticia/g...e-2013_1441633" just prints the current URI as it is displayed, without getting rid of unnecessary formatting.

Please find attached a calibre log and the recipe as it currently stands. If an operator gives me permission, I can also upload the epub file with the daily news as retrieved with my recipe.

I hope I can get some insight on this. Thanks in advance!
Attached Files
File Type: zip calibre_log--publico_recipe.zip (17.9 KB, 274 views)
lordvetinari2 is offline  
Old 06-13-2010, 08:51 AM   #2094
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 have created the collection of articles, but i don't understand how merge this collection to the other parsed feed.
AFAIK, you can't (at least not easily). You either build the entire set of feeds and associated articles, with parse_index (not merge) or you use the parsed feed/articles it builds, and modify the pages it fetches (by adding/allowing links or by using the multipage type method). Those are the three methods referred to above that I can think of.

Last edited by Starson17; 06-13-2010 at 09:03 AM.
Starson17 is offline  
Old 06-13-2010, 09:01 AM   #2095
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 lordvetinari2 View Post
I am trying to create a new recipe for Publico PT, because the bundled one does not work any more. I tried fixing it, but there was a regexp there that I do not understand.
It might be easier to just figure out this regex.

Quote:
So I tried creating my own from scratch, and it mostly works, but I have a few problems.

The main problem is that certain parts of the website work differently, for some reason. Now, my recipe is checking for certain tags to remove unnecessary items (menus, icons, etc), and not every section uses the same tags. For instance, "http://economia.publico.pt/Noticia/g...e-2013_1441633" has the main article inside a div id="content", but the article "http://desporto.publico.pt/noticia.aspx?id=1441651" has a the main article inside a div class="containerMain". As my recipe stands now, when it does not find the tag defined under "keep_only_tags", it just returns an empty page. Is there any way to say, "check for this tag and if it's not there, check for the other one instead"?
Yes - sort of, but why not just keep both tags instead of making it conditional? It should work just as well, unless both tags are used on the same page.

Last edited by Starson17; 06-13-2010 at 09:05 AM.
Starson17 is offline  
Old 06-14-2010, 02:37 AM   #2096
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
AFAIK, you can't (at least not easily). You either build the entire set of feeds and associated articles, with parse_index (not merge) or you use the parsed feed/articles it builds, and modify the pages it fetches (by adding/allowing links or by using the multipage type method). Those are the three methods referred to above that I can think of.
Yes, my eng isn't so good...
I can print the article tuple in debug, and the feed that i have created seems correct,
so these are my next steps:
1°) create the epub with only this feed
2°) create all other feeds (it could be only a simple "append" of the standard tag "title", "link", "description", "date" and so on), using the same "parse_index" used for the step one, for add (not merge ) all others feed.

It is also a good solution, i think, for my previous (and not yet solved) problem with the "la_stampa" recipe (There is two or three feeds without the title for every article).
gambarini is offline  
Old 06-14-2010, 07:55 AM   #2097
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, my eng isn't so good...
It's better than my Italian
Quote:
I can print the article tuple in debug, and the feed that i have created seems correct,
so these are my next steps:
1°) create the epub with only this feed
2°) create all other feeds (it could be only a simple "append" of the standard tag "title", "link", "description", "date" and so on), using the same "parse_index" used for the step one, for add (not merge ) all others feed.

It is also a good solution, i think, for my previous (and not yet solved) problem with the "la_stampa" recipe (There is two or three feeds without the title for every article).
Yes.
Starson17 is offline  
Old 06-14-2010, 04:49 PM   #2098
gambarini
Connoisseur
gambarini began at the beginning.
 
Posts: 98
Karma: 22
Join Date: Mar 2010
Device: IRiver Story, Ipod Touch, Android SmartPhone
new recipes

Recipe for
corrieredellosport (sport daily newspaper)
auto & autosprint (formula 1 and car news)
Attached Files
File Type: zip corriereauto.zip (1.9 KB, 275 views)
gambarini is offline  
Old 06-14-2010, 08:52 PM   #2099
flyash
Groupie
flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.flyash ought to be getting tired of karma fortunes by now.
 
Posts: 196
Karma: 1003498
Join Date: Jun 2010
Device: none
I am using Calibre to fetch updates to the following blog: http://www.bodyrecomposition.com/feed/rss.

But the width of the resulting ebook is greater than my Sony 600 screen, so the right edge of the page is chopped off. Is there a way to modify the recipe to correct this?
flyash is offline  
Old 06-15-2010, 08:52 AM   #2100
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,399
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use

conversion_options = {'linearize_tables':True}
kovidgoyal 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 01:03 AM.


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