Skip to content

Instantly share code, notes, and snippets.

@adamamyl
Created May 23, 2015 22:11
Show Gist options
  • Select an option

  • Save adamamyl/e15336e7f008c578dd31 to your computer and use it in GitHub Desktop.

Select an option

Save adamamyl/e15336e7f008c578dd31 to your computer and use it in GitHub Desktop.
Add styles (file) to Open/Libre Office draw xml files
for F in `ls *.fodg`; do
f="${F}-filter"
sed -n '/<\/office:automatic-styles>/,$p' "${F}" > ${f}
# styles.fodg contains the xml shite upto </office:automatic-styles>
# from a doc containing the styles sought/wanted to replicate
cat ../../styles.fodg ${f} > ${f}.out
mv "${f}.out" "${F}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment