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 06-09-2021, 11:01 PM   #1
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,837
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Is there a way to add a boolean value to a User Category?

Saved search for #bool didn't show up in the item list.

Context: I combined Kobo collections and reading lists into a user category. I also want to add #onkobo:yes.

Last edited by ownedbycats; 06-09-2021 at 11:08 PM.
ownedbycats is offline   Reply With Quote
Old 06-10-2021, 04:15 AM   #2
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,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Saved search for #bool didn't show up in the item list.

Context: I combined Kobo collections and reading lists into a user category. I also want to add #onkobo:yes.
No. Only items that can appear in the tag browser can be added to a user category.

If this is important enough then you can do it using a composite column that displays #onkobo and has "Show in tag browser" checked.
chaley is offline   Reply With Quote
Advert
Old 06-10-2021, 11:08 AM   #3
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,837
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Technically, my saved search appears in the tag browser. Composite column ought to work though. thank you.
ownedbycats is offline   Reply With Quote
Old 06-10-2021, 12:04 PM   #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,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Technically, my saved search appears in the tag browser.
chaley is offline   Reply With Quote
Old 06-12-2021, 10:53 AM   #5
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,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
BTW: another way to solve this problem is to change from using user categories to a tags-like composite column, where the column computes the "names" of all "user categories" the book would be in. Of course, for this solution to work the names must be computable (not arbitrary), but given that they come from saved searches that shouldn't be a problem.
chaley is offline   Reply With Quote
Advert
Old 06-12-2021, 11:10 AM   #6
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,837
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
I'm working on making a new column, #kobostatus. I just borrowed the template from my column icon. (I am planning to change the icons to pull from #kobostatus once I got it working.)

Code:
program:

k = $#kobocoll;

if check_yes_no('#onkobo', 0, 1, 0) then 'Send to Device'
elif check_yes_no('#onkobo', 0, 0, 1) then
	if list_contains(k, ',', '^Kobo Store$', '1', '') then 'Kobo Store'
	elif list_contains(k, ',', '^Send to Device$', '1', '') then 'Send to Device'
	else 'Sideloaded'
	fi
fi
Unfortunately, while it works in the tester, in the column itself it just outputs TEMPLATE ERROR Formatter: Unknown function list_contains near 'list_contains' on line 7.
ownedbycats is offline   Reply With Quote
Old 06-12-2021, 11:17 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,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Apparently there is a bug in column evaluation where function aliases are ignored. I haven't figured out yet why.

You can fix it by using the original name 'in_list' instead of the alias 'list_contains'.
chaley is offline   Reply With Quote
Old 06-12-2021, 11:44 AM   #8
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,837
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
This worked

Code:
program:

k = $#kobocoll;

if check_yes_no('#onkobo', 0, 1, 0) then 'Send to Device'
elif check_yes_no('#onkobo', 0, 0, 1) then
    if 'Kobo Store' in k then 'Kobo Store'
	elif 'Send to Device' in k then 'Send to Device'
	else 'Sideloaded'
	fi
fi
Ideally I'd want to change it to an exact match '^Kobo Store$', but I forgot how to make it use a regexp and it's not likely to overlap any of my other collections anyways.

Last edited by ownedbycats; 06-12-2021 at 11:51 AM.
ownedbycats is offline   Reply With Quote
Old 06-12-2021, 11:54 AM   #9
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,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
This worked

Code:
program:

k = $#kobocoll;

if check_yes_no('#onkobo', 0, 1, 0) then 'Send to Device'
elif check_yes_no('#onkobo', 0, 0, 1) then
    if 'Kobo Store' in k then 'Kobo Store'
	elif 'Send to Device' in k then 'Send to Device'
	else 'Sideloaded'
	fi
fi
Ideally I'd want to change it to an exact match '^Kobo Store$', but I forgot how to make it use a regexp and it's not likely to overlap any of my other collections anyways.
Is #kobocol tags-like? If so you should use 'inlist' instead of 'in'.
chaley is offline   Reply With Quote
Old 06-12-2021, 11:56 AM   #10
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,837
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Oh I'll fix that then
ownedbycats is offline   Reply With Quote
Old 06-12-2021, 12:04 PM   #11
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,837
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Also added one for borrowed books

Code:
program:

k = $#kobocoll;

if check_yes_no('#onkobo', 0, 1, 0) then 'Send to Device'
elif check_yes_no('#onkobo', 0, 0, 1) then
    if 'Kobo Store' inlist k then 'Kobo Store'
	elif 'Loans' inlist k then 'On Loan'
	elif 'Send to Device' inlist k then 'Send to Device'
	else 'Sideloaded'
	fi
fi
Since I'm here anyways: Is there a way to automatically add any new items from a column to a user category? Thankfully, more transient items (e.g. "send to device") are just marked as 'not on any book' when not in use so I won't need to keep re-adding those.

Last edited by ownedbycats; 06-12-2021 at 07:16 PM.
ownedbycats is offline   Reply With Quote
Old 06-12-2021, 06:07 PM   #12
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,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by ownedbycats View Post
Since I'm here anyways: Is there a way to automatically add any new items from a column to a user category? Thankfully, more transient items (e.g. "send to device") are just marked as 'not on any book' when not in use so I won't need to keep re-adding those.
If I understand correctly, if you add (for example) a new tag 'foo' then you want all books with that item added automatically to a user category. No, this isn't possible. Also, I don't see why bother trying to build it (I won't) as it would be duplicating what happens with categories.

If you can specify the rules then you should be able to do what you want with a composite column that generates a hierarchical tags-like value. The first level would be the category name (the 'user category') and the second level would be the category value. These would show in the tag browser as a tree of values inside categories.
chaley is offline   Reply With Quote
Old 06-12-2021, 07:14 PM   #13
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,837
Karma: 74203799
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
That makes sense. Anyways, I got it all set up the way I wanted. I even found that Job Spy's tag browser icons applied to #kobostatus will copy over to the user category.

Click image for larger version

Name:	2021-06-12 20_10_57-Window.png
Views:	106
Size:	7.7 KB
ID:	187646
ownedbycats is offline   Reply With Quote
Old 06-13-2021, 09:55 AM   #14
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,380
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by chaley View Post
Apparently there is a bug in column evaluation where function aliases are ignored. I haven't figured out yet why.
This problem is now fixed in source.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Move a user Sub-Category into another Category groob Library Management 5 06-09-2021 10:22 AM
Add new category to MyShelves, how? bartveld Calibre 16 04-07-2019 03:07 AM
User Category Help rdyornot Library Management 0 10-10-2017 07:29 PM
Need Help with User Category Plugin ommaandnugs Plugins 0 05-11-2014 02:56 PM
Possible new feature: Adding a r/c menu option to add to user category items kiwidude Calibre 29 11-30-2010 09:14 AM


All times are GMT -4. The time now is 08:56 PM.


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