|
|
#1 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Nokia N9
|
Greetings!
I'm trying to do a new category for my collection: "Year Published". I don't know how to do it. I got error when I tried, but I did manage to make a 'genre' -category. - It should get the values from Published -field, if one exists. - No need to have month / day. I'd like it to look like this: >Year > ??? [No year found] Is this doable? Thanks.
> ... > 1980 > 1981 > ... > 2020 > $Author |
|
|
|
|
|
#2 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 244
Karma: 291844
Join Date: Oct 2019
Device: Kobo Nia
|
Is this what you had in mind
How to make calibre published date only years not m+y |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Nokia N9
|
Almost. I forgot to say that I want it to be applied into the "tag browser".
|
|
|
|
|
|
#4 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 244
Karma: 291844
Join Date: Oct 2019
Device: Kobo Nia
|
Sorry no idea how to do that part. Hopefully some one else will be along who does know how.
|
|
|
|
|
|
#5 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,031
Karma: 30277294
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@iksi - dates and numbers don't appear in the Tag Browser
But something like this should work - untested You will probably have to do some formatting in the template to extract the year only, see ==>> The calibre template language BR Last edited by BetterRed; 10-04-2020 at 05:42 PM. Reason: Wrong image |
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 110
Karma: 194274
Join Date: Jun 2011
Location: Montreal
Device: Kobo, Calibre
|
I found this fancier version grouped by decades:
Code:
{pubdate:'test($,
strcat(substr(format_date($,'yyyy'), 0, 1), '000.',substr(format_date($,'yyyy'), 0, 3), '0.',format_date($,'yyyy')),
'Unknown')'}
Last edited by uli; 10-04-2020 at 07:18 PM. Reason: Tips |
|
|
|
|
|
#7 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 923
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
I do not have it so complete but it gives me the same result. We go to Preferences / Add Custom columns and create a column generated from another column and in the template add the formula described in the image. We accept and restart Calibre.
|
|
|
|
|
|
#8 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Nokia N9
|
Thanks for the suggestions
.uli's suggestion gives these weird "1000.1000.1000" sets? They seem to be grouped correctly, but the format is odd. dunhill's suggestion gives me "Unknown Function". I have version 5.0.1 running on the latest Ubuntu. Maybe there've been some changes? |
|
|
|
|
|
#9 |
|
Interested in the matter
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
|
I have created a text column to have the year of the original publication.
In principle I fill it with the pubdate date, and then I correct it if necessary in cases like these: Dates before our era: -150 Books containing several works with a date range: 1850-65 Hence the need for it to be a text column. |
|
|
|
|
|
#10 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,525
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
This template produces what you want
Code:
{pubdate:'ifempty(format_date($, 'yyyy'), '???')'}
|
|
|
|
|
|
#11 |
|
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 110
Karma: 194274
Join Date: Jun 2011
Location: Montreal
Device: Kobo, Calibre
|
Forgot you need to set it to hierarchical, also I think you might need to remove partitions for that category.
|
|
|
|
|
|
#12 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Nokia N9
|
Thank you everyone!
chaley's method works and is simple enough for me to understand.
|
|
|
|
|
|
#13 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 923
Karma: 810834
Join Date: Sep 2017
Location: Buenos Aires, Argentina
Device: moon+ reader, kindle paperwhite
|
I have modified the syntax to my liking being like this.
{pubdate:'test($, strcat(format_date($,'yyyy')), 'Dateless')'} Last edited by dunhill; 10-06-2020 at 05:24 PM. |
|
|
|
|
|
#14 | |
|
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,364
Karma: 79528341
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
Quote:
However searching for #yearpublished:"=Unknown" just results in the search bar turning red even though there's 145 books. Did I make mistake?
Last edited by ownedbycats; 10-07-2020 at 08:10 PM. |
|
|
|
|
|
|
#15 | |
|
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,271
Karma: 61916422
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
I think unknown is just a visual representation for a 'not set' field value |
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Putting sideloaded book in the Books category instead of Docs category | hopla | Amazon Kindle | 5 | 10-29-2018 07:40 PM |
| Category different | millerlee | Calibre | 2 | 06-28-2017 02:44 AM |
| ''Month Year'' possible only ''Year'' + ''uri'' to ''url'' | chaot | Recipes | 2 | 11-30-2012 01:06 PM |
| category filter | arvalin | Library Management | 10 | 03-26-2011 06:49 PM |
| PDF Category | ktj | Library Management | 7 | 03-19-2011 11:22 AM |