Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 10-10-2016, 03:31 AM   #1
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,793
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
Yes/No column with 2 choice only

I have a yes no column for read and unread books. In calibre any new books that are added show up as unread. Where as in calibre companion those books show as blank till I actually I select no. I think this is because calibre keeps the choice blank till filled but shows it as no. Would it be possible to either force calibre to select no instead of blank as default or calibre companion to treat blank as no for a 2 state column.
Dopedangel is offline   Reply With Quote
Old 10-11-2016, 01:03 AM   #2
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,793
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
@Chaley any comments on this
Dopedangel is offline   Reply With Quote
Old 10-11-2016, 02:34 AM   #3
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Dopedangel View Post
I have a yes no column for read and unread books. In calibre any new books that are added show up as unread. Where as in calibre companion those books show as blank till I actually I select no. I think this is because calibre keeps the choice blank till filled but shows it as no. Would it be possible to either force calibre to select no instead of blank as default or calibre companion to treat blank as no for a 2 state column.
I assume that you are asking for two things:

1) that a custom 2-state column never show empty, using calibre's algorithm where empty columns are considered to be "No".

2) that when a 2-state calibre column is synced with the built-in isRead item, the isRead be set to "No" if the column would display as No. That is, both empty and No become No.

I will look at these. There are, as usual, complications.

Note that the second will have the side effect of when syncing isRead back to calibre, the column in calibre will be set to No, replacing an empty value.
chaley is offline   Reply With Quote
Old 10-11-2016, 03:13 AM   #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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
This is much more complicated than I hoped. Two-state columns are a calibre option, not an attribute of the column definition. CC doesn't have access to that option in either the content server or cloud connections. It could have access to it over the wireless device but it currently does not, and in any event is not a general solution.

I am not willing to (try to) change calibre to auto-set 2-state columns to No. This would behavior that has existed for years and could have unhappy knock-on effects.

One general solution would be to write another LibraryClosed plugin that checks the option. If it is set then the plugin fetches all the empty values and sets them to No. This scheme ensures that all of the connections see No instead of empty. The downside is that new values will be empty until the library is closed.

A second solution is to use bulk edit to set the value of all No columns explicitly to No. This has the downside of setting the last_modified date for the books. A variant of this is to use the "add tag to new books" feature. One would select all books with that tag, set the bool(s) to "No", and remove the tag.

A third solution is to set the bools to tri-state, then from time to time select all books with "false" values and set them to No. This avoids the last_modified problem. It also provides a visual indication that something needs to be done.

Personally, I would use the third solution, possibly combined with the first.
chaley is offline   Reply With Quote
Old 10-11-2016, 03:58 AM   #5
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,793
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
My main reason for needing this is that in calibre companion I get three options in grouping column. And so the yes no filter does not work.
A reminder or an option to set the state when using smart eject plugin would be good enough workaround for me. As I only need to set the state for the new books I add.
Dopedangel is offline   Reply With Quote
Old 10-11-2016, 05:27 AM   #6
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
Maybe you create another custom column to read the info from the read column. If "yes" then returns "Yes", else returns "No". Now you have a column with only Yes/No for the Companion.

But I have no idea how to formulate such template. I'm sure @chaley can help. He did give me two templates. .

I myself can only think of {#readstatus:contains(Yes, Yes, No)}

Last edited by nqk; 10-11-2016 at 05:35 AM.
nqk is offline   Reply With Quote
Old 10-11-2016, 06:28 AM   #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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by nqk View Post
Maybe you create another custom column to read the info from the read column. If "yes" then returns "Yes", else returns "No". Now you have a column with only Yes/No for the Companion.

But I have no idea how to formulate such template. I'm sure @chaley can help. He did give me two templates. .

I myself can only think of {#readstatus:contains(Yes, Yes, No)}
This idea could work in one of two ways.

Make a composite column (column built from other columns) with the template, replacing #mybool2 with the lookup name of your Yes/No column:
  1. Code:
    {#mybool2}
    This column converts the 2-state boolean to 3-state so you can easily see/search in calibre for which values need to be updated to "No".
  2. Code:
    {#mybool2:ifempty(No)}
    This column contains only the values Yes and No. There are no empty values. You would put this column into CC's grouping drawer, replacing the Yes/No column you already have there.
chaley is offline   Reply With Quote
Old 10-11-2016, 09:40 PM   #8
nqk
Fanatic
nqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beautynqk does all things with Zen-like beauty
 
Posts: 564
Karma: 32228
Join Date: Feb 2012
Device: Onyx Boox Leaf
I elaborated this idea as follows:

Input format of #readstatus: person (date). If I dropped reading of certain book, I just enter my name, like NQK!.

I created another composite column: {#readstatus:contains(NQK \(, Yes, {#readstatus:contains(NQK!, Dropped, Pending)})}

It works. . The result is a column with three values: Yes (books I have read), Pending (books I haven't read) and Dropped (books that I didnot finish intentionally).
Attached Thumbnails
Click image for larger version

Name:	screenshot.jpg
Views:	301
Size:	53.4 KB
ID:	152311  

Last edited by nqk; 10-12-2016 at 01:11 AM.
nqk is offline   Reply With Quote
Old 10-12-2016, 10:35 PM   #9
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,793
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
Well this still doesn't solve the bug in calibre companion where a 2 state column has 3 states.

Sent from my SM-G925I using Tapatalk
Dopedangel is offline   Reply With Quote
Old 10-13-2016, 04:56 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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Dopedangel View Post
Well this still doesn't solve the bug in calibre companion where a 2 state column has 3 states.
My post #7 above has two workarounds for this problem. The first makes it easier to find empty values in a 2-state boolean (yes/no) column by creating a 3-state composite column. The second creates a composite column with only 2 states, combining empty and No, that you can use in CC's grouping drawer instead of the original boolean column.
chaley is offline   Reply With Quote
Old 10-13-2016, 11:04 PM   #11
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,793
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
Quote:
Originally Posted by chaley View Post
My post #7 above has two workarounds for this problem. The first makes it easier to find empty values in a 2-state boolean (yes/no) column by creating a 3-state composite column. The second creates a composite column with only 2 states, combining empty and No, that you can use in CC's grouping drawer instead of the original boolean column.
Thanks that is a workable workaround but I prefer not to use composite columns because of the performance penalty. If I am unable to get any other workaround I will go with it. I checked with the author of smart eject plugin he says if I can search for it in calibre I can use it in smart eject. But #read:false includes the books that show up as empty in calibre companion so that is a sadly a bust as well.
Dopedangel is offline   Reply With Quote
Old 10-14-2016, 12:18 AM   #12
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,793
Karma: 30548723
Join Date: Dec 2006
Location: Singapore
Device: Boyue
After thinking about it the easiest option is for me is to probably to go with tri state column. As that will match calibre and calibre companion. And I will have a visual indicator that I need to change something.
Btw you are correct in not wanting to change how calibre used to work earlier as this would probably break stuff for other users. Maybe a tweak could work where you can set what you want the entry to be when a book is first added.That way the default for calibre wont change but people could have the option to change.
Dopedangel is offline   Reply With Quote
Old 10-14-2016, 12:55 PM   #13
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,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Your solution is what I was just going to suggest. That way you can use smart eject to find the books that need to be changed.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Single column ePUB becomes 2 column when converted to Kindle (mobi) rmcape Conversion 0 09-21-2013 12:52 PM
Using "Build column from other column" custom-column type HFC3 Library Management 3 07-07-2013 03:11 AM
how to move value(s) of tag column to a custom made column zoorakhan Library Management 0 12-08-2012 03:53 AM
Need help with programming a column based on previous data in the same column seaquay Library Management 2 06-13-2012 12:19 PM
Q: multi-column PDF to single column mobi format converstion auburn1975 Calibre 7 01-28-2012 06:11 PM


All times are GMT -4. The time now is 11:46 PM.


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