I never did solve the escaping problem, despite numerous painful experiments with sed and bash, but ultimately I realized I was making things way too hard on myself. I got rid of the --title flag and simply let Calibre determine the title automatically based on interior metadata (which I had tweaked).
|