Skip to content

Instantly share code, notes, and snippets.

@cliffano
Created March 11, 2017 13:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cliffano/9840002971ed649b4a0e725b81d542e5 to your computer and use it in GitHub Desktop.
Save cliffano/9840002971ed649b4a0e725b81d542e5 to your computer and use it in GitHub Desktop.
Gource shell script for visualizing multiple GitHub repositories
#!/bin/bash
set -e
set -u
# brew install gource ffmpeg
user=<github_user/org>
repos="<repo1> <repo2> ... <repoN>"
rm -rf repos logs out
mkdir -p repos logs out
for REPO in $repos
do
cd repos
git clone "git@github.com:${user}/${REPO}.git"
gource --output-custom-log "../logs/${REPO}.log" "${REPO}"
awk -F\| -v repo="$REPO" '{print $1 "|" $2 "|" $3 "|" repo $4}' "../logs/${REPO}.log" > "../logs/${REPO}.gourced.log"
cd ../
done
cd logs
cat ./*.gourced.log | sort -n > combined.gourced.log
gource combined.gourced.log --highlight-users -1280x720 -s 0.25 -o ../out/gource-multi-repos.ppm
ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i ../out/gource-multi-repos.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 ../out/gource-multi-repos.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment