Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 03-19-2016, 08:38 PM   #1
iatheia
Zealot
iatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmos
 
Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
Is it possible to make groupings based on number-based custom columns make a bit smarter? One of the columns that I have is the word count, to keep track of the length of the book. As you can imagine, very few books have exactly the same word count, though. So when I try open a drawer and look at the available options, I end up with a lot of entries such as "45342; 45344; 48500; 62001" etc. Having a library that is 1500+ books makes up for a lot of entries.

Realizing that there can be a lot of different types of number-based columns, perhaps a log based system would be more reasonable? So, leaving 1-9 as is, 10-99 would be in increments of 10, 100-999 would be in increments of 100, 10000 to 90000 would be in increments of 10000, etc.
iatheia is offline   Reply With Quote
Old 03-20-2016, 04:45 AM   #2
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,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by iatheia View Post
Is it possible to make groupings based on number-based custom columns make a bit smarter? One of the columns that I have is the word count, to keep track of the length of the book. As you can imagine, very few books have exactly the same word count, though. So when I try open a drawer and look at the available options, I end up with a lot of entries such as "45342; 45344; 48500; 62001" etc. Having a library that is 1500+ books makes up for a lot of entries.

Realizing that there can be a lot of different types of number-based columns, perhaps a log based system would be more reasonable? So, leaving 1-9 as is, 10-99 would be in increments of 10, 100-999 would be in increments of 100, 10000 to 90000 would be in increments of 10000, etc.
Turn on first-letter grouping for that column. That will give you a "layer" where the numbers are partitioned by 100s up to 10,000, then 1000s thereafter.

Depending how how you use the number, you might also want to turn on auto-sort for that column and show the numeric value in the list view (Settings / Customize the book list / Extra information in the book list). That would simplify scanning the values in a partition if you are looking for something in particular.
chaley is offline   Reply With Quote
Advert
Old 03-20-2016, 06:48 PM   #3
iatheia
Zealot
iatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmos
 
Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
Quote:
Originally Posted by chaley View Post
Turn on first-letter grouping for that column. That will give you a "layer" where the numbers are partitioned by 100s up to 10,000, then 1000s thereafter.

Depending how how you use the number, you might also want to turn on auto-sort for that column and show the numeric value in the list view (Settings / Customize the book list / Extra information in the book list). That would simplify scanning the values in a partition if you are looking for something in particular.
Eh, I would say that this is still an order of magnitude too small of a graduation (for example, if I want to scroll to anything longer than 10K words, I need to pass by up to 100 different categories with just a handful of books in each as opposed to just 10. Or, once you get past 100K, it makes no difference if it is 120K or 125K or even 150K, for example.
I do have all sorts of different sorting set up, and I do show a lot of info in the book list, but it would still be nice to be able to group everything a bit more effectively.
iatheia is offline   Reply With Quote
Old 03-21-2016, 03:53 AM   #4
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,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by iatheia View Post
Eh, I would say that this is still an order of magnitude too small of a graduation (for example, if I want to scroll to anything longer than 10K words, I need to pass by up to 100 different categories with just a handful of books in each as opposed to just 10. Or, once you get past 100K, it makes no difference if it is 120K or 125K or even 150K, for example.
I do have all sorts of different sorting set up, and I do show a lot of info in the book list, but it would still be nice to be able to group everything a bit more effectively.
The problem is that there is no single "right answer" for this. In some cases the values are clustered at the smaller end, and in some cases at the larger end.

When this feature was added back in 2014 the user community settled on this partitioning. Changing it now would change it for *everyone*, which isn't something I am at the moment prepared to do.
chaley is offline   Reply With Quote
Old 03-21-2016, 05:03 PM   #5
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,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
After some thought, I decided I am willing to entertain one alternate number grouping. It would be controlled by an option in Settings / Grouping Drawer.

The question: this alternate grouping should be exactly what? Number log 10? Some arbitrary ranges based on magnitude, such as by 10; 20; 50; 100; 200; 500; 1,000; 2,000; 5,000; 100,000; 200,000; 500,000; 1,000,000; 2,000,000; 5,000,000; 10,000,000, 100,000,000? Or something else? Do negative numbers need to be grouped differently? And so on.

Note that the range of a number in calibre is -1,000,000 to 100,000,000

Please comment if you have any interest. I don't want to end up here again.
chaley is offline   Reply With Quote
Advert
Old 03-21-2016, 09:56 PM   #6
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
I have a custom column of #pages and the values vary between about 100 and 2500. Most of them are between 200 - 500. None of them have negative values, . Others' values should differ.

So I think you will find it hard to entertain users by giving a fixed set of values. I personally only care for: Short, Medium, Long or Very Short, Short, Medium, Long, Very Long. If you can provide something like that and let user define by themselves the ranges of words or pages under each category, it would be nice.

And if I could achieve this in Calibre, I wouldn't need this feature added because it would show up anyway.

Edit: in Calibre I could achieve this by using "Saved Searches"

Last edited by nqk; 03-21-2016 at 10:38 PM.
nqk is offline   Reply With Quote
Old 03-22-2016, 06:34 AM   #7
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,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by nqk View Post
I have a custom column of #pages and the values vary between about 100 and 2500. Most of them are between 200 - 500. None of them have negative values, . Others' values should differ.

So I think you will find it hard to entertain users by giving a fixed set of values. I personally only care for: Short, Medium, Long or Very Short, Short, Medium, Long, Very Long. If you can provide something like that and let user define by themselves the ranges of words or pages under each category, it would be nice.

And if I could achieve this in Calibre, I wouldn't need this feature added because it would show up anyway.
You can do this in calibre in one of two ways
  • Use a column built from other columns (a composite column). The template would generate whatever text you want for whatever number range you want. It would a General Program Mode template that would use "first_non_empty" and "cmp". This has the advantage that it is in calibre proper. It has the disadvantage that the values wouldn't be visible in books fetched over the cloud connection until their metadata had been updated via the wireless device connection.
  • Use a calibre python script to fill in a custom column with the right values. You would run the script (automatically) every time calibre exits. This has the advantage that the values would be seen by the cloud connection. It has the disadvantage that it requires a real python program. That said, the program is small. I could give you some samples.
chaley is offline   Reply With Quote
Old 03-22-2016, 11:18 AM   #8
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
I think that is most proper. I could create a new custom column named #length with five preset text values, as stated above, then

1) Use saved search to isolate the books and change the Length values manually. Five groups. However, I would have to do this again upon new books. Hey, Count Pages plugin requires manual work anyway.

2) Or you could help with that python script to update the #length column automatically. Or, most ideally, both #pages and #length automatically.

I think it would resolve the issue.
nqk is offline   Reply With Quote
Old 03-23-2016, 02:18 AM   #9
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Looks good enough for me.

nqk is offline   Reply With Quote
Old 03-24-2016, 08:04 AM   #10
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,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@nqk: Now that the cloud connection fetches custom columns built from other columns, you can use a template that automatically computes the names.

One example template:
Code:
program:
val = field('#myint');
first_non_empty(
	cmp(val, 6, 'very small (0-5)', '', ''),
	cmp(val, 11, 'small (6-10)', '', ''),
	cmp(val, 16, 'medium (11-15)', '', ''),
	cmp(val, 21, 'large (16-20)', '', ''),
	'very large (>20)');
chaley is offline   Reply With Quote
Old 03-24-2016, 09:35 PM   #11
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Hic, I know nothing about codes.
The best I could do to this is:
Code:
program:
val = field('#pages');
first_non_empty(
	cmp(val, 6, 'very short (~90)', '', ''),
	cmp(val, 11, 'short (91-200)', '', ''),
	cmp(val, 16, 'medium (201-450)', '', ''),
	cmp(val, 21, 'large (451-1000)', '', ''),
	'very large (1001~)');
I don't understand the figures right after val.

In my case, #pages include number of pages.

I created a new custom column based on other column and pasted the code to the box underneath that. (I think I did it wrong).

Please correct me.

Edit: Forget it, I figured it out. . Done.
It became like this
Code:
program:
val = field('#pages');
first_non_empty(
	cmp(val, 90, 'Rất ngắn (~ 89)', '', ''),
	cmp(val, 250, 'Ngắn (90-249)', '', ''),
	cmp(val, 550, 'Vừa (250-549)', '', ''),
	cmp(val, 1200, 'Dài (550-1199)', '', ''),
	'Rất dài (1200 ~)');

Last edited by nqk; 03-25-2016 at 06:25 AM.
nqk is offline   Reply With Quote
Old 03-25-2016, 09:49 AM   #12
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,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by nqk View Post
Edit: Forget it, I figured it out. . Done.
It became like this
Code:
program:
val = field('#pages');
first_non_empty(
	cmp(val, 90, 'Rất ngắn (~ 89)', '', ''),
	cmp(val, 250, 'Ngắn (90-249)', '', ''),
	cmp(val, 550, 'Vừa (250-549)', '', ''),
	cmp(val, 1200, 'Dài (550-1199)', '', ''),
	'Rất dài (1200 ~)');
Excellent.
chaley is offline   Reply With Quote
Old 03-26-2016, 10:18 PM   #13
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Quote:
Originally Posted by chaley View Post
Excellent.
Thanks.

But it doesn't show as a group in Cloud Connection. Yes, local grouping is good.
nqk is offline   Reply With Quote
Old 03-27-2016, 06:13 AM   #14
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,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by nqk View Post
But it doesn't show as a group in Cloud Connection. Yes, local grouping is good.
That is true, because the values are not in the database. It takes from 1 to 4 seconds per book to fetch the metadata.db file to get the values, which can't be done on a general basis.

I am looking for alternatives. I have ideas, but I can't make any promises. For example, Kovid rejected my first try.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Explain Grouping KyBunnies Calibre Companion 5 12-31-2015 09:08 AM
Grouping by first letter of first name rather than last name Dopedangel Calibre Companion 7 05-18-2015 12:49 PM
Grouping Saved Searches phossler Editor 5 03-01-2015 10:40 AM
Author Grouping - Just numbers wetrix Calibre 2 08-14-2011 05:57 AM
Is there a hack for displaying page numbers rather than location numbers? nesler Kindle Developer's Corner 16 02-15-2011 12:00 AM


All times are GMT -4. The time now is 10:55 PM.


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