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-04-2020, 01:07 PM   #1
iksi
Junior Member
iksi began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Nokia N9
Question How to do a Year Category?

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]
> ...
> 1980
> 1981
> ...
> 2020
> $Author
Is this doable? Thanks.
iksi is offline   Reply With Quote
Old 10-04-2020, 01:25 PM   #2
georgemk
Addict
georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.
 
Posts: 243
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
georgemk is offline   Reply With Quote
Advert
Old 10-04-2020, 01:38 PM   #3
iksi
Junior Member
iksi began at the beginning.
 
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".
iksi is offline   Reply With Quote
Old 10-04-2020, 02:52 PM   #4
georgemk
Addict
georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.georgemk ought to be getting tired of karma fortunes by now.
 
Posts: 243
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.
georgemk is offline   Reply With Quote
Old 10-04-2020, 04:12 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,715
Karma: 29711016
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

Click image for larger version

Name:	Screenshot 2020-10-05 074117.jpg
Views:	183
Size:	53.5 KB
ID:	182455

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 04:42 PM. Reason: Wrong image
BetterRed is offline   Reply With Quote
Advert
Old 10-04-2020, 06:06 PM   #6
uli
Zealot
uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.
 
Posts: 109
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')'}
Tip: don't forget you can click twice on a node to see all that decade, century
Attached Thumbnails
Click image for larger version

Name:	year.png
Views:	117
Size:	32.4 KB
ID:	182457  

Last edited by uli; 10-04-2020 at 06:18 PM. Reason: Tips
uli is offline   Reply With Quote
Old 10-04-2020, 06:38 PM   #7
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 891
Karma: 409970
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.
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	101
Size:	20.5 KB
ID:	182458   Click image for larger version

Name:	2.jpg
Views:	114
Size:	127.2 KB
ID:	182459  
dunhill is offline   Reply With Quote
Old 10-05-2020, 12:00 AM   #8
iksi
Junior Member
iksi began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Nokia N9
Thanks for the suggestions , but so far, I can't get them to work .

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?
Attached Thumbnails
Click image for larger version

Name:	calib1.jpg
Views:	102
Size:	22.6 KB
ID:	182471   Click image for larger version

Name:	calib2.jpg
Views:	91
Size:	6.3 KB
ID:	182472  
iksi is offline   Reply With Quote
Old 10-05-2020, 03:21 AM   #9
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
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.
Attached Thumbnails
Click image for larger version

Name:	Captura1.PNG
Views:	103
Size:	16.2 KB
ID:	182474   Click image for larger version

Name:	Captura2.PNG
Views:	101
Size:	62.9 KB
ID:	182475  
jbacelar is offline   Reply With Quote
Old 10-05-2020, 05:41 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,440
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This template produces what you want
Code:
{pubdate:'ifempty(format_date($, 'yyyy'), '???')'}
put it in a 'Column built from other columns', Check the "Show in tag browser' box. Set the "Search/sort column" type to numeric.
chaley is offline   Reply With Quote
Old 10-05-2020, 08:28 AM   #11
uli
Zealot
uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.uli can program the VCR without an owner's manual.
 
Posts: 109
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.
Attached Thumbnails
Click image for larger version

Name:	hierarchical.png
Views:	110
Size:	28.3 KB
ID:	182480  
uli is offline   Reply With Quote
Old 10-05-2020, 11:35 AM   #12
iksi
Junior Member
iksi began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Oct 2020
Device: Nokia N9
Smile

Thank you everyone!

chaley's method works and is simple enough for me to understand.
iksi is offline   Reply With Quote
Old 10-06-2020, 04:22 PM   #13
dunhill
Guru
dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.dunhill ought to be getting tired of karma fortunes by now.
 
dunhill's Avatar
 
Posts: 891
Karma: 409970
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')'}
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	99
Size:	27.6 KB
ID:	182513  

Last edited by dunhill; 10-06-2020 at 04:24 PM.
dunhill is offline   Reply With Quote
Old 10-07-2020, 06:56 PM   #14
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,948
Karma: 74999999
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by dunhill View Post
I have modified the syntax to my liking being like this.
{pubdate:'test($,
strcat(format_date($,'yyyy')),
'Dateless')'}
I liked the idea of years in the tag browser so I added this one as a custom column (though with 'unknown' instead of 'dateless').

Click image for larger version

Name:	2020-10-07 19_55_36-Edit custom column.png
Views:	183
Size:	15.6 KB
ID:	182538

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 07:10 PM.
ownedbycats is online now   Reply With Quote
Old 10-07-2020, 08:02 PM   #15
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: 31,038
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 ownedbycats View Post
I liked the idea of years in the tag browser so I added this one as a custom column (though with 'unknown' instead of 'dateless').

Attachment 182538

However searching for #yearpublished:"=Unknown" just results in the search bar turning red even though there's 145 books. Did I make mistake?
Try #yearpublished:false
I think unknown is just a visual representation for a 'not set' field value
theducks is offline   Reply With Quote
Reply


Forum Jump

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 06:40 PM
Category different millerlee Calibre 2 06-28-2017 01:44 AM
''Month Year'' possible only ''Year'' + ''uri'' to ''url'' chaot Recipes 2 11-30-2012 12:06 PM
category filter arvalin Library Management 10 03-26-2011 05:49 PM
PDF Category ktj Library Management 7 03-19-2011 10:22 AM


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


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