git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Management of opendocument (openoffice.org) files in git

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Sep 16, 2008, 07:09 UTC
Message-ID
<48CF5B90.5050800@viscovery.net>
In-Reply-To
<loom.20080915T222909-709@post.gmane.org>
Sergio Callegari schrieb:
Show 21 quoted lines
> if [ $# = 0 ] ; then
>     tmpcopy=$(mktemp rezip.zip.XXXXXX)
>     cat > $tmpcopy
>     filename="$tmpcopy"
> else
>     tmpcopy=""
>     filename="$1"
> fi
> 
> workdir=$(mktemp -d -t rezip.workdir.XXXXXX)
> curdir=$(pwd)
> 
> cd $workdir
> unzip $UNZIP_OPTS "$curdir/$filename"
> zip $ZIP_OPTS "$curdir/$filename" .
> cd $curdir
> rm -fr $workdir
> if [ ! -z "$tmpcopy" ] ; then
>   cat $filename
>   rm $tmpcopy
> fi
You don't need a temporay zip filename in filter mode:
  unzip $UNZIP_OPTS /dev/stdin  # works for me, but not 100% portable
  zip $ZIP_OPTS - .             # writes to stdout
Show 5 quoted lines
> then put in your .git/config something like
> 
> [filter "opendocument"]
>         clean = "rezip -p ODF_UNCOMPRESS"
>         smudge = "rezip -p ODF_COMPRESS"

Is the smudge filter really necessary? Can't OOo work with files at compression level 0?

-- Hannes
Previous: Sergio CallegariNext: Sergio Callegari
Message 4 of 10 in “Management of opendocument (openoffice.org) files in git”
  1. Sergio CallegariSep 15, 2008
  2. Matthieu MoySep 16, 2008
  3. Sergio CallegariSep 16, 2008
  4. Johannes SixtSep 16, 2008
  5. Sergio CallegariSep 16, 2008
  6. Johannes SixtSep 16, 2008
  7. Avery PennarunSep 16, 2008
  8. Stephen R. van den BergSep 16, 2008
  9. Robin RosenbergSep 16, 2008
  10. Peter KreftingSep 23, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.