Last active
May 28, 2019 12:54
-
-
Save benjohnde/6ec22c91f4562103cae47593d9b6719b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for ppt in *.ppsx | |
do | |
mkdir tmp | |
cd tmp | |
unzip ../$ppt | |
sed -i '' 's/slideshow/presentation/' \[Content_Types\].xml | |
sed -i '' 's/x-ms-wmv/mp4/' \[Content_Types\].xml | |
sed -i '' 's/wmv/mp4/' \[Content_Types\].xml | |
cd ppt/media | |
for f in *.wmv; do ffmpeg -i $f -c:v libx264 ${f%%.*}.mp4; rm $f; done | |
cd ../slides/_rels | |
for f in *.xml.rels; do sed -i '' 's/\.wmv/\.mp4/g' $f; done | |
cd ../.. | |
sed -i '' 's/<p:modifyVerifier[ a-zA-Z0-9\"=/+]*\/>//' presentation.xml | |
cd .. | |
zip -r ../${ppt%%.*}-umgewandelt.pptx . | |
cd .. | |
rm -rf tmp | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment