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 08-20-2010, 05:09 PM   #2476
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 jordanmills View Post
Hehe... actually I just found out yesterday that some of the articles are multipage... but only some. I know how to pick them!

I'll read up on that stuff by TonyTheBookwork and try a few other things before I try to get you to spend your time reinventing the wheel for me. I'll post back in a bit. Thanks!
If you've got multipage working, then you're doing great. As far as authentication goes, sometimes it's just a matter of basic authentication. Sometimes it's a "referer" issue. Sometimes it's UserAgent, another header or cookie issue. The tools I use to figure out all those issues are FireFox, FireBug and TamperData.
Starson17 is offline  
Old 08-20-2010, 06:01 PM   #2477
rogeliodh
Member
rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.rogeliodh knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 14
Karma: 87858
Join Date: Dec 2009
Device: Kindle 3
La Jornada recipe is now included in 0.7.15. Thanks Kovid :-)
rogeliodh is offline  
Advert
Old 08-20-2010, 09:26 PM   #2478
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Question for you Starson17 or anyone else for that matter

If you wanted to subcat your feeds how would you do so in code?
More specifically:
Lets say I have
Quote:
News
Breaking News
More News
Whatever
Sports
Braves
Falcons
I know in code how to get it to group it for instance In news or in sports but I don't know how to get it to Group it like <H1> News <H2> Breaking News or whatever.
Thanks again.
TonytheBookworm is offline  
Old 08-21-2010, 05:53 AM   #2479
eric11210
Addict
eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.
 
Posts: 295
Karma: 400001
Join Date: Aug 2010
Device: Sony Reader PRS-600
Hi folks, I have a question:

Is there any way to grab a feed from a magazine which is online but which does not publish an RSS feed? I'm specifically interested in Tikkun.org. I'm also trying to get commentarymagazine.com, though in that case, it's a matter of my learning the programming to be able to write the recipe for it. They only give you summaries so I have to learn how to write something that will grab the whole article. However in the case of Tikkun, I'm wondering if it's even possible to do something with it. If anyone knows how and can explain it to me, I'd greatly appreciate it. My level of programming knowledge BTW is that I did some programming when I was in college and I know how to do most kinds of HTML scripting. I've never tried Python before, though I have dabbled with other scripting and programming languages, so I know I can figure it out. It's just a matter of taking enough time to learn.

Thanks,

Eric
eric11210 is offline  
Old 08-21-2010, 08:49 AM   #2480
poluk
Enthusiast
poluk is on a distinguished road
 
Posts: 34
Karma: 54
Join Date: Jul 2008
Device: not yet
Hi !
I will need your help for making a recipe or simply try to transpose an existing recipe to that one.
I would like to get the rss from Lloyd's List to calibre
the website: http://www.lloydslist.com/
I am an user of the website and we have to login to the website to be able to look into the article.
Even loggeg on firefox calibre will only take the page that are for non members of the website.
Could you tell me if you have any tutorial or recipe that could help me to make one for that website? (with authentification) and maybe directly take the text from the print version ?

Thank you for your help !
poluk is offline  
Advert
Old 08-21-2010, 09:04 AM   #2481
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 TonytheBookworm View Post
If you wanted to subcat your feeds how would you do so in code?
I know in code how to get it to group it for instance In news or in sports but I don't know how to get it to Group it like <H1> News <H2> Breaking News or whatever.
Thanks again.
Are you asking how to format the list of feeds in the first index.html? I'm not aware of any tools in the Calibre recipe system to do that.
Starson17 is offline  
Old 08-21-2010, 09:07 AM   #2482
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 eric11210 View Post
Is there any way to grab a feed from a magazine which is online but which does not publish an RSS feed?
It sounds like you want parse_index() Read this:
Starson17 is offline  
Old 08-21-2010, 10:13 AM   #2483
eric11210
Addict
eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.
 
Posts: 295
Karma: 400001
Join Date: Aug 2010
Device: Sony Reader PRS-600
Thanks. I see what's involved now. This is at least a full day of work for me to figure it all out, so I'll get to it eventually.

Eric
eric11210 is offline  
Old 08-21-2010, 10:27 AM   #2484
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 eric11210 View Post
Thanks. I see what's involved now. This is at least a full day of work for me to figure it all out, so I'll get to it eventually.
The built-in recipe for Scientific American has a good example of how this is done.
Starson17 is offline  
Old 08-21-2010, 10:46 AM   #2485
eric11210
Addict
eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.eric11210 ought to be getting tired of karma fortunes by now.
 
Posts: 295
Karma: 400001
Join Date: Aug 2010
Device: Sony Reader PRS-600
I took a look at the recipe for The Atlantic, which is mentioned in the example you sent me. However, looking at the website more closely, it's going to be very complicated to adapt the recipe to it because only some things are made available. I imagine someone who knows what they're doing could be done in an hour or so, but for me, I have to do a lot of trial and error until I get all the details of the scripting language figured out.

Thanks again for pointing me in the right direction though. It's something I'll try to work on it some weekend when I'm not very busy with anything else.
eric11210 is offline  
Old 08-21-2010, 12:11 PM   #2486
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
Here is the Atlanta Journal Constitution Feed

In the recipe you will notice I commented out some of the feeds for the individual counties. Of course just take and remove the # to enable them.
Attached Files
File Type: rar ajc.rar (1.3 KB, 210 views)

Last edited by TonytheBookworm; 08-23-2010 at 10:16 PM. Reason: Modified Recipe to be cleaner and include images
TonytheBookworm is offline  
Old 08-21-2010, 05:22 PM   #2487
TonytheBookworm
Addict
TonytheBookworm is on a distinguished road
 
TonytheBookworm's Avatar
 
Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
If one wanted to remove only the Comment portion of the following
Code:
<p id="BlogDate" class="calibre9">Posted By <u class="calibre10">admin</u> On August 21, 2010 @ 10:15 am In <u class="calibre10">Uncategorized</u> | <u class="calibre10"><a href="#comments_controls" class="calibre6">No Comments</a></u></p>
So I would get something like
Posted By Jim Jones On August 21,2010 @ 10:15am In Uncategorized
again leaving off the comments_controls. How would this be done.

I thought maybe using remove_tags() but I'm not certain what dict and attrb I would use. I tried with no luck the following:
Code:
remove_tags = [dict(name='a', attrs={'href':'#comment controls'})]
thanks.

i attached the recipe i have so far. it works just would like to remove the comment control thing...
Attached Files
File Type: rar nar.rar (660 Bytes, 206 views)

Last edited by TonytheBookworm; 08-22-2010 at 12:31 AM. Reason: added working version of http://www.notalwaysright.com
TonytheBookworm is offline  
Old 08-22-2010, 08:55 AM   #2488
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 TonytheBookworm View Post
Code:
<a href="#comments_controls" class="calibre6">No Comments</a>
I tried with no luck the following:
Code:
remove_tags = [dict(name='a', attrs={'href':'#comment controls'})]
Based on your quoted html from above, have you tried the correct href? IOW, have you tried this:
Code:
remove_tags = [dict(name='a', attrs={'href':'#comments_controls'})]
(it's always the little things that trip you up!)

Last edited by Starson17; 08-22-2010 at 09:35 AM.
Starson17 is offline  
Old 08-22-2010, 12:06 PM   #2489
cisaak
Member
cisaak began at the beginning.
 
Posts: 17
Karma: 10
Join Date: Aug 2010
Device: Kindle DX
Quote:
Originally Posted by Starson17 View Post
You seem to have YOUTUBE tags on that recipe, but I was able to extract the code from the code tags. One of your H1 tags is inside an <a> tag so, assuming you don't need links try changing the remove_tags to this:

Code:
remove_tags = [dict(name='div', attrs={'id':'blox-logo'}),dict(name='a')]
You have a lot of overlapping remove and keep tags. You may want to use FireFox and FireBug to clean it up a bit, but it works as is.
Thanks again. Your suggestion works and I have also eliminated some duplicative "remove tags." One more request: My masthead title is truncated when viewed on my Kindle. Is this because the font is too large? How can I fix?
cisaak is offline  
Old 08-22-2010, 12:44 PM   #2490
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 cisaak View Post
One more request: My masthead title is truncated when viewed on my Kindle. Is this because the font is too large? How can I fix?
If that is your problem, then extra CSS will let you control fonts.

I have no particular expertise on CSS or the Kindle so I can't really give you the fix, but try looking at the css file in your EPUB resulting from the recipe. Look at the masthead text and the css that controls it. Change the css until it works, then add it to your recipe. Here is some stock extra css as an example that can be added to a recipe:

Code:
    extra_css = '''
                    h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
                    h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
                    p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
                    body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
		'''
Copy and add it as is, with the triple single-quotes on both ends, then modify as needed.
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 03:32 PM.


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