Hi
I have a Python script that has been written on another forum. It works well: it allows to modify any stylesheet.css file containing units in
cm (centimeters) to units in
em. It limits the conversion result to two decimals (so as to avoid likes of 1.254678952em).
To use it, I have to export the stylesheet from the EPUB, modify it and import it again: this is not very convenient for such a small matter.
I would like to complete this script so as to enable it to modify directly the stylesheet of an EPUB.
Can someone help for this? Here is the script:
It can be launched this way: ./your-script-name old-stylesheet.css new-stylesheet.css
PS: I am aware about rem for EPUB3 and potential troubles for nested ems. This is for use for a plain EPUB2, without ordered lists.