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 10-14-2015, 12:55 PM   #1
Heyou
Junior Member
Heyou began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2015
Device: iPad
Custom Column Sort

I store all my audiobooks in Calibre. I added a column for Narrator although I have to add the name manually because I don’t think any plugins pull that information from the file or the net.
My problem arose when I tried to add a column for the Length of the audiobook.
My preferred format is 12h23m and it works just fine in a text column except that it will not sort in order showing shortest to longest or vise versa. I had hoped that it would short in a numeric order starting with the hours, but it doesn’t. I have tried using the column as an integer instead of text and using the format of 12.23 which works for sorting.
Any ideas on how to short correctly in my preferred format?
Thanks.
Heyou is offline   Reply With Quote
Old 10-14-2015, 01:03 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
No -- you need to use a numeric value. There are no numeric column types suitable for displaying audiobook length.

Text values with numeric digits will still be sorted as text.
eschwartz is offline   Reply With Quote
Advert
Old 10-14-2015, 01:13 PM   #3
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: 30,897
Karma: 60358908
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 Heyou View Post
I store all my audiobooks in Calibre. I added a column for Narrator although I have to add the name manually because I don’t think any plugins pull that information from the file or the net.
My problem arose when I tried to add a column for the Length of the audiobook.
My preferred format is 12h23m and it works just fine in a text column except that it will not sort in order showing shortest to longest or vise versa. I had hoped that it would short in a numeric order starting with the hours, but it doesn’t. I have tried using the column as an integer instead of text and using the format of 12.23 which works for sorting.
Any ideas on how to short correctly in my preferred format?
Thanks.
Your problem is because it is a Text field and Text always uses Alpha Numeric sort rules

100h59m (biggest)
pad leading 0's to ALL to allow the largest number of Hours you foresee. Minutes must be 00-59 and it should sort
000h09m

Note: you should be able to use the S&R (a couple of passes in REGEX mode) to regularize your entries
NOT TESTED
^(\d)h(\d)m ;matches both with single digit from start of line
0\1h0\2m
theducks is offline   Reply With Quote
Old 10-14-2015, 01:41 PM   #4
Heyou
Junior Member
Heyou began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2015
Device: iPad
Smile

Thanks for the quick response.
the place holder zero's worked.
012h23m
Heyou is offline   Reply With Quote
Old 10-14-2015, 04:07 PM   #5
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: 21,619
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@Heyou - I use a custom column called duration/Duration of Column type Date with format 'mm:ss' to do this. For me it's not worth having 'hh:mm:ss' because very few of my audio/video 'books' run for more than hour.

Addendum - I just discovered it doesn't sort as one might hope it would - I never tried before now. Can't imagine why I would want to sort on it.

BR

Last edited by BetterRed; 10-14-2015 at 04:13 PM.
BetterRed is offline   Reply With Quote
Advert
Old 10-15-2015, 03:02 AM   #6
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: 12,336
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@BetterRed: try changing the tweak "Choose whether dates are sorted using visible fields" (ID: sort_dates_using_visible_fields).
chaley is offline   Reply With Quote
Old 10-15-2015, 04:45 AM   #7
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: 21,619
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by chaley View Post
@BetterRed: try changing the tweak "Choose whether dates are sorted using visible fields" (ID: sort_dates_using_visible_fields).
@chaley - dang me, works a treat - you guys think of everything - nearly

Cheers BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom COlumn: Author Sort - Series BzKevin Library Management 4 10-20-2014 09:27 AM
New Custom Column definition for new sort kaufman Calibre Companion 8 08-13-2014 10:54 AM
Manual Sort or Sort by custom column Dethmaul Marvin 2 04-28-2014 11:54 AM
Custom column returns value based on value of another custom column? calvin-c Calibre 3 09-14-2013 02:24 PM
Is it possible to sort a custom column like authors or title? arspr Library Management 2 03-15-2011 04:44 PM


All times are GMT -4. The time now is 11:33 AM.


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