View Single Post
Old 10-19-2012, 01:51 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,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Apparently the Win7 CLI does not strip single quotes from arguments, making the JSON string invalid. The following works.
Code:
--display="{\"date_format\":\"MM/dd/yy\"}"
while this doesn't:
Code:
--display='{\"date_format\":\"MM/dd/yy\"}'
Putting print statements in the code, we see that the first arrives in calibre as
Code:
{"date_format":"MM/dd/yy"}
while the second second arrives as
Code:
'{"date_format":"MM/dd/yy"}'
(note the single quotes).

So, the solution for Win7 is to use double quotes and escape all internal quotes.
chaley is offline   Reply With Quote