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 04-10-2020, 04:08 PM   #1
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Question Stumped with tag browser problem

The user manual does not quite address my specific question. I've also had no luck with searches here in the archives, or perhaps I am using incorrect keywords. (most likely I am the only dummy posting the question)

If one has an existing custom column, such as "Finished" for books read, is it possible to edit the column to allow inclusion in the tag browser? I think my problem is due to the "column type" being "date" which does not offer the option of a checkbox to "show in tag browser" as other column types provide. I already have a fair number of books which have the "#finished" with date assigned. Is it not possible to edit this column after the fact? (still using v3.48)

I would be most appreciative to be pointed in the right direction by someone in the know.

Many thanks,
Patricia
Skydog is offline   Reply With Quote
Old 04-10-2020, 05:46 PM   #2
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Skydog View Post
The user manual does not quite address my specific question. I've also had no luck with searches here in the archives, or perhaps I am using incorrect keywords. (most likely I am the only dummy posting the question)

If one has an existing custom column, such as "Finished" for books read, is it possible to edit the column to allow inclusion in the tag browser? I think my problem is due to the "column type" being "date" which does not offer the option of a checkbox to "show in tag browser" as other column types provide. I already have a fair number of books which have the "#finished" with date assigned. Is it not possible to edit this column after the fact? (still using v3.48)

I would be most appreciative to be pointed in the right direction by someone in the know.

Many thanks,
Patricia
Once a column type is set it cannot it changed.

My simple suggestion is to create a Finished virtual library with a search expression of #finished:true.

Take care

BR
BetterRed is offline   Reply With Quote
Advert
Old 04-10-2020, 05:52 PM   #3
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
@BetterRed:

I was afraid of that. It would have been smart to ask before creating the column.

Thank you for your suggestion.
Skydog is offline   Reply With Quote
Old 04-10-2020, 07:55 PM   #4
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,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Date is not a Tag browser type.

To MOVE (optional set a new type) values to a new column
Create the new column
Use Bulk mode Search & replace to convert/transfer copy to the new column
the delete the old column ONCE YOU ARE SURE it got everything. There is no UNDO,, (only restore from a a backup)
theducks is offline   Reply With Quote
Old 04-10-2020, 08:29 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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Entering dates into a text field is cumbersome and unlikely to be consistently formatted, whereas entering Today into a book list date cell is three keystrokes -- F2, '=', Enter.

If the OP has to have Finished in the Tag Browser it would be better to create a composite column of type text shown in tag browser with program mode template that set it to "Finished" if the #finished column had a value.

BR
BetterRed is offline   Reply With Quote
Advert
Old 04-10-2020, 08:48 PM   #6
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
@theducks- thank you for the suggestion. While that would solve the problem of transferring existing data, I think BetterRed is correct suggesting dates entered into a text field may be problematic. But certainly doable.

@BetterRed- this sounds like a possibility. If I understand correctly, creating a composite column as you describe would automatically fill the same existing entries (with a value) to the new column? I know nothing about program mode templates and will need to read the manual. I don't know what I don't know...
Skydog is offline   Reply With Quote
Old 04-10-2020, 09:42 PM   #7
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Based on the reference I located (below), what template would I write if, for example, I currently have an existing "Finished" column (date), #finished lookup, and want to create a new composite column referencing the "Finished" column with its dates intact? I realize the example below is a slightly different situation but I still cannot figure out how to extract what I need. I am not a programmer, nor care to be. Thank you!

Beginning with an example, assume that you want your template to show the series for a book if it has one, otherwise show the value of a custom field #genre. You cannot do this in the basic language because you cannot make reference to another metadata field within a template expression. In program mode, you can. The following expression works:
{#series:'ifempty($, field('#genre'))'}

The example shows several things:
  • program mode is used if the expression begins with :' and ends with '. Anything else is assumed to be single-function.
  • the variable $ stands for the field the expression is operating upon, #series in this case.
Skydog is offline   Reply With Quote
Old 04-10-2020, 11:58 PM   #8
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I always have to hack at program mode templates. I'll come back if/when I figure it out.

Meantime there might be something this sticky thread ==>> Plugboard, template, and custom composite column recipes

Or maybe one of the template wizards will drop by.

BR
BetterRed is offline   Reply With Quote
Old 04-11-2020, 12:11 AM   #9
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Thanks very much. I'll head over to the sticky.
Skydog is offline   Reply With Quote
Old 04-11-2020, 01:22 AM   #10
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
You can try (with a change of the column. I'm using the Date column here as it is in all libraries):

Code:
program:
format_date(raw_field('timestamp'),'yyyy-MM-dd')
But, I doubt if it will do what you really want. And that what is missing in the thread.

What are you actually trying to achieve? It is one thing to put the column in the tag browser, but, that's pretty pointless if all values are unique. And, as the date is stored as a timestamp, it will probably be fairly unique. And while the above would show an entry for each day, how many books do you finish on a single day? For my main library, there will be plenty of days that don't have an entry, and very few that have more than one. I do have a library that is basically short stories. That can have multiple books finished on a day.

The useful thing I can think of is to see a tree in the tag browser to to group based on the elements in the date. That way you could then get an entry for the year, with sub entries for the month and then day. The counts at each level would show how many books were finished in that time period. For this:

Code:
program:
format_date(raw_field('timestamp'),'yyyy.MM.dd')
And set the column as one that is a hierarchical item (Preferences, Look & Feel, Tag browser). You might also need to look at the category partitioning used.

But, I think I'd go with:

Code:
program:
format_date(raw_field('timestamp'),'yyyy.MM')
As I'm not sure the day is useful here.

The date formatting string can be changed to use month names ("MMM" for abbreviations such as "Apr" or "MMMM" for the full name), but, they mess up the sorting.

The above should give you some ideas. But, if you are after something else, then you need to explain what it is you are trying to achieve.
davidfor is offline   Reply With Quote
Old 04-11-2020, 06:08 AM   #11
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@skydog - I'll step aside for now and let you sort it out with David.

BR
BetterRed is offline   Reply With Quote
Old 04-11-2020, 12:12 PM   #12
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
@davidfor-

Thank you for your time offering options and their explanations. I had no idea there were so many possibilities for a simple task!

My objective is to display a running total (total number of books read) in the tag browser that exist in my custom "read" column. Of course, I can search, sort, or create a virtual library (with thanks to BetterRed) but I simply want to add an entry similar to what exists now displaying totals to the right similar to "authors," "formats," "publishers," etc. The current "read" column is not a composite column. (I only learned what that was during this thread)

If I create a new composite column, type: "Column built from other columns," how do I point it to the existing "read" (type: date) column? What is needed in the template to simply acquire the total of the "read" column? I do not need any other information, just a total.

Many thanks,

Patricia
Skydog is offline   Reply With Quote
Old 04-11-2020, 08:56 PM   #13
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,722
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
FYI - if you create a Finished virtual library as I first suggested, when you switch to it the total is displayed in the status line, viz:

Click image for larger version

Name:	Annotation 2020-04-12 105228.jpg
Views:	68
Size:	307.7 KB
ID:	178310

BR
BetterRed is offline   Reply With Quote
Old 04-11-2020, 09:45 PM   #14
Skydog
Wizard
Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.Skydog ought to be getting tired of karma fortunes by now.
 
Skydog's Avatar
 
Posts: 2,286
Karma: 7409537
Join Date: Mar 2009
Location: Circling Earth @ Mach .83
Device: Elipsa 2E, Sage, Libra Colour, Libra 2, Clara 2E, Oasis3, Voyage
Thank you, BetterRed. I did indeed create a virtual Library when you first suggested it and I am aware of the status line. As I mentioned in my reply to davidfor, I would like to have the info displayed in the tag browser, just as I do now with authors, formats, publishers, tags, etc., without any action required from me. I just don't know what is required in the template.
Skydog is offline   Reply With Quote
Old 04-12-2020, 07:43 AM   #15
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by Skydog View Post
My objective is to display a running total (total number of books read) in the tag browser that exist in my custom "read" column. Of course, I can search, sort, or create a virtual library (with thanks to BetterRed) but I simply want to add an entry similar to what exists now displaying totals to the right similar to "authors," "formats," "publishers," etc. The current "read" column is not a composite column. (I only learned what that was during this thread)

If I create a new composite column, type: "Column built from other columns," how do I point it to the existing "read" (type: date) column? What is needed in the template to simply acquire the total of the "read" column? I do not need any other information, just a total.
One of the versions of code I posted should do what you want. You need to change the name of the column it uses to your column. That means changing where I have "timestamp" to "#finished". Then in the definition of the column, tick the "Show in Tag browser" option. That will show an entry for the new column with the count of books with a value in it. But, that number isn't the number of books that have a value in that column (and hence in #finished). It is the number of different values in the column. Clicking the heading in the tag browser will show the books with a value in it, and show the count of books in the status area at the bottom of the calibre window.
davidfor is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Selection problem in the tag browser Danyx Calibre 2 01-22-2019 01:51 PM
Problem when using tag browser to rename series JohnnyBook Library Management 3 06-24-2018 04:22 PM
How to stop Tag Browser, Details and Cover Browser from showing on startup? stuartro Calibre 1 08-15-2016 11:53 PM
Problem with Tag Browser Custom Icon for Languages MartyTX Library Management 1 02-03-2013 03:44 AM
Problem with Topics Displayed in the Tag Browser of Various Libraries Lady Fitzgerald Library Management 5 03-01-2011 01:00 PM


All times are GMT -4. The time now is 09:49 AM.


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