09-22-2012, 08:11 PM | #316 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
Congrats again for twisting the info in the metadata plugboard to your needs as a Save to disk template. Well done! |
|
10-02-2012, 08:51 AM | #317 |
Quilt Geek
Posts: 472
Karma: 91775
Join Date: Aug 2007
Location: Lancaster, PA
Device: Kindle
|
I have some plugboards set up for a long time, now, and I've been really pleased with how they're working. I've run into a small issue, though, that I hope someone might have some ideas.
I have a plugboard set up for the content server, any format. Basically, I just want to put the series number at the start of the title. (I only added the "Tracey" to make the changes obvious while I worked on the plugboard ) I have a lot of books that I have in epub and mobi. The plugboard works perfectly for the pubs, but the mobi files that are downloaded do not appear to have had the plugboard applied. So, what am I missing? User error, or a problem in the plugboard? Thanks for any pointers you can provide. I'm on a mac, running calibre 0.9. Last edited by tlrowley; 10-02-2012 at 08:53 AM. |
10-02-2012, 09:53 AM | #318 |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The content server supports plugboards only for epub.
Starting with 0.9.0, calibre displays a warning message when you set up an "any format" plugboard for the content server. Last edited by chaley; 10-02-2012 at 09:57 AM. |
10-02-2012, 09:56 AM | #319 |
Quilt Geek
Posts: 472
Karma: 91775
Join Date: Aug 2007
Location: Lancaster, PA
Device: Kindle
|
Well, that wold explain it, then, wouldn't it?
Thanks for the help. |
10-10-2012, 10:57 PM | #320 |
Member
Posts: 16
Karma: 10
Join Date: Oct 2012
Location: Chicago
Device: Kobo Aura, Kobo Touch
|
help with template code for custom column
I'm trying to set up a composite custom column (built from Calibre's tags column), but I'm having trouble with the template code.
I have a custom column #koboshelves that is used to populate shelves on my Kobo Touch (via the Kobo device driver). I have dozens of tags, but I only want to use a few to populate #koboshelves. I have the following #koboshelves: Fantasy & SciFi Historical Fiction Middle-Grade I'd like books containing these tags to autofill #koboshelves: fantasy (add to Fantasy & SciFi shelf) historical (add to Historical Fiction shelf) middle-grade (add to Middle-Grade shelf) scifi (add to Fantasy & SciFi shelf) Example: A book tagged 'classics, france, historical, middle-grade' would add 'Historical Fiction, Middle-Grade' to #koboshelf. It's easy to get a single tag to work: Code:
{tags:contains(historical, Historical Fiction,)} |
10-11-2012, 03:00 AM | #321 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
program: t = field('tags'); l = ''; l = list_union(l, in_list(t, ',', 'space', 'Space Opera', ''), ','); l = list_union(l, in_list(t, ',', 'science', 'Science Fiction', ''), ','); l = list_union(l, in_list(t, ',', 'alternate', 'Alternate History', ''), ','); l = list_union(l, in_list(t, ',', 'a', 'b', ''), ','); Note 1: in_list takes a regular expression for the match pattern. If there are multiple tags that result in the same shelf, you can write it like this Code:
list_union(l, in_list(t, ',', 'tag1|tag2', 'Space Opera', ''), ','); Code:
list_union(l, in_list(t, ',', '^space$', 'Space Opera', ''), ','); Code:
list_union(l, in_list(t, ',', '^(tag1|tag2)$', 'Space Opera', ''), ','); |
|
10-11-2012, 03:55 PM | #322 |
Member
Posts: 16
Karma: 10
Join Date: Oct 2012
Location: Chicago
Device: Kobo Aura, Kobo Touch
|
Thank you so much, Chaley! It works perfectly.
I was using list_re instead of list_union. My knowledge of python in limited, hence the ham-handed attempts. I haven't noticed a decrease in Calibre's performance, so a custom template function can wait until I learn more python. Last edited by TicklishOwl; 09-01-2015 at 02:57 AM. |
10-27-2012, 08:58 PM | #323 |
Junior Member
Posts: 5
Karma: 10
Join Date: Sep 2012
Device: Kindle Keyboard
|
Nexus 7 / Moonreader+ template?
I am wanting to make a template for the books I send to my Nexus 7, using Moonreader to read them. Which "device" do I choose to make it work? When I choose Android device it says "Android devices do not support MOBI format", and when I use the "MTP device" it does not apply the template. (I want to put the series & Series# in the title.)
Alternatively does anyone know a tablet/e-reader app that works well other than Moonreader? Of the ones I have looked at, it works easiest so far. But I want to be able to see the series metadata somehow so I can read the books in order. Thanks in advance for any info. |
10-27-2012, 10:20 PM | #324 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
That said, I would suggest using the Calibre Companion (CC) App to transfer books to your device (wifi required). I use it to manage the books on my Nexus 7 and open books via CC in Moonreader +. When you transfer books CC uses the metadata from calibre's library and you see the author, title, series and series index by default so no plugboard required, see attached. I no longer import any books into Moonreader+ I simply use CC to launch whatever book I desire to read. Good Reading. Last edited by DoctorOhh; 10-27-2012 at 10:30 PM. |
|
10-28-2012, 03:43 PM | #325 |
Junior Member
Posts: 5
Karma: 10
Join Date: Sep 2012
Device: Kindle Keyboard
|
Thanks for reminding me of CC. I had forgotten about it. I have it on my phone, but I don't read much on my phone so I didn't think about it. It is a bit cumbersome to use vs plugging via USB, but not enough to make it an issue. I tried sorting by tags in Moonreader+ (just to see if I had missed something) but all it shows are the tags I put on the books, not the series info. I have not found any way to do that yet in MR+, but since I have CC now, it's not a major issue. Thanks.
|
09-04-2013, 11:08 AM | #326 |
Junior Member
Posts: 2
Karma: 10
Join Date: Sep 2013
Device: Kindle Paperwhites (His and Hers)
|
The Python code, faithfully copied from the instructions for the "flagging books as read" instructions, goes into the "Programming Code" box as one long line, and word-wraps around.
When I press the "create" button, I get a "SyntaxError: invalid syntax" error, which does not surprise me, given that the box into which I am pasting the code warns "Be Sure To Follow Python Indenting Rules". Problem is, I don't speak a word of Python. Can anyone help me with a better-formatted version of the code? Never mind, found properly formatted code here: https://www.mobileread.com/forums/showpost.php?p=1353631&postcount=137 Last edited by packetfire; 09-04-2013 at 11:31 AM. |
09-12-2013, 05:28 AM | #327 |
Member
Posts: 15
Karma: 9794
Join Date: May 2013
Device: Pocketbook Touch Lux 2(626)
|
im trying to make a template that uses a custom shelf but only if the custom shelf is populated otherwise i want it to use the series index without duplicates so this:
{#truenumber:0>2s| | - }{series_index:0>2s| | - }{author} works but in that if there is no truenumber but if there is a truenumber i get a duplicate from the series index is there any easy way to to simply have it not send series index if its sending truenumber? |
09-12-2013, 07:33 AM | #328 | |
Grand Sorcerer
Posts: 11,742
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
{#truenumber:0>2s| | - }{series_index:0>2s:'test(field('#truenumber'), '', $)'| | - }{author} |
|
09-30-2013, 09:20 AM | #329 | |
Junior Member
Posts: 6
Karma: 10
Join Date: Sep 2013
Location: Moscow, Russia
Device: iPad
|
Quote:
|
|
10-12-2013, 01:17 PM | #330 |
Junior Member
Posts: 3
Karma: 10
Join Date: Jun 2012
Device: Kindle
|
Hi, can you help me to adapt the code that shows ebook reading status in custom column to French please?
In the comments, there is: Code:
05/07/13 Dernière page lue : Emplacement 6514 (99%) Code:
1/24/2011 Last Page Read: Location 721 (99%) Code:
def evaluate(self, formatter, kwargs, mi, locals, val, is_read_pct, is_reading_str, no_page_read_str): try: test_val = int(is_read_pct) except: return 'is_read_pct is not a number' import re mg = re.match('.*\s(\d+[-/]\d+[-/]\d+).*?Dernière page lue : Emplacement \d+ \((\d+)%\)', val, re.I + re.DOTALL); if mg is None: return no_page_read_str date = mg.group(1) pct = mg.group(2) try: f = int(pct) if f > test_val: return date elif f > 0: return is_reading_str + ': ' + pct + '%' except: pass return no_page_read_str |
Tags |
custom column, tag, tags |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
custom column i need a little help | shinken | Calibre | 3 | 09-15-2010 03:41 AM |
Using Custom Metadata in Save Template | EJvdH | Calibre | 1 | 07-02-2010 06:06 AM |
Accessories Decalgirl Kindle 2 custom skin template | srmalloy | Amazon Kindle | 6 | 04-09-2010 09:55 PM |
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 |