![]() |
#121 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,350
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Should be in the next release. (BTW: save/send templates were already case sensitive, as were some parts of composite column templates.) |
|
![]() |
![]() |
![]() |
#122 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,350
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
1: The line Code:
str_title5 = template('{title}'); Code:
str_title5 = field('title'); 2: Instead of Code:
str_input = lowercase(field('#kindle_title_fmt')); switch(str_input, Code:
switch(lowercase(field('#kindle_title_fmt')), Another option that has even better performance takes advantage of the fact that the match-value parameters in switch are really regexps. This lets you use case-insensitive matching by writing the switch as: Code:
switch(field('#kindle_title_fmt'), '(?i)series and num',str_title1, '(?i)alt and num',str_title2, '(?i)short and num',str_title3, '(?i)num only',str_title4, '(?i)no series info',str_title5, str_default); ![]() Quote:
|
||
![]() |
![]() |
Advert | |
|
![]() |
#123 | |||
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Nov 2010
Device: Kindle
|
Quote:
Fraid I am one of those that learns by piecing together others code snippits Quote:
Thanks for the code suggestions - will try them. Performance doesnt appear to have been a problem hence the laziness but I only have 2000 books in the system and am running a quad core. I am absolutely useless at regexp as it is not something I have ever used. My coding style has always been to lay everything out and pre-process as much as possible in logical chunks as find it easier to read when things get really complex and I find it more flexible. In real life it allows me to export chunks into external compiled functions easily. Did a minor mod so that if I put a short title in then it used that as a default ie str_default =test(field('#alt_series_name'),str_title2, str_title1); Quote:
thanks for all the work on this - seriously appreciated |
|||
![]() |
![]() |
![]() |
#124 |
eBook Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Hi:
I was wondering if someone can help me create a plugboard. I am trying to create one that will send the books to my k2 and put them in folders based on their tags, here is what I have but it is not putting them in the folders, what am I doing wrong? Code:
{tags}/{title} - {series} - {series_index:0>2s| - | - } |
![]() |
![]() |
![]() |
#125 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,350
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
There is nothing wrong with the template in your post. My guess is that the problem is -where- you are putting it.
To set the destination name/path, you should put that template in either the box on preferences -> send to device or in preferences -> plugins -> device plugins -> Kindle 2/3. Whatever is in the box in the device plugin takes precedence over whatever is in the box in the send-to-device preference. If you are putting it in the send-to-device preferences, then check the plugin to see if it has a different value. |
![]() |
![]() |
Advert | |
|
![]() |
#126 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Yes, that's where I got confused at the start as well... I had put this awesome template in the send-to-device preference, only to see the same values over and over (the original ones). Until I found out, you can also set them at the device settings...
|
![]() |
![]() |
![]() |
#127 |
eBook Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Ok, I had it in the wrong spot, when I moved it to the settings for the send to device area it worked correctly. Now I have one more question, is there a way to have it go to the folder of the first tag if multiple tags exist?
|
![]() |
![]() |
![]() |
#128 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,350
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The template expression is {tags:re((.*?)(\,|$).*,\1)}. This problem comes up so many times that I think I will add functions to the template processor specifically for manipulating comma-separated lists. ![]() |
|
![]() |
![]() |
![]() |
#129 |
eBook Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Thanks I will use this until the update.
![]() |
![]() |
![]() |
![]() |
#130 |
eBook Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Chaley:
Now that the update is out how do I adjust the template to select which tag should be considered first?? Nyn |
![]() |
![]() |
![]() |
#131 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,350
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
The first tag is the one in the front of the list, in alphabetic (case-insensitive) order.
What scenario are you thinking of? |
![]() |
![]() |
![]() |
#132 |
eBook Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
I am not sure, in most cases it is not the the first one that I want but the second but how would you tell it to pick the second one if more than one exist but the first one if only one exists?? But if that is not doable, it can stay as it is.
|
![]() |
![]() |
![]() |
#133 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,350
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
{tags:'switch(count($, ','), 1, $, list_item($, 1, ','))'}
Last edited by chaley; 01-10-2011 at 03:14 AM. Reason: Remove extra quote marks |
![]() |
![]() |
![]() |
#134 |
eBook Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Thank you for all your help.
![]() |
![]() |
![]() |
![]() |
#135 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 76
Karma: 4430
Join Date: Jan 2009
Location: Chicagoland
Device: Kindle 4, eBookwise & Literati
|
GUI Columns
I've been working exclusively with the GUI, as my only reader at the moment is an Ebookwise with it's own limited conversion/Library software elsewhere on my PC.
My previous efforts at cataloging my Library were on the AZZ Cardfile program, where I've also kept a list of my Custom Columns for Calibre. Several of these had to be redone because I had chosen them originally as non-comma'd versions. I therefore recommend using the commas unless you are absolutely certain that they will never be needed! With one exception these are all being filled in by "hand" w/o any {}. Not sure whether these would count as recipes, but they are hereby offered below as some may find the examples useful: Column type/{} if any/search designation in lower case/column Heading Column built from other columns/{format}/format/eFormats showing all the formats present that are recognized by Calibre for each book, previously discussed in FAQ Ratings, shown with stars/myrate/My Rating as opposed to those supplied by others Floating point numbers/price/Retail recording cover price or equivalent Text, but with a fixed set of permitted values/drm/DRM Notes the original Encrypted Format purchased, if any. Comma separated text, like tags, shown in the tag browser/award/Awards citing both Wins and Nominations Comma separated text, like tags, shown in the tag browser/genre/Genres not as yet used Comma separated text, like tags, shown in the tag browser/length/Length includes both Fictionwise VS/S/M/L/VL (coded below as L1 thru L5) as well as "Named" Lengths: Flash & Micro-Fiction, Shortstories vs. Short for Non-fiction, and Novelet(te)s vs. Novellas vs. Novels & Omnibus Volumes Comma separated text, like tags, shown in the tag browser/line/Lines such as Romance lines: Intrigue, Blaze, Desire, etc., with or without line #'s Comma separated text, like tags, shown in the tag browser/myseries/My Series Comma separated text, like tags, shown in the tag browser/otherfmt/Other Formats as Paper, Trade, Hardcover, Leatherbound, Stageplay & Audio Comma separated text, like tags, shown in the tag browser/note/Notes such Signed, First Edition, as well as corrections needed, Etc. Comma separated text, like tags, shown in the tag browser/setting/Settings such as Ireland, Scotland, name of town, etc. Comma separated text, like tags, shown in the tag browser/subject/Subjects Long text, like comments, not shown in tag browser/com2/My Comments Long text, like comments, not shown in tag browser/comm/Other Comments Text,column shown in the tag browser/cat/Catalog personal catalog # in previous use matching cover art in separate folder This was originally intended to get rid of idiosyncratic file names and allow me to locate and view the covers, which the cardfile couldn't readily handle, but still has secondary benefits, as I can store multiple covers here, and change them off if desired, as well as copying the best of them to folders accessed by my screensaver for a slideshow, and can break the latter down by style such as vintage pulp, watercolor, etc. The screensaver runs more smoothly using the catalog #'s than it did when they had regular titles attached. Text,column shown in the tag browser/code/Code is a personal alpha-numeric code based on the Word-Length of Books - for example, L3aj includes a 2.4H (hour) reading time for a mid-length book described by some as a novella. Text,column shown in the tag browser/issue/Issue such as Magazine, Webscription or other Issue data Text,column shown in the tag browser/time/Time Reading time in Decimal Hours as 2.4H, Etc. rounded up from the high end Fictionwise Reading time in minutes Yes/No/coll/ACMO for Anthologies, Collections, Magazines & Omnibi a yes shows that there will be further information in other columnsYes/No/classic/Classic Yes/No/mark/Mark as recomendation for or against for my brother at home who actually reads Yes/No/read/Read (by me) Last edited by ThePage; 01-17-2011 at 12:36 AM. Reason: afterthoughts |
![]() |
![]() |
![]() |
Tags |
custom column, tag, tags |
|
![]() |
||||
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 |