Created
October 13, 2010 19:07
-
-
Save bycpx/624661 to your computer and use it in GitHub Desktop.
Enable textual diff of iWork 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
*.pages/index.xml.gz diff=iworkpages |
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
[diff "iworkpages"] | |
textconv = xsltproc $GIT_DIR/Pages.xsl |
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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sf="http://developer.apple.com/namespaces/sf"> | |
<xsl:template match="sf:p"> | |
<xsl:apply-templates/> | |
<xsl:text> | |
</xsl:text> | |
</xsl:template> | |
<xsl:template match="sf:lnbr"> | |
<xsl:text> | |
</xsl:text> | |
</xsl:template> | |
<xsl:template> | |
<xsl:value-of select="text()"/> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey! Actually, I went ahead and forked this gist to fix it to work with the newer .pages format. I had to add a shell script, because now the *.pages files are actually .zip files, so they have to be unzipped and then the unzipped files need to be deleted.
I wasn't able to add ".git/config" to my gist like you have, though, and my guess is because git has changed the rules since you posted this gist?
Anyway. If you want to pull from my updated gist, this should work for Pages '09 files:
https://gist.github.com/NHDaly/7669596