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 07-15-2012, 01:26 AM   #1
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Merging recipes?

Is it possible to merge several recipes and let them produce one single book? Say, I have a recipe downloading BBC Asia News, and then one NYT Asia News. What I want is an output that has two sections (one BBC Asia and one NYT Asia) rather than two books.

Of course, the obvious choice might be to copy and paste the two recipes and make it a single one. But it's not like you're downloading from, BBC Asia and BBC UK when, because all the contents come from the same website, it's pretty easy. The problem that may occur when simply "combining" the two recipes is that different websites are designed differently. For example, BBC may have the titile in h1 (h2 for byline), while NYT may have it in h2 (h3 for byline). In two separate recipes, I can set font size h1 of BBC and h2 of NTY to large. But when combining them it seems impossible.

So is there a way to merge several recipes and let them produce a book that take each single recipe as a section while maintaining the remove tags or extra css setting for each recipe?

If this is out of the question, can I merge the outputs after downloading? (That is, make a new book out of existing books, taking each book as a section of the new book and the book titles, as section titles.)
Steven630 is offline   Reply With Quote
Old 07-22-2012, 09:54 PM   #2
eagleoneraptor
Banned
eagleoneraptor began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2012
Device: Kindle Touch
I have the same question here. In my case I want to have Phoronix and Genbeta in the same file in my Kindle.

Phoronix has poor embed content and its recipe need to download the original article and pre-process the HTML.
Genbeta has the entire article on the RSS file.

But obviously, I can not apply different behaviours on the feeds in the same recipe.

Maybe a solution is creating a base recipe that has a property that contains a list of recipe objects and override the corresponding methods (I'm not sure which are) to "execute" the list of recipes and generate an index resulting of recipes merging.

So this class can be used to create custom recipes with "subrecipes collection".

How implementable is that?
eagleoneraptor is offline   Reply With Quote
Old 07-23-2012, 07:26 AM   #3
Krittika Goyal
Vox calibre
Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.
 
Krittika Goyal's Avatar
 
Posts: 367
Karma: 228180
Join Date: Jan 2009
Device: Sony reader prs700, kobo
You can use autocleanup for this. See if the following blog article helps. It shows how to create a recipe of the politics section from different news sources. http://blog.calibre-ebook.com/2011/1...-fetching.html see section called autocleanup.
Krittika Goyal is offline   Reply With Quote
Old 07-23-2012, 08:01 AM   #4
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Quote:
Originally Posted by Krittika Goyal View Post
You can use autocleanup for this. See if the following blog article helps. It shows how to create a recipe of the politics section from different news sources. http://blog.calibre-ebook.com/2011/1...-fetching.html see section called autocleanup.
Autocleanup doesn't do a good job in most of the recipes. (or at least, custom made recipes are much better). Is there a way to merge two recipes without sacrificing tailor-made cleanups for each recipe?
Steven630 is offline   Reply With Quote
Old 07-23-2012, 09:51 AM   #5
Krittika Goyal
Vox calibre
Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.Krittika Goyal ought to be getting tired of karma fortunes by now.
 
Krittika Goyal's Avatar
 
Posts: 367
Karma: 228180
Join Date: Jan 2009
Device: Sony reader prs700, kobo
Quote:
Originally Posted by Steven630 View Post
Autocleanup doesn't do a good job in most of the recipes. (or at least, custom made recipes are much better). Is there a way to merge two recipes without sacrificing tailor-made cleanups for each recipe?
This is not true in my experience. I have written about 20 or so recipes using auto clean up and it does very well. It even removes crap i may have missed out. On the rare occasion it removes too much you can use "auto_cleanup_keep" that is also discussed in the blog post. Anyway, sorry but I at least do not know of any other convenient way. The other advantage of using auto clean up is that the recipe does not break with with minor redesigning of the website.
Krittika Goyal is offline   Reply With Quote
Old 07-23-2012, 10:18 AM   #6
Steven630
Zealot
Steven630 began at the beginning.
 
Posts: 142
Karma: 10
Join Date: May 2012
Device: Kindle Paperwhite2
Quote:
Originally Posted by Krittika Goyal View Post
This is not true in my experience. I have written about 20 or so recipes using auto clean up and it does very well. It even removes crap i may have missed out. On the rare occasion it removes too much you can use "auto_cleanup_keep" that is also discussed in the blog post. Anyway, sorry but I at least do not know of any other convenient way. The other advantage of using auto clean up is that the recipe does not break with with minor redesigning of the website.
Well, I wrote recipes myself exactly because the auto cleanup returned an unsatisfactory result (like, related links not moved, ads included etc). Merging recipes is not possible, it seems. If only Calibre could add a new feature, allowing user to do so. This wouldn't be too hard, considering that all the recipes are ready-made. It's basically downloading two recipes at the same time and combine the results.

Is is possible, then, to merge two books already downloaded? (And make each book a section of the new book) .

Last edited by Steven630; 07-23-2012 at 10:22 AM.
Steven630 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging on Calibre ToxicMart Library Management 2 11-12-2011 10:31 PM
merging libraries glnagrom Library Management 1 02-21-2011 01:17 AM
Merging ebooks jmjacobs Library Management 7 01-29-2011 08:01 AM
The merging software yingwu iRex 6 06-22-2009 02:05 PM
help: merging scarlett_yan iRex 5 09-22-2007 05:18 PM


All times are GMT -4. The time now is 04:24 AM.


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