Skip to content

basic-examples/oogit

Repository files navigation

oogit

Manage Word, Excel, and PowerPoint files with Git — like you would with SVN.

oogit unpacks an OOXML file, stores its contents in a regular Git repository, and reassembles the file when you are done.

Works on both POSIX and Windows systems (via Git Bash).

Please note that the main branch is used for ongoing development and may contain unreleased features or bugs.

Installation

# clone the project and expose the script
git clone https://github.com/basic-examples/oogit.git
chmod +x oogit/oogit.sh
sudo cp oogit/oogit.sh /usr/local/bin/oogit

Or install the published package from npm:

npm install -g oogit

Quick start

# Initial upload: if you already have the OOXML file and it’s not under version control yet
oogit init report.pptx "https://github.com/<your-name>/<repo-name>.git"

# Or clone the file from a remote Git repository (like 'svn checkout')
oogit checkout report.pptx "https://github.com/<your-name>/<repo-name>.git"

# Edit the document as usual...

# Save your changes back to the Git repository (like `svn commit`)
oogit commit report.pptx

# ==============================================================================

# Did the file change on the remote repository?
oogit update report.pptx

A directory named report.pptx.oogit stores local Git repository, tracks the remote Git repository url, branch and path, for the next time you run oogit commit or oogit update, etc.

Commands

init

Unpack an OOXML file into a Git repository and make the initial commit.

oogit init [options] <ooxml-file> <git-repo> [branch] [path-in-repo]

checkout

Reconstruct an OOXML file from a Git repository at a specific branch.

oogit checkout [options] <ooxml-file> <git-repo> [branch] [path-in-repo]

commit

Commit changes to the repository using the metadata stored by init or checkout.

oogit commit [options] <ooxml-file>

update

Update the local OOXML file with the latest version from the repository. (Does not resolve conflicts.)

oogit update [options] <ooxml-file>

reset

Restore the OOXML file to a specific tag or commit from the repository.

oogit reset [options] <ooxml-file> [tag-or-commit]

Version History

  • 0.1.0: Initial stable version
  • 0.1.1: Fixed unhelpful document
  • 0.1.2: Reused checkout repo, added tmp cleanup
  • 0.1.3: Updated outdated document
  • 0.2.0: Added basic rename handling, but very poor
  • 0.2.1: Added missing license field in package.json
  • 0.2.2: Fixed bug on status R and (( COUNTER++ ))

License

MIT License

About

Efficient OOXML VCS based on git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published