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-09-2010, 09:49 PM   #2071
rty
Zealot
rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.
 
Posts: 108
Karma: 6066
Join Date: Apr 2010
Location: Singapore
Device: iPad Air, Kindle DXG, Kindle Paperwhite
Quote:
Originally Posted by Starson17 View Post
If you want help on multipage, search in this thread, then feel free to ask. Learning to do a multipage recipe is lots of fun. Print article methods are easier, but you learn less. Start here for multipage.
Thank you very much Starson17. I am looking forward to contribute more once I know how to do the Multipage recipe. Again thanks.
rty is offline  
Old 06-09-2010, 11:41 PM   #2072
taliesin1077
Junior Member
taliesin1077 began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2010
Device: Kindle
Quote:
Originally Posted by Starson17 View Post
If you want help on multipage, search in this thread, then feel free to ask. Learning to do a multipage recipe is lots of fun. Print article methods are easier, but you learn less. Start here for multipage.
The MaxPC articles look GREAT.

Multipage would also benefit the built-in Christian Science Monitor recipe.
taliesin1077 is offline  
Old 06-10-2010, 08:41 PM   #2073
HaoleKai
Enthusiast
HaoleKai began at the beginning.
 
Posts: 28
Karma: 14
Join Date: Jun 2010
Device: Kindle
As capidamonte requested, I too would appreciate if/when someone has the time to write a recipe for the newly merged Honolulu Star-Advertiser (I'm gonna miss the Advertiser)

http://www.staradvertiser.com./rss/


Also, the Boston Globe (Boston) recipe hasn't really worked in the last month or so (since I first started using it). Sometimes it pulls a couple of stories but most of the time it pulls nothing.

Thanks!
HaoleKai is offline  
Old 06-11-2010, 02:07 AM   #2074
Daanish87
Member
Daanish87 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jun 2010
Device: none
Hi guys, I would really appreciate if I could get a custom recipe for the globe and mail business section without all the extra pictures and icons and crazy stuff... just plain text would be great:

http://www.theglobeandmail.com/repor...s/?service=rss

And the Investment executive (same without the noise, just the text):

http://www.investmentexecutive.com/f...eakingnews.xml

If someone could, I'd also like some help as to how to do these myself. I'm completely new to programming so I know basically zero. Some good resources would be appreciated.

Last edited by Daanish87; 06-11-2010 at 03:00 AM.
Daanish87 is offline  
Old 06-11-2010, 08:53 AM   #2075
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 Daanish87 View Post
Hi guys, I would really appreciate if I could get a custom recipe for the globe and mail business section without all the extra pictures and icons and crazy stuff... just plain text would be great:

http://www.theglobeandmail.com/repor...s/?service=rss

And the Investment executive (same without the noise, just the text):

http://www.investmentexecutive.com/f...eakingnews.xml

If someone could, I'd also like some help as to how to do these myself. I'm completely new to programming so I know basically zero. Some good resources would be appreciated.
You can start here:
http://calibre-ebook.com/user_manual...asicnewsrecipe

It looks like you already have the meat of your recipe, but want to get rid of "extra pictures and icons and crazy stuff." There are 2 ways to do it. First, you can try the print_version method. See the link, but basically it means substituting a link to a clean version for your messy version. You have to find that link yourself on the site. The other is to clean up or avoid the "crazy stuff."

I suggest you use FireFox and Firebug to identify what you want to remove or keep, then use keep_only_tags or remove_tags to either get only what you want, or remove the junk. Have fun and feel free to ask here for help.
Starson17 is offline  
Old 06-11-2010, 02:58 PM   #2076
Daanish87
Member
Daanish87 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jun 2010
Device: none
Quote:
Originally Posted by Starson17 View Post
You can start here:
http://calibre-ebook.com/user_manual...asicnewsrecipe

It looks like you already have the meat of your recipe, but want to get rid of "extra pictures and icons and crazy stuff." There are 2 ways to do it. First, you can try the print_version method. See the link, but basically it means substituting a link to a clean version for your messy version. You have to find that link yourself on the site. The other is to clean up or avoid the "crazy stuff."

I suggest you use FireFox and Firebug to identify what you want to remove or keep, then use keep_only_tags or remove_tags to either get only what you want, or remove the junk. Have fun and feel free to ask here for help.
Hi Starson, thanks for the reply. I actually wanted to try the print edition way, but here is where I got stuck. So for example, with investment executive:

The normal URL is:

http: // www .investmentexecutive.com/client/en/News/DetailNews.asp?id=53928&IdSection=146&cat=146&BIma geCI=1

The print is:

http: // www. investmentexecutive.com/client/en/News/ImprimerDetail.asp?id=53928&IdSection=146&cat=146& BImageCI=1

The URLs are nearly identical. I tried messing around with it but it keeps giving me the same output. Would you be able to guide me as to what I should put for the replacement when writing the code? Thanks
Daanish87 is offline  
Old 06-11-2010, 03:40 PM   #2077
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 Daanish87 View Post
I actually wanted to try the print edition way, but here is where I got stuck. The URLs are nearly identical. I tried messing around with it but it keeps giving me the same output. Would you be able to guide me as to what I should put for the replacement when writing the code?
You want to replace DetailNews with ImprimerDetail.

Try this (No guarantees - I don't have anywhere to test it right now):
Code:
    def print_version(self, url):
        return url.replace('http://www.investmentexecutive.com/client/en/News/DetailNews', 'http://www.investmentexecutive.com/client/en/News/ImprimerDetail')
Starson17 is offline  
Old 06-11-2010, 04:25 PM   #2078
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
Quote:
Originally Posted by HaoleKai View Post
As capidamonte requested, I too would appreciate if/when someone has the time to write a recipe for the newly merged Honolulu Star-Advertiser (I'm gonna miss the Advertiser)

http://www.staradvertiser.com./rss/


Also, the Boston Globe (Boston) recipe hasn't really worked in the last month or so (since I first started using it). Sometimes it pulls a couple of stories but most of the time it pulls nothing.

Thanks!
The updated recipes for these will be part of the next calibre release.
kiklop74 is offline  
Old 06-11-2010, 04:27 PM   #2079
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
Quote:
Originally Posted by Daanish87 View Post
Hi guys, I would really appreciate if I could get a custom recipe for the globe and mail business section without all the extra pictures and icons and crazy stuff... just plain text would be great:

http://www.theglobeandmail.com/repor...s/?service=rss
What is wrong with the existing Globe and mail recipe?
kiklop74 is offline  
Old 06-11-2010, 04:57 PM   #2080
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?
There are alot of pictures and other things which cause the reader to be really slow. However, I countered this by converting the .epub to pdf, and now its smooth. So maybe I dont need to really refine it much.

With Investment executive, the writing becomes condensed into one side, and even at highest zoom, the letters cannot be read.

Last edited by Daanish87; 06-11-2010 at 06:01 PM.
Daanish87 is offline  
Old 06-11-2010, 04:58 PM   #2081
Daanish87
Member
Daanish87 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jun 2010
Device: none
Quote:
Originally Posted by Starson17 View Post
You want to replace DetailNews with ImprimerDetail.

Try this (No guarantees - I don't have anywhere to test it right now):
Code:
    def print_version(self, url):
        return url.replace('http://www.investmentexecutive.com/client/en/News/DetailNews', 'http://www.investmentexecutive.com/client/en/News/ImprimerDetail')
Hi starson, I tried this earlier, didn't work.
Daanish87 is offline  
Old 06-11-2010, 06:47 PM   #2082
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 Daanish87 View Post
Hi starson, I tried this earlier, didn't work.
Yes it did. I just tried it. It grabbed the print link you wanted ..... of course, that's not the end of the story. You still have to make the page work. Try looking at the source of the page.
All the content you want is in there.

Which road do you want to go down next - fix the non-print version or fix the print version?
Starson17 is offline  
Old 06-11-2010, 07:09 PM   #2083
Daanish87
Member
Daanish87 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jun 2010
Device: none
Quote:
Originally Posted by Starson17 View Post
Yes it did. I just tried it. It grabbed the print link you wanted ..... of course, that's not the end of the story. You still have to make the page work. Try looking at the source of the page.
All the content you want is in there.

Which road do you want to go down next - fix the non-print version or fix the print version?
Thanks Starson. Actually this is what happened. I had earlier gotten the RSS for the Globe and Mail in epub format. This was causing my reader to slow down alot and even freeze. So I converted the Globe and Mail epub to pdf and then it was working fine.

So I assumed the same thing with Investment Executive, I just converted it straight instead of checking the epub version, and the pdf was coming all strange, lots of images and microscopic writing. However I decided to give the epub version of IE a try, and lo and behold, it isn't causing my reader to slow down or freeze up, and in fact its very clear with minimal distractions(using the code you gave me).

So I guess I should take it on a case by case basis. So far, for Globe and mail, the pdf conversion seems to work and for IE the epub version seems to work.

Thanks for you help, I appreciate it.
Daanish87 is offline  
Old 06-11-2010, 07:12 PM   #2084
Daanish87
Member
Daanish87 began at the beginning.
 
Posts: 18
Karma: 10
Join Date: Jun 2010
Device: none
Quote:
Originally Posted by Starson17 View Post
Yes it did. I just tried it. It grabbed the print link you wanted ..... of course, that's not the end of the story. You still have to make the page work. Try looking at the source of the page.
All the content you want is in there.

Which road do you want to go down next - fix the non-print version or fix the print version?
Actually, the way it is now is fine, its not perfect but its very readable.

I do have one question. I was going through the calibre page for converting rss, and in the section on 'slicing and dicing' I was wondering where the code shown is from? And am I supposed to copy that entire code into the recipe? Or is this something else?
Daanish87 is offline  
Old 06-11-2010, 08:51 PM   #2085
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 Daanish87 View Post
Actually, the way it is now is fine, its not perfect but its very readable.

I do have one question. I was going through the calibre page for converting rss, and in the section on 'slicing and dicing' I was wondering where the code shown is from? And am I supposed to copy that entire code into the recipe? Or is this something else?
I'm not really sure what you're asking. Take a look at some builtin recipes to see how the various methods are used.
Starson17 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 04:48 AM.


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