Skip to content

Instantly share code, notes, and snippets.

@titanous
Created November 17, 2010 17:04
Show Gist options
  • Save titanous/703655 to your computer and use it in GitHub Desktop.
Save titanous/703655 to your computer and use it in GitHub Desktop.

code_swarm

Make a .mailmap for your project from the output of git log --pretty="format:%aN <%aE>" | sort -u

Then: code_swarm

These commands could probably be combined into one: ffmpeg -f image2 -r 24 -i ./code_swarm_frames/%5d.png -sameq ./out.mov -pass 2 ffmpeg -i out.mov -i soundtrack.mp3 -vcodec copy -acodec libfaac -map 0:0 -map 1:0 -ab 256k -ar 44100 finished.mp4

Width=1280
Height=720
MaxThreads=4
# This is a sample configuration file for code_swarm
# Input file
InputFile=log.xml
# Color assignment rules
# Keep in order, do not skip numbers. Numbers start
# at 1.
#
# Pattern: "Label", "regex", R,G,B, R,G,B
# Label is optional. If it is omitted, the regex
# will be used.
#
ColorAssign3="Ruby",".*\.rb", 225,90,90, 200,90,110
ColorAssign1="Tests",".*test.*", 90,225,90, 110,200,90
ColorAssign2="Javascript",".*\.js", 90,225,225, 110,200,200
ColorAssign4="HTML/CSS/Images",".*(\.liquid|\.erb|\.txt|\.html|\.tex|\.tmpl|\.css|\.xml|\.yml|\.json|\.png|\.jpg|\.gif|\.jpeg|README|COPYING|LICENSE|AUTHORS)", 90,90,225, 90,110,200
# Save each frame to an image?
TakeSnapshots=true
# Where to save each frame
SnapshotLocation=code_swarm_frames/#####.png
UseOpenGL=true
FontSize=14
DrawFilesJelly=false
DrawFilesFuzzy=true
DrawFilesSharp=false
HighlightPct=0
FileLife=250
FramesPerDay=2
#Is the input xml sorted by date? It's faster and uses much less memory if it is
IsInputSorted=true
# - All of the given scripts for producing repository xml files produce sorted data
# - Please file a bug if one doesn't
# Uncomment to not use avatars
AvatarFetcher=NoAvatar
ShowUserName=true
## How to draw names (choose as many as you like)
# Draw sharp names?
DrawNamesSharp=true
# To use local avatars, uncomment this line:
#AvatarFetcher=LocalAvatar
# then place png files named after the usernames of committers in
# the data/local_avatars directory
# data/local_avatars/default.png is used by default
diff --git a/bin/code_swarm b/bin/code_swarm
index 2bc7518..2c27546 100755
--- a/bin/code_swarm
+++ b/bin/code_swarm
@@ -193,13 +193,12 @@ def do_cmds(*cmds):
def do_git(dir):
ds = '-' * 72
- fmt = "%%n%s%%nr%%h | %%ae | %%ai (%%aD) | x lines%%nChanged paths: " % ds
+ fmt = "%%n%s%%nr%%h | %%aN | %%ai (%%aD) | x lines%%nChanged paths: " % ds
tmp = os.path.join(dir, "temp.log")
xml = os.path.join(dir, "log.xml")
return do_cmds('git log --name-status --pretty=format:"%s" > "%s"'%(fmt, tmp)
- ,"convert_logs.py -g '%s' -o '%s'" % (tmp, xml)
- ,"rm -f '%s'" % tmp)
+ ,"convert_logs.py -g '%s' -o '%s'" % (tmp, xml))
def do_svn(dir):
@nathanbertram
Copy link

Merci :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment