Skip to content

Instantly share code, notes, and snippets.

@jmatsu
Last active October 19, 2015 08:50
Show Gist options
  • Save jmatsu/dc48b417b5368ae3b514 to your computer and use it in GitHub Desktop.
Save jmatsu/dc48b417b5368ae3b514 to your computer and use it in GitHub Desktop.

docx, pptx とか

Apacheのtika を入れて,/usr/local/bin/parsexml を作って

/usr/local/bin/parsexml

#!/usr/bin/env bash
tika -t "$1"
$ chmod +x /usr/local/bin/parsexml
$ git config --global --add diff.parsexml.textconv /usr/local/bin/parsexml

${repo_root}/.gitattributes

*.pptx diff=parsexml
*.docx diff=parsexml
*.xlsx diff=parsexml

doc, pptとか

catdoc入れて,

$ git config --global --add diff.parseoldoffice.textconv catdoc

${repo_root}/.gitattributes

*.doc diff=parseoldoffice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment