A shell script to comfortably edit XML content of Open Document Format (ODF) files (.odt, .odp, .ods etc.).
Unpacks the ODF file, lets user select file(s) to edit, shows changes and re-packs the ODF file.
Also works with Microsoft Office XML-based formats (.docx, .xlsx, .pptx etc.).
- zip(1) and unzip(1) - as ODF files are ZIP files
- dialog(1) - for choosing files
- mktemp(1) - to create a temporary directory
- find(1) - to find changed files
- git(1) or diff(1) - to highlight changes
- any editor - script check for
$EDITOR, /usr/bin/editor, vim, vi or nano
- xmllint(1) - formats XML files for being easier to navigate
Install dependencies with:
$ sudo apt-get install libxml2-utils dialog git zip unzip findutils coreutils
Required tools ship with mac OS, except for dialog(1). git(1) is part of Xcode command line tools.
Install dialog(1) with Homebrew, for example:
$ brew install dialog