Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-25-2018, 02:07 AM   #796
DarkLordCorwin
Junior Member
DarkLordCorwin began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Kindle Fire (5th generation)
Quote:
Originally Posted by theducks View Post
OK
I usually put series index in the Title field, but yours should work.
(I also make collections with the series name, but I understand that the KC plugin does not work with the Fire)

yeah I used to put the series in the title field, but I didn't really care for it. The titles on a lot of books are rather long and when you do that you're either not seeing part of the title or part of the series name. At least in the author field, I'm usually not looking for the author. Frankly the few times I do look for the author I usually already know the book titles by memory, such as The Dresden Files series.

But what is the KC plugin?
DarkLordCorwin is offline   Reply With Quote
Old 01-25-2018, 10:09 AM   #797
shamanNS
Evangelist
shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.shamanNS ought to be getting tired of karma fortunes by now.
 
Posts: 436
Karma: 849894
Join Date: Feb 2010
Location: Serbia
Device: Kindle PW3[300dpi] , Kindle PW1
Kindle Collections
shamanNS is offline   Reply With Quote
Old 01-25-2018, 10:25 AM   #798
DarkLordCorwin
Junior Member
DarkLordCorwin began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2018
Device: Kindle Fire (5th generation)
Quote:
Originally Posted by shamanNS View Post
Ahh, thanks.

I don't think I really worry about the KC plugin at the moment though. I just set up my own collections on the Kindle manually.
DarkLordCorwin is offline   Reply With Quote
Old 03-03-2018, 12:05 AM   #799
jjquin
Junior Member
jjquin began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2018
Device: Android - FBReader
Cool

I use FBReader on my Android Tablet. One of the features of FBReader I missed until recently was the ability to use hierarchical tags. I currently have a hierarchical Genre custom column in my Calibre Library. Unfortunately, FBReader uses the / (slash) to separate the hierarchical tags instead of a period.

So I needed a plugboard that not only appended the custom Genre column to tags but also added a slash between each genre. I also decided to put a period in front of each genre so that the genres would always appear at the top of every page in the FBReader tag browser.

After many hours of testing I came up with this:

{tags:||, }.{#genre:'re_group($,"([^.]+)\.","[[$]]/.")'}

{tags:||, } - starts with tags column and only adds a comma if tags is not blank.

. - places a period before the first genre (always Ficton or Non-ficton).

{#genre: - my custom genre column.

' - changes the following function to template program mode.

re_group( - regroup(column, pattern, template) - searches the column for a pattern and changes that found pattern to the template (note you can have more than one pattern and template).

$, - the $ refers the column defined before the re_group() function: #genre in this case.

"([^.]+)\.", - this is the pattern in parentheses it searches for any character BUT a period then the \. defines each period in the hierarchical genre column. By putting the first part in parantheses you can refer to just that part in the template.

"[[$]]/.") - this is the template it puts the word found in the pattern followed by a slash then a period to go in before the next word.

'} - closing single quote for template program mode and the closing of the #genre field.

I originally tried to use the re() function but it only worked when I had the exact number of genres in the custom column. Unfortunately, my genre column can range from 3 to 5 genres. The re_group() function is nice because when it no longer finds the pattern it just adds the rest of the string (or in this case column) to the end.

So Non-Fiction.Manual.Appliance.Kitchen becomes .Non-Fiction/.Manual/.Appliance/.Manual and is added to the end of tags in the epub.

Fortunately, the strange looking genre tag does not appear in the book details, but it will be at the top of the tag browser in FBReader.
jjquin is offline   Reply With Quote
Old 03-04-2018, 02:49 AM   #800
ICDeadPpl
Member
ICDeadPpl began at the beginning.
 
ICDeadPpl's Avatar
 
Posts: 14
Karma: 10
Join Date: Mar 2010
Location: Sweden
Device: Kobo Aura H2O
Question

Quote:
Originally Posted by jjquin View Post
I use FBReader on my Android Tablet. One of the features of FBReader I missed until recently was the ability to use hierarchical tags. I currently have a hierarchical Genre custom column in my Calibre Library. Unfortunately, FBReader uses the / (slash) to separate the hierarchical tags instead of a period.

So I needed a plugboard that not only appended the custom Genre column to tags but also added a slash between each genre. I also decided to put a period in front of each genre so that the genres would always appear at the top of every page in the FBReader tag browser.

After many hours of testing I came up with this:

{tags:||, }.{#genre:'re_group($,"([^.]+)\.","[[$]]/.")'}

{tags:||, } - starts with tags column and only adds a comma if tags is not blank.

. - places a period before the first genre (always Ficton or Non-ficton).

{#genre: - my custom genre column.

' - changes the following function to template program mode.

re_group( - regroup(column, pattern, template) - searches the column for a pattern and changes that found pattern to the template (note you can have more than one pattern and template).

$, - the $ refers the column defined before the re_group() function: #genre in this case.

"([^.]+)\.", - this is the pattern in parentheses it searches for any character BUT a period then the \. defines each period in the hierarchical genre column. By putting the first part in parantheses you can refer to just that part in the template.

"[[$]]/.") - this is the template it puts the word found in the pattern followed by a slash then a period to go in before the next word.

'} - closing single quote for template program mode and the closing of the #genre field.

I originally tried to use the re() function but it only worked when I had the exact number of genres in the custom column. Unfortunately, my genre column can range from 3 to 5 genres. The re_group() function is nice because when it no longer finds the pattern it just adds the rest of the string (or in this case column) to the end.

So Non-Fiction.Manual.Appliance.Kitchen becomes .Non-Fiction/.Manual/.Appliance/.Manual and is added to the end of tags in the epub.

Fortunately, the strange looking genre tag does not appear in the book details, but it will be at the top of the tag browser in FBReader.
Which column type do you use exactly for the #genre custom column?
Or does it matter which type it is?
ICDeadPpl is offline   Reply With Quote
Old 03-09-2018, 04:41 AM   #801
jjquin
Junior Member
jjquin began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2018
Device: Android - FBReader
Quote:
Originally Posted by ICDeadPpl View Post
Which column type do you use exactly for the #genre custom column?
Or does it matter which type it is?
The type is Text, Column shown in the Tag browser.

I just changed my save to disk template. I was having issues with Anthologies, books with many authors. My wife likes to read romance anthologies and some of them have like 6-10 authors. The issue was that both the folder and file name had all of the authors' lastname, firstname separated by an &. Android started complaining about file location that had more than 256 characters! Took a little bit to get it right but I came up with this:

{author_sort:'list_item($, 0, "&")'}/{author_sort:'list_item($, 0, "&")'} - {title}

This template will only take use the first author in {author_sort} as the folder and beginning of the filename. Since my ereader software (FBReader) reads author and title from the metadata not the title I have no issue with this.

Hmm, is there a way to create a Save-to-Disk template that duplicates the Calibre folder structure? I'm just curious. I like how Calibre stores the books

{authors:'list_item($, 0, "&")'}/{title} ({id})/{title} - {authors:'list_item($, 0, "&")'}

I'm just guessing based upon what I see in the Calibre Library Folder. I know a lot of people complain about how the ebooks are stored on the hard disk but I like it. If you have two books with the same name your guaranteed two different folders because of the Id. Sometimes I accidentally add a book to the library twice or I'm getting a better copy of book. (I've been slowly replacing a lot of old books I originally converted from PDF.) The id ensures I'll get both copies till I'm ready to delete one.

As long as my ereader can read the metadata I don't really care the structure as long as it doesn't overwrite books and it's not over 256 characters long!

jjquin is offline   Reply With Quote
Old 06-27-2018, 06:40 PM   #802
Pichael
Junior Member
Pichael began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jun 2018
Device: Kindle Paperwhite
Quote:
Originally Posted by chaley View Post
This Template Program Mode template does the job. It distinguishes between integer and floating point series numbers, picking different formatting. For floating point numbers it removes any trailing zeros after the number is formatted.
Code:
{series_index:'contains($, '\.', re(format_number($, '0>5.2f'), '0*$', ''), format_number($, '0>2d'))'}
Sorry for this completely novice question, but I just learnt about metadata plugboards today and found this post.
It's almost exactly as I want my books to appear on my Kindle.

One thing I would like though is brackets around the series number. I think the code is |[|] but I am not sure where to add it to the above template. I thought I had it, but my books end up with plugboard errors in the title when they arrive on my Kindle.

Thanks for any help.

Edit: Nevermind I figured it out myself. I swear I tried this already but it didn't work. I must've messed something up the first time.

Code:
{series_index:'contains($, '\.', re(format_number($, '0>5.2f'), '0*$', ''), format_number($, '0>2d'))'|[|]} {title}
Edit2: Hmm that didn't turn out how I wanted it to.

Now my series looks like:

[01] Book
[02] Book
[03.5] Book
[03] Book

How do I get it to sort it properly so 3.5 is after 3?

Last edited by Pichael; 06-27-2018 at 07:22 PM. Reason: Figured it out.
Pichael is offline   Reply With Quote
Old 07-10-2018, 02:15 AM   #803
Penny_Dreadful
Enthusiast
Penny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud of
 
Penny_Dreadful's Avatar
 
Posts: 39
Karma: 27856
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle PW, Kindle PW3 (G090G1)
Question

Hi, I need some GPM template help, I'm looking for a custom column that shows icons depending on the state of the "odid" identifier.

I'd like to see no icon if the id doesn't exist.

One icon (overdrive.png) if the identifier is just "overdrive"
eg. odid:565155@wapldmc.overdrive.com

A different icon (kunlimited.png) if the identifier is just "unlimited"
eg. odid:B07D8QTWJM@ak/unlimited

And both icons if it contains both
eg. odid:2987334@wapldmc.overdrive.com&B01KZYE3TO@ak/unlimited

Penny_Dreadful is offline   Reply With Quote
Old 07-12-2018, 06:37 AM   #804
Penny_Dreadful
Enthusiast
Penny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud of
 
Penny_Dreadful's Avatar
 
Posts: 39
Karma: 27856
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle PW, Kindle PW3 (G090G1)
Quote:
Originally Posted by Penny_Dreadful View Post
Hi, I need some GPM template help, I'm looking for a custom column that shows icons depending on the state of the "odid" identifier.
I kind of figured this out, I have two separate columns but it looks fine.

In case any one else wants this here is how I did it (Thanks to chaley who helped me out a couple of years ago with another column icon issue)

I made two empty columns "Text, Shown in Tag Browser" called OD and KU

Then in Column Icons, I these two had advance rules

program:
a = select(field('identifiers'),'odid');
contains(a, 'wapldmc', 'overdrive.png','');

program:
a = select(field('identifiers'),'odid');
contains(a, 'unlimited', 'kunlimited.png','');


I would like to be able to sort by these columns, which I can't do as they don't have any real data in them, so I'll keep on poking at it until I understand a bit more than I do right now.

Last edited by Penny_Dreadful; 07-12-2018 at 06:42 AM.
Penny_Dreadful is offline   Reply With Quote
Old 07-12-2018, 07:11 AM   #805
chaley
CC Android & calibre dev
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 8,744
Karma: 2655880
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by Penny_Dreadful View Post
I kind of figured this out, I have two separate columns but it looks fine.

In case any one else wants this here is how I did it (Thanks to chaley who helped me out a couple of years ago with another column icon issue)

I made two empty columns "Text, Shown in Tag Browser" called OD and KU

Then in Column Icons, I these two had advance rules

program:
a = select(field('identifiers'),'odid');
contains(a, 'wapldmc', 'overdrive.png','');

program:
a = select(field('identifiers'),'odid');
contains(a, 'unlimited', 'kunlimited.png','');


I would like to be able to sort by these columns, which I can't do as they don't have any real data in them, so I'll keep on poking at it until I understand a bit more than I do right now.
It isn't clear why you made two columns. Why not put both icons on one composite column, since they are related to the same thing, the identifier "odid"? If you do that then you can sort.

Start by making a "Column built from other columns" (a 'composite' column). Check the box "Show in tag browser", assuming you really want to see the column & values listed there. Set the template to
Code:
program:
	a = select(field('identifiers'),'odid');
so that the content is the value of the identifier. You can then use basic "composed icon" rules to add the icons to the column, with or without displaying the identifier text.
chaley is offline   Reply With Quote
Old 07-12-2018, 07:35 AM   #806
Penny_Dreadful
Enthusiast
Penny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud ofPenny_Dreadful has much to be proud of
 
Penny_Dreadful's Avatar
 
Posts: 39
Karma: 27856
Join Date: Aug 2009
Location: Perth, Australia
Device: Kindle PW, Kindle PW3 (G090G1)
Quote:
Originally Posted by chaley View Post
It isn't clear why you made two columns. Why not put both icons on one composite column, since they are related to the same thing, the identifier "odid"? If you do that then you can sort.

Start by making a "Column built from other columns" (a 'composite' column). Check the box "Show in tag browser", assuming you really want to see the column & values listed there. Set the template to
Code:
program:
	a = select(field('identifiers'),'odid');
so that the content is the value of the identifier. You can then use basic "composed icon" rules to add the icons to the column, with or without displaying the identifier text.
I confused myself, thinking what I wanted was more complicated than it was. Thanks for the help chaley.
Penny_Dreadful is offline   Reply With Quote
Reply

Tags
custom column

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 04:10 AM.


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