Last active
December 17, 2015 22:08
-
-
Save orip/5679261 to your computer and use it in GitHub Desktop.
Insert the filename into a custom gource log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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