Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 12-17-2019, 09:01 PM   #841
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,801
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by retro View Post
I setup a metadata plugboard for the KoboTouchExtended driver using this as my source template.

{series}{series_index:0>5.2f|| - }{title} > title_sort

It mostly works, but the series are sorting alphabetically by title rather than series number. The series titles stay together but if an author has more than one series, they aren't alphabetical either. So the results look like this when sorted by author:

Daughter of Atrocity
Sirona Cycle - 2

The Jump Point
Sirona Cycle - 1

Nullifier
Fire and Rust - 6

Refuge
Fire and Rust - 5

Am I doing something wrong or is this expected behavior?
I think it is expected. very few things can handle a biased sort like the Calibre gui does.
FWIW I make {series} into a collection and do NOT put it in the plugboard term.
As a matter of fact, I dont even use the plugboard with my Aura2.
I just configured the driver. Index does not show (and I just noticed ). Kobo uses a Database. I will play, but making Series into a collection is good
Attached Files
File Type: zip device_drivers_KOBO.py.json.zip (352 Bytes, 317 views)
theducks is online now   Reply With Quote
Old 12-17-2019, 10:02 PM   #842
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by retro View Post
I setup a metadata plugboard for the KoboTouchExtended driver using this as my source template.

{series}{series_index:0>5.2f|| - }{title} > title_sort

It mostly works, but the series are sorting alphabetically by title rather than series number. The series titles stay together but if an author has more than one series, they aren't alphabetical either. So the results look like this when sorted by author:

Daughter of Atrocity
Sirona Cycle - 2

The Jump Point
Sirona Cycle - 1

Nullifier
Fire and Rust - 6

Refuge
Fire and Rust - 5

Am I doing something wrong or is this expected behavior?
Kobo devices do not use the author_sort or title_sort. Your metadata plugboard is not actually changing anything the device uses. And what you are seeing above, series grouped when sorting by an author, is a fluke.

When sorting by author or title, the Kobo devices do not use the series. They sort by author (as "LN, FN") and within that, by the book title. The title sorting uses what calibre calls "library_order". That means that articles at the start of the title are moved to the end. So, "The Jump Point" will be sorted as "Jump Point, The". If the above is an example from your device, the fact that the series are grouped together is a fluke. The titles just happen to sort that way.

Kobo devices do support series sorting. As you have the series info on the device, sorting by that will put the series together in the correct order. That will be global in the library, not grouped within authors. But, there is also the authors list. From there you can view individual authors. This supports all the sorting options.
davidfor is offline   Reply With Quote
Old 12-17-2019, 10:07 PM   #843
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,907
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by theducks View Post
I just configured the driver. Index does not show (and I just noticed ). Kobo uses a Database. I will play, but making Series into a collection is good
And I encourage everyone with a Kobo device to ask them to add a series list, just like they did for authors.
davidfor is offline   Reply With Quote
Old 12-18-2019, 08:54 AM   #844
retro
Groupie
retro doesn't litterretro doesn't litterretro doesn't litter
 
Posts: 188
Karma: 245
Join Date: Aug 2009
Location: USA
Device: Kobo Clara Blue PRS 350
Quote:
Originally Posted by davidfor View Post
And I encourage everyone with a Kobo device to ask them to add a series list, just like they did for authors.
I will! My 9 year old sony did it with the pretty much same metadata plugboard. Seems like it would be a simple fix.
Thanks!
retro is offline   Reply With Quote
Old 12-18-2019, 09:52 AM   #845
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,975
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by davidfor View Post
And I encourage everyone with a Kobo device to ask them to add a series list, just like they did for authors.
Where is the best place to ask Kobo for enhancement requests?
JSWolf is online now   Reply With Quote
Old 12-18-2019, 10:04 AM   #846
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,975
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
@retro when you first add books to your Kobo, you have to eject the Kobo from the computer so the Kobo can finish updating the database.

Then you have to plug the Kobo back into the computer with Calibre active so it can populate the series. If you've not plugged your Kobo in a second time, your series info won't be there to sort by.
JSWolf is online now   Reply With Quote
Old 12-18-2019, 10:59 AM   #847
retro
Groupie
retro doesn't litterretro doesn't litterretro doesn't litter
 
Posts: 188
Karma: 245
Join Date: Aug 2009
Location: USA
Device: Kobo Clara Blue PRS 350
Quote:
Originally Posted by JSWolf View Post
@retro when you first add books to your Kobo, you have to eject the Kobo from the computer so the Kobo can finish updating the database.

Then you have to plug the Kobo back into the computer with Calibre active so it can populate the series. If you've not plugged your Kobo in a second time, your series info won't be there to sort by.
Yes, my sony is the same. Numerous connects doesn't change the Kobo series sort order under the author sort like sony does.
David and theducks explained that - (thank you, guys!).
retro is offline   Reply With Quote
Old 02-06-2020, 08:08 PM   #848
dcmarquardt
Junior Member
dcmarquardt doesn't litterdcmarquardt doesn't litter
 
dcmarquardt's Avatar
 
Posts: 8
Karma: 130
Join Date: Apr 2011
Device: Kindle
Lightbulb Yes/No Computed Column Based On Single Specific Format

I just wanted to share this here because I spent the last few hours trying to narrow down how to accomplish this...

Background: I recently converted my entire audiobook (multi-mp3 per book) collection into M4B's so that I could manage them with calibre following the "One File Per Book" pattern. (If anyone is interested in a decent way to batch-process that, feel free to PM me)... Once I loaded all of my M4B files into calibre, fixed up all the metadata, etc... it occurred to me that I would create a virtual library called "Audiobooks"... The search expression I used for that is: format:M4B. Easy enough. Now, some of the newly loaded audiobooks that I have, also have various e-book formats (epub, pdf, etc...) that I added to their calibre records for convenience.

Problem: I have a virtual library that shows me all of my audiobooks... that's great, but what if I'm browsing through them and want a specific one to read on my tablet? So I decided to add a custom column that would be called "Audio Only"... basically if the book has only a single format, and that format is equal to "M4B" in my case, then it would show yes, otherwise if there were additional formats available it would show no... or a check/x-mark as it ended up. I'm a software dev, so writing some code isn't anything new, but I was surprised that I couldn't find something out here already to have a simple if... this and this are true ... then 'yes' else 'no' ...

Solution:
I created a custom column template that displays a green check if the book is "Audio Only", and a red X if it has non-audio formats attached to it. Here's how:

Preferences -> Add your own columns -> Add

Lookup Name: onlyaudio
Column Heading: Audio Only
Column Type: Column built from other columns
Show checkmarks: Checked
Template:
Code:
program:cmp(count(template('[[format]]'), ','), 1, 'no', in_list(template('[[format]]'), ',', 'M4B', 'yes', 'no'), 'no')

---

This can be adapted to give you a yes/no column if the book contains only one specific format and no others... just paste that in there and replace the M4B with whatever format you want to single out... if it is the ONLY one present, the column will have a value of yes, otherwise no... you can swap those around as needed also to gain the desired result.

One possible improvement I may work on is in the event I someday store more than a single audio format inside calibre, in which case I would need to go through all of the formats and check them... at that point it becomes more complex because I could potentially have >1 formats but have them all be audio... I'll leave that one for another day.
dcmarquardt is offline   Reply With Quote
Old 03-14-2020, 04:26 PM   #849
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 723
Karma: 228142
Join Date: Sep 2017
Location: Argentina
Device: moon+ reader, kindle paperwhite
Hello people, I am looking for a way to put an icon in the column "Estado" if the column "V.Decimal" is empty. The column "V.Decimal" your query name in the custom columns is # gr1. I have tried with spreadsheets but I do not find the result someone could guide me. From already thank you very much
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	220
Size:	18.2 KB
ID:	177709   Click image for larger version

Name:	3.png
Views:	257
Size:	182.2 KB
ID:	177710  
dunhill is offline   Reply With Quote
Old 04-18-2020, 03:56 PM   #850
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 183
Karma: 266070
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Help: Composite column like 'authors'

Help, please! I dare say somebody has done this already, but my search hasn't found any example I can follow...
I have added to my library a column #aliases, to contain the pseudonym(s) of the book author(s), and I would wish to get it working the same as the 'authors' column: view as 'FN LN', but have it in the tag browser as 'LN, FN'.

I have got 'almost' there, by adding a 'column from other columns' #aliases_sort, to appear in the tag browser.

Hitch: after wrestling with the reference for template functions, the nearer I have got is:
{#aliases:sublist(-1,0, ), #aliases:sublist(0,-1, )}
which:
* fails down for names like 'Thomas J. Bassler, MD' and adds a comma after single names like 'Homerus'
* Would likely go haywire if applied to a multi-valued column, like 'Ivar Jorgensen & Mark Phillips'

So, instead of trying to reinvent the wheel, I come for help, **please**.
Many thanks!
carmenchu is offline   Reply With Quote
Old 04-27-2020, 03:20 PM   #851
OrangeFlavored
Enthusiast
OrangeFlavored doesn't litterOrangeFlavored doesn't litter
 
Posts: 34
Karma: 100
Join Date: Oct 2014
Device: Likebook Mars
Is there a way to create a column to list the number of items within the series that this book is a member of? I tried {series:count(,)} but that just displayed 1 for everything, not sure if I'm using it wrong or that function can't be used here.

Goal is to find and remove all series with only one member (an old holdover to when I was on a Kindle device where putting everything in a series made browsing through the series list easier, but not necessary anymore for my current device) so if there's an alternate means to do so that would also work. I thought about just batch unsetting the #1 entry from every series in my library (which seems like it could be accomplished easily enough with find/replace on batch metadata edit) and then manually going back and fixing it for all the ones that actually belong to a real series, but wondering if a better way exists.
OrangeFlavored is offline   Reply With Quote
Old 04-27-2020, 04:59 PM   #852
chaley
Grand Sorcerer
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: 11,741
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by carmenchu View Post
Help, please! I dare say somebody has done this already, but my search hasn't found any example I can follow...
I have added to my library a column #aliases, to contain the pseudonym(s) of the book author(s), and I would wish to get it working the same as the 'authors' column: view as 'FN LN', but have it in the tag browser as 'LN, FN'.

I have got 'almost' there, by adding a 'column from other columns' #aliases_sort, to appear in the tag browser.

Hitch: after wrestling with the reference for template functions, the nearer I have got is:
{#aliases:sublist(-1,0, ), #aliases:sublist(0,-1, )}
which:
* fails down for names like 'Thomas J. Bassler, MD' and adds a comma after single names like 'Homerus'
* Would likely go haywire if applied to a multi-valued column, like 'Ivar Jorgensen & Mark Phillips'

So, instead of trying to reinvent the wheel, I come for help, **please**.
Many thanks!
There isn't any way to do this reliably. What you are doing gets as close as one can.

I suggest you make a second column #aliases_sort, entering the value you want to see for the sort. That way it is correct. Unfortunately it means you must edit that field when you add a new book.

If there are multiple authors for a book then both the #aliases and the #aliases_sort should have "Contains names" checkbox checked.
Quote:
Originally Posted by OrangeFlavored View Post
Is there a way to create a column to list the number of items within the series that this book is a member of? I tried {series:count(,)} but that just displayed 1 for everything, not sure if I'm using it wrong or that function can't be used here.

Goal is to find and remove all series with only one member (an old holdover to when I was on a Kindle device where putting everything in a series made browsing through the series list easier, but not necessary anymore for my current device) so if there's an alternate means to do so that would also work. I thought about just batch unsetting the #1 entry from every series in my library (which seems like it could be accomplished easily enough with find/replace on batch metadata edit) and then manually going back and fixing it for all the ones that actually belong to a real series, but wondering if a better way exists.
There isn't any way to do this with the template language because it can see only one book. There could be (probably is) a tool in one of DaltonST's plugins that can do the computation for you. Another way: use the tag browser to find series with count == 1 then editing the series appropriately. To help with this, click on the "screwdriver/spanner" icon under the tag browser and set the sort to "Number of books"
chaley is offline   Reply With Quote
Old 04-29-2020, 04:21 AM   #853
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 183
Karma: 266070
Join Date: Dec 2010
Device: Win7,Win10,Lubuntu,smartphone
Quote:
Originally Posted by chaley View Post
There isn't any way to do this reliably. What you are doing gets as close as one can.

I suggest you make a second column #aliases_sort, entering the value you want to see for the sort. That way it is correct. Unfortunately it means you must edit that field when you add a new book.
Well, I managed to improve the 'alias sort' column a little (program mode):
Spoiler:
Code:
program:
# prepare the name
name = field('#altname');
# John Peter Smith, MD -> MD John Smith
prepname = swap_around_comma(name);
# Smith
firstname = sublist(prepname,-1,0,' ' );
# MD John Peter
lastname = sublist(prepname,0,-1,' ' );
# Smith, MD John Peter
sortname = strcat(firstname, ', ', lastname);
# Protect single-name cases, i.e., Homerus
# As this is the last function in the program, its value will be returned.
contains(name, ' ', sortname, name);

I post it just in case someone can think of an improvement--'first name + last name' can usually be copied and pasted (i.e., from wikipedia)--the bore is to change to 'sort mode'.
I think this kind of doubled columns 'as author' can come handy also for translators, illustrators...
carmenchu is offline   Reply With Quote
Old 05-14-2020, 09:23 PM   #854
LibBikher
Junior Member
LibBikher began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Jul 2015
Device: iPad mini with kindle app
New Column Help Please

I have one column that displays the asin (I figured out how to do this)

I would like to create a column that displays the file name of the book
And a column that compares the asin column and the file name column and retures 1 if the same and 2 if different

Can someone help me with this please. It has been a while since of used calibre.

thank you
LibBikher is offline   Reply With Quote
Old 05-15-2020, 12:59 AM   #855
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,568
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by LibBikher View Post
I have one column that displays the asin (I figured out how to do this)

I would like to create a column that displays the file name of the book
And a column that compares the asin column and the file name column and retures 1 if the same and 2 if different
Try this:
  1. Use the GetFileName plugin to put the file name in a custom column ('file') ==>> Index of plugins
  2. Put the ASIN into a composed custom column ('asin') using a template; something like this {identifiers:select(amazon)}
  3. In another composed custom column ('result') use the string compare (strcmp) function to compare 'file' and 'asin' and set the 'results' column value see ==>> calibre templates: Function classification

The names 'file', 'asin', and 'result' are illustrative.

BR
BetterRed is offline   Reply With Quote
Reply

Tags
custom column, tag, tags


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 08:45 AM.


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