![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,011
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
Search by device?
Is there a way in calibre to search by device?
For instance, something like
Last edited by compurandom; 09-16-2020 at 05:17 AM. |
![]() |
![]() |
![]() |
#2 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 109
Karma: 194274
Join Date: Jun 2011
Location: Montreal
Device: Kobo, Calibre
|
With the Reading List add-on, create "auto populated list" for each device, in the column update section have: when changed, add/remove, #device = reader_name
#device:reader_name // on specific reader #device:true // on any reader Or instead just use the add-on to sync lists to a specific device... so a saved search would just be a reading list.. Make auto-pop lists with search: #sendto:any, kobo, kindle, etc JobSpy has an option to quickly tag books with: 1, #sendto=any, 2 #sendto=kobo, etc Example: Edit: (for any device have the list add only, not replace.) Last edited by uli; 09-16-2020 at 09:05 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,023
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:
What I do is put a tag in my #usertags column: "onKobo or onKindle" then use an and type search: Code:
ondevice:true and #usertags:onkobo |
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,011
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
Quote:
So what I really want is the list of books that use to be on the current device but have been deleted since last sync. Your suggestion works for one device, but what if I have two devices and want to have a single search for both devices that gives the deleted books for the current device. |
|
![]() |
![]() |
![]() |
#5 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,023
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
You moan and cry and bite the bullet and Tag (I chose to use a custom column, but nothing stops you from writing the to the normal {tags} )
Calibre does NOT store 'on device' once disconnected. and AFAIK the device ID (written in the root of the device as a speed up) is not available to us users either. |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,011
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
Quote:
I don't care about what isn't stored. What I want is a way to write a search that knows _which_ device is currently connected, and then compare against the correct tag or correct custom column or whatever. Also, I'm having problems with my tags getting randomly reset. It doesn't happen every time, so I can't figure it out. |
|
![]() |
![]() |
![]() |
#7 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,023
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The only 'reset' of tags I have seen is CASE can change if the imported (Add books) has it different. The 'tag' remains (calibre does not consider case when searching tags).
If your tags go away. Something you are doing is causing that to happen. Do watch out for the tag 'News", that can get auto cleaned (the content). |
![]() |
![]() |
![]() |
#8 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,011
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
I've just verified it.
I have a reading list that is * autopopulated from books on device * update column for add to list only The tag associated with this not always but usually gets deleted if the book isn't on the device but the tag was previously set. I guess "add to list only" doesn't mean that? |
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,023
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Ah! That is a PI action, not a (default) Calibre action.
You might ask in THAT plugin thread |
![]() |
![]() |
![]() |
#10 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,011
Karma: 500000
Join Date: Jun 2015
Device: Rocketbook, kobo aura h2o, kobo forma, kobo libra color
|
This still would be a lot easier if I could have a device sensitive search.
|
![]() |
![]() |
![]() |
#11 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,955
Karma: 4604435
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I agree with compurandom that search about 'column' like ondevice but containing a name for the connected device would be useful thing to have.
Unfortunately, grepping through the calibre code, there are a lot of places where 'ondevice' gets special treatment. Adding a new pseudo column would touch a lot of stuff. Alternative idea: Is there, or could there be, a template function that returns a device name? Then a custom column-from-columns could use the function to make it available in searches? compurandom: Is this all about device specific SmartEject searches, or do you have other use cases as well? |
![]() |
![]() |
![]() |
#12 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
![]() I was playing today and wrote a new template function that returns a comma-separated set of colon-separated items, like identifiers. If the book is not on-device the function returns the empty string. If a book is on-device it returns at least three key:data items. Two keys are always there: 'name' and 'count' with the obvious values. There will also be at least one of the keys 'main', 'carda', and 'cardb', telling you where the book is stored on the device. You can get more than one storage key if the book is on the device more than once. The value part of of a storage item is the UUID calibre assigned to the storage. Example: Code:
name:Folder Device, count:3, main:6e3f844e-bcd8-43c9-8a13-5e1dba3ccf1b You use the "select" function to get the data you are interested in. The funny thing: I decided not to commit the changes thinking that no one would use the function. Was I wrong? Would this function get used? |
|
![]() |
![]() |
![]() |
#13 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,955
Karma: 4604435
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
That does sound a lot like what I just described, yes.
![]() But I'm don't think it would cover what I was suggesting, because it only applies to books that are on the device. When searching for books that aren't on the device, there's nothing to tell you what device is attached. I was thinking of a function that would return something like what `self.gui.device_manager.get_current_device_inform ation().get('info', None)` does for all books when a device is attached. Is device manager accessible from a template function I wonder? |
![]() |
![]() |
![]() |
#14 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,681
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#15 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,416
Karma: 8012664
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Quote:
I could add a function that returns the connected device name, but it wouldn't be guaranteed to be the empty string for a time after a device disconnects. And yes, the device manager is visible to custom template functions. The reason I didn't commit the changes is manual intervention will always be needed to make the information permanent (stored in a custom column). Doing it automatically would require a plugin that gets signaled when a device connects and disconnects. The plugin would update a tags-like custom column with something like "device_name:yes" or "device_name:no". |
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple same book on device: which search expression? | un_pogaz | Library Management | 3 | 12-29-2018 11:50 AM |
Aura Can't search bookstore on my device | MV89 | Kobo Reader | 9 | 11-29-2013 05:21 PM |
Search for Books on Device | random43743 | Calibre | 3 | 04-23-2011 10:44 AM |
search for books not on device | alansplace | Calibre | 2 | 01-05-2011 01:07 PM |
Search restriction bug when device is plugged in | Manichean | Calibre | 6 | 09-11-2010 04:52 PM |