06-24-2013, 12:51 PM | #1 |
Member
Posts: 13
Karma: 10
Join Date: Apr 2013
Device: Kobo Aura HD
|
Add cover and "shelves" in recipe?
Hi,
I'm trying to figure out how to add a cover to a recipe? I have a jpg on my disk I would like to use as the cover. I saw a function mentioned in the API called default_cover() I think, but am unsure of the syntax. It looks like this function is defined in most of the recipes I've seen. Also... is it possible to add the epub resulting from a recipe to some shelves automatically? Thanks for any help. |
06-24-2013, 01:51 PM | #2 |
Grand Sorcerer
Posts: 12,773
Karma: 75003038
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Well, not sure about qiestion 1, but I just tried an experiment here on the shelving.
Not being quite sure what type of shelving you want, I came up with an approach that would assign a recipe to a shelf based on the recipe name. Add a custom column to calibre as follows Code:
Lookup name: newsshelf Column Heading: News Shelf Column Type: Column built from other columns Template: {:'strcmp(list_intersection(field('tags'), 'News', ','),'News','',list_item(field('title'),0,'['),'')'} Then, just add the value #newsshelf to the list of column in either the Kobo Touch or Kobo Extended driver (depending on which one you are using to send data to the Kobo). |
Advert | |
|
06-24-2013, 02:23 PM | #3 |
Member
Posts: 13
Karma: 10
Join Date: Apr 2013
Device: Kobo Aura HD
|
Come to think of it, the second question was kind of confusing because custom "shelves" are not a part of stock Calibre. I created a new shelf field and column that would sync to the shelves on my Kobo.
I think this was the original article: https://www.mobileread.com/forums/sho...d.php?t=193184 |
06-24-2013, 03:26 PM | #4 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Simply set
cover_url = 'file:///whatever' in your recipe. |
06-24-2013, 05:43 PM | #5 |
Member
Posts: 13
Karma: 10
Join Date: Apr 2013
Device: Kobo Aura HD
|
Awesome. Thanks!
Do you know if there is a way to have the resulting book be added to my custom "news" shelf? |
Advert | |
|
06-24-2013, 06:24 PM | #6 |
Grand Sorcerer
Posts: 12,773
Karma: 75003038
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Does my post above help?
If you want it to go to a shelf called 'News' then Code:
{:'strcmp(list_intersection(field('tags'), 'News', ','),'News','','News','')'}
|
06-28-2013, 10:27 PM | #7 |
Member
Posts: 13
Karma: 10
Join Date: Apr 2013
Device: Kobo Aura HD
|
Hey PeterT, thanks for the help.
I'm not sure where exactly I should put the above code. I'm in the "Add custom New Source" advanced page. When I try and add the above it says something about the there being an error on line #55. |
06-28-2013, 11:32 PM | #8 |
Grand Sorcerer
Posts: 12,773
Karma: 75003038
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
|
Nooooo... this has nothing to do with news sources; rather it has to with general calibre customization, and also with the Kobo (or Kobo Extended) driver configuration.
What you're doing is to initially add a custom column to calibre. Go to Preferences | Change calibre behavior | Interface | Add your own column then Add custom column (either the button across the bottom or the green + sign). Add a custom column to calibre as follows Code:
Lookup name: newsshelf
Column Heading: News Shelf
Column Type: Column built from other columns
Template: {:'strcmp(list_intersection(field('tags'), 'News', ','),'News','','News','')'}
If you want to use a different shelf name, just change the third occurrence of News (the one in red). Once you've added the column you will have to restart calibre. Then, just add the value #newsshelf to the list of column in either the Kobo Touch or Kobo Extended driver (depending on which one you are using to send data to the Kobo). For more info on the Kobo Shelving options see Quick Guide to Shelf Management with calibre 0.9.1 & above (Touch / Glo / Mini /Aura). |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A PY script to make "shelves" from folders? | Ken Maltby | Kobo Reader | 13 | 05-20-2013 02:09 PM |
Recipe for EPUB subscribers of "Tagesspiegel" and "Handelsblatt"? | F.W. | Recipes | 0 | 05-14-2013 12:16 PM |
New recipe for "Süddeutsche Zeitung" using "E-Paper mobile" subscription | Ernst | Recipes | 3 | 02-16-2013 08:37 AM |
Recipe for "Galicia Confidencial" and "De L a V" | roebek | Recipes | 1 | 07-19-2011 10:17 AM |
My DIY cover for the Kobo - the "KoBook" (or "BooKobo") | Beorn | Kobo Reader | 4 | 07-12-2010 08:06 PM |