View Single Post
Old 11-23-2015, 06:10 AM   #10
nylnook
Junior Member
nylnook began at the beginning.
 
nylnook's Avatar
 
Posts: 9
Karma: 10
Join Date: Nov 2015
Device: none
After some more tests, the best way to avoid mimetypes errors is to not touch the mimetype at all...
So here is the updated script :

Code:
epub="$(realpath "$joinedfilename.epub")"
tmp_epub=$(mktemp -d)
unzip "$epub" -d $tmp_epub
pushd $tmp_epub
CONTENT='\t\t<meta name="fixed-layout" content="true"/>\n\t\t<meta name="original-resolution" content="584x754"/>'
sed -i '/<\/metadata>/i\'"$CONTENT" content.opf
zip -r "$epub" * -x mimetype
pushd
rm -rf $tmp_epub
Cheers !
nylnook is offline   Reply With Quote