View Single Post
Old 10-17-2015, 09:31 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
`calibredb list` has a --for-machine option that will output JSON, which is going to be your best option for scripting.
The default, human-readable output shapes itself to the output terminal and isn't meant to be programmatically parsed.

Any decent programming language should have a way to parse JSON.
For bash, you will have to use something like jshon.

Last edited by eschwartz; 10-17-2015 at 09:36 PM.
eschwartz is offline   Reply With Quote