Skip to content

Instantly share code, notes, and snippets.

@orip
Last active December 17, 2015 22:08
Show Gist options
  • Select an option

  • Save orip/5679261 to your computer and use it in GitHub Desktop.

Select an option

Save orip/5679261 to your computer and use it in GitHub Desktop.
Insert the filename into a custom gource log
# Based on https://code.google.com/p/gource/issues/detail?id=8#c27
#
# Usage:
# for x in *; do
# gource --output-custom-log $x.txt /path/to/repos/$x
# done
# python annotate_gource_log.py *.txt | sort -n > combined.txt
# gource combined.txt
import fileinput, sys
for line in fileinput.input():
split = line.split('|')
split[-1] = "/" + fileinput.filename().split(".")[0] + split[-1]
sys.stdout.write("|".join(split))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment