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-13-2020, 12:18 PM   #1
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,969
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Tag browser partitioning & letters

I thought of posting this on the bug tracker as an enhancement request but wanted to make sure it was plausible first.

Currently there's two ways to partition. Either by each individual letter or partitioned.

With first letter, you get a separate partition even if there's only one entry for that letter. With partitioned, you get a fixed amount of entries, but sometimes the first letters get split up.

Would it be very much effort to add a third way that's kind of a mix of the two? e.g. 0-9, A-D, E-H, I-J?. So that it has less partitions then first letter but doesn't split up the entries sharing a first letter.

EDIT: I also noticed this when using first-letter partitioning and I was half-hoping that this might also be a way to partition this by century or decade

Click image for larger version

Name:	2020-10-13 18_44_42-Window.png
Views:	235
Size:	16.8 KB
ID:	182700

Last edited by ownedbycats; 10-13-2020 at 05:46 PM.
ownedbycats is offline   Reply With Quote
Old 10-13-2020, 06:39 PM   #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,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
EDIT: I also noticed this when using first-letter partitioning and I was half-hoping that this might also be a way to partition this by century or decade

Attachment 182700
I thought I understood what you wanted until you made the edit. Are you asking to partition by arbitrary values depending on the category? It seems that you want to sometimes partition by multiple first letters if the number of items in the category is "small", and sometimes partition by something else (e.g., decades or 2 first letters). I think this might end up as specifying DWIM (Do What I Mean).

I might be able to add partitioning first letters, combining first letters to ensure that the number of items in the combination is at least X, giving what you suggested in your fourth paragraph. Your edit suggests doing different combinations depending on the field, which I am not willing to attempt.

If 'Year Published' is a composite column then I think you can solve your problem by making it hierarchical with the first level being the first 3 digits of the year followed by a zero, then '.' then the actual year. Examples: 2010.2015, 2010.2018, 2000.2006.
chaley is offline   Reply With Quote
Advert
Old 10-13-2020, 07:04 PM   #3
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,969
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I think "partition by multiple first letters is the number of items in the category is small" is closest to what I want. I mostly want to keep the entries that share the first letter grouped together instead of splitting them like the Partitioned does.

Year Published is a comp column pulled from the pubdate column. I'll poke around with the template and see if I can figure it out how to set that.

Last edited by ownedbycats; 10-13-2020 at 07:08 PM.
ownedbycats is offline   Reply With Quote
Old 10-13-2020, 07:21 PM   #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,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Year Published is a comp column pulled from the pubdate column. I'll poke around with the template and see if I can figure it out how to set it hierarchy.
Try making it hierarchical with a template like
Code:
program:
	x = format_date(field('pubdate'), 'yyyy');
	strcat(floor(divide(x, 10)), '0.', x)
chaley is offline   Reply With Quote
Old 10-13-2020, 07:31 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,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This template works better.
Code:
program:
	p = format_date(raw_field('pubdate'), 'yyyy');
	if p then
		strcat(re(p, '^(...).*', '\1'), '0.', p)
	fi
You probably want to turn off partitioning for this column.

Last edited by chaley; 10-13-2020 at 07:34 PM.
chaley is offline   Reply With Quote
Advert
Old 10-13-2020, 07:47 PM   #6
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,969
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I added an "else 'Unknown'" just before the fi and it works perfectly. Thank you
ownedbycats is offline   Reply With Quote
Old 10-14-2020, 12:01 PM   #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,443
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
With first letter, you get a separate partition even if there's only one entry for that letter. With partitioned, you get a fixed amount of entries, but sometimes the first letters get split up.

Would it be very much effort to add a third way that's kind of a mix of the two? e.g. 0-9, A-D, E-H, I-J?. So that it has less partitions then first letter but doesn't split up the entries sharing a first letter.
I added an option to tag browser first letter partitioning to combine letters if the number of items under a letter is less than some value you set. If you use this you will end up with single letters if the group of items is large enough, or with (e.g.) "A - F" if letter groups are combined. It is disabled by default (for the moment). It will be in the next release.

Thanks for the suggestion.
chaley is offline   Reply With Quote
Old 10-14-2020, 12:13 PM   #8
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,969
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Thank you!
ownedbycats is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to stop Tag Browser, Details and Cover Browser from showing on startup? stuartro Calibre 1 08-15-2016 11:53 PM
Sorting tag values in tag browser mcam Library Management 15 08-25-2013 05:50 AM
Help with tag browser partitioning Noughty Library Management 6 02-09-2012 09:42 AM
Tag Browser partitioning dasimser Calibre 2 01-03-2011 12:18 PM
Tag Browser & Series oldbwl Calibre 7 10-06-2010 04:58 PM


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


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