View Single Post
Old 05-09-2015, 05:57 AM   #1
wladdy
Enthusiast
wladdy began at the beginning.
 
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'
This method works well enough, but requires the hassle of dealing with a dummy custom column. I'd be grateful to anyone suggesting a better, more direct approach.

Many thanks! W.
wladdy is offline   Reply With Quote