Skip to content

Instantly share code, notes, and snippets.

@derwiki
Created February 15, 2013 23:11
Show Gist options
  • Save derwiki/4964351 to your computer and use it in GitHub Desktop.
Save derwiki/4964351 to your computer and use it in GitHub Desktop.
Series of commands (not an executable script per se) to get you from a git repository to a Code Swarm AVI (tested on Linux and OS X).
CODESWARM_DIR="/home/user/src/code_swarm/"
# extract from your git repo
git log --name-status --pretty=format:'%n------------------------------------------------------------------------%nr%h | %ae | %ai (%aD) | x lines%nChanged paths:' > $CODESWARM_DIR/data/activity.log
# convert to XML for CodeSwarm
python convert_logs/convert_logs.py \
-g $CODESWARM_DIR/data/activity.log -o $CODESWARM_DIR/data/activity.xml
# create a new config that points to the correct input XML and saves snapshots
sed s/sample-repevents.xml/activity.xml/ data/sample.config \
| sed -i s/TakeSnapshots=false/TakeSnapshots=true/ > data/project.config
mkdir $CODESWARM/frames
./run.sh (and specify the new config file)
# stitch frames together into vide
mencoder "mf://*.png" -mf fps=24 -o code-swarm.avi -ovc lavc \
-lavcopts vcodec=msmpeg4v2:vbitrate=500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment