Last active
February 9, 2016 15:14
-
-
Save midwire/e8c5ec4cf40f06ba24a7 to your computer and use it in GitHub Desktop.
Fix Old Pages Documents
This file contains 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
#!/usr/bin/env bash | |
# fix_pages_doc.sh /path/to/document.pages | |
# See: https://apple.stackexchange.com/questions/150771/how-do-i-convert-old-pages-documents-to-pages-13 | |
FILE="$1" | |
if [ ! -r "$FILE" ]; then | |
echo "File does not exist: [$FILE]" | |
exit 1 | |
fi | |
cd "$FILE" | |
gunzip --stdout index.xml.gz | sed 's-:version="72007061400"-:version="92008102400"-g' > index.xml | |
mv index.xml.gz /tmp | |
cd - | |
echo "Your .pages file: [$FILE] has been fixed." | |
open "$FILE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment