05-09-2015, 05:57 AM | #1 |
Enthusiast
Posts: 28
Karma: 10
Join Date: Oct 2010
Device: iPad / Kindle DX
|
Getting IDs of books selected in the GUI
Is there a direct way to get through the CLI the IDs of the books currently selected in the GUI?
Today, my workaround involves a custom Yes/No column whose lookup name is "current". In the GUI, I set to "Yes" the value for that column of the selected files. Then, running the following command in the CLI returns the IDs that I want: Code:
calibredb list -w 1000 -s '#current:"Yes"' | sed -n 's_^\([[:digit:]]\+\) .*_\1_p' Many thanks! W. |
05-09-2015, 06:12 AM | #2 |
creator of calibre
Posts: 43,835
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
No, there's no way to query the state of the GUI from the CLI. You could if you wish write a GUI plugin that exposes whatever state you like via a socket, but there is no builtin way to do that.
|
Advert | |
|
05-09-2015, 06:12 AM | #3 | |
Grand Sorcerer
Posts: 11,731
Karma: 6690881
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
A GUI plugin can see the selection and do almost arbitrary things with it. For example, you might be able to modify the open-with plugin to run cli commands on books. |
|
05-09-2015, 06:23 AM | #4 |
Enthusiast
Posts: 28
Karma: 10
Join Date: Oct 2010
Device: iPad / Kindle DX
|
Thank you for the prompt replies, I'll just keep using my workaround - Kovid's suggestion is way beyond my skill level!
A good week-end to all and, to Kovid, my wishes of full recovery! W. |
Tags |
calibredb, cli, gui, selected, selection |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Selected a couple of Authors/Series but Calibre not showing the books selected | lizzyong | Library Management | 3 | 04-16-2015 07:47 PM |
Added files to selected books | Tanjamuse | Calibre Companion | 3 | 01-25-2015 08:47 AM |
set selected books to same title | mohataj | Library Management | 6 | 12-23-2014 05:40 PM |
Move selected books to other library | macnab69 | Library Management | 27 | 06-29-2013 10:35 PM |
30% off selected books from Kobo Store | melchizedek | Deals and Resources (No Self-Promotion or Affiliate Links) | 5 | 05-06-2012 10:04 AM |