|  10-13-2020, 12:18 PM | #1 | 
| Custom User Title            Posts: 11,341 Karma: 79528341 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  Last edited by ownedbycats; 10-13-2020 at 05:46 PM. | 
|   |   | 
|  10-13-2020, 06:39 PM | #2 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 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. | |
|   |   | 
|  10-13-2020, 07:04 PM | #3 | 
| Custom User Title            Posts: 11,341 Karma: 79528341 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. | 
|   |   | 
|  10-13-2020, 07:21 PM | #4 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 Code: program:
	x = format_date(field('pubdate'), 'yyyy');
	strcat(floor(divide(x, 10)), '0.', x) | |
|   |   | 
|  10-13-2020, 07:31 PM | #5 | 
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 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)
	fiLast edited by chaley; 10-13-2020 at 07:34 PM. | 
|   |   | 
|  10-13-2020, 07:47 PM | #6 | 
| Custom User Title            Posts: 11,341 Karma: 79528341 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 | 
|   |   | 
|  10-14-2020, 12:01 PM | #7 | |
| Grand Sorcerer            Posts: 12,525 Karma: 8065948 Join Date: Jan 2010 Location: Notts, England Device: Kobo Libra 2 | Quote: 
 Thanks for the suggestion.   | |
|   |   | 
|  10-14-2020, 12:13 PM | #8 | 
| Custom User Title            Posts: 11,341 Karma: 79528341 Join Date: Oct 2018 Location: Canada Device: Kobo Libra H2O, formerly Aura HD | 
			
			Thank you!
		 | 
|   |   | 
|  | 
| 
 | 
|  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 |