So this is what I have.
This is not a stand-alone python script.
You must have calibre installed.
You launch the script like so:
Code:
calibre-debug cm2em_calibre.py file.epub
Should catch rules that have dimension-type properties in cm and convert them to em (whether they're in short-hand notation or not).
It's not going to work with any rules inside of @media queries if your css gets that complicated, but it should catch everything else.
I included a sample batch file and a bash script if anyone is interested in launching this in a more permanent way.
REMEMBER! THIS SCRIPT WILL MODIFY THE EPUB YOU STARTED WITH ... MAKE SURE YOU HAVE BACKUPS BEFORE USING.