Skip to content

Commit

Permalink
Run script. Twitter config.
Browse files Browse the repository at this point in the history
  • Loading branch information
sandofsky committed Feb 3, 2010
1 parent fc54cc6 commit 1b53939
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 0 deletions.
132 changes: 132 additions & 0 deletions data/twitter.config
@@ -0,0 +1,132 @@
# This is a sample configuration file for code_swarm

# Frame width
Width=960

# Frame height
Height=540

# Input file
InputFile=/Volumes/Scratch/projects/twitter_code_swarm/twitter_log.xml

# Particle sprite file
ParticleSpriteFile=src/particle.png

#Font Settings
Font=Helvetica
FontSize=15
BoldFontSize=15

# Project time per frame
#MillisecondsPerFrame=21600000
FramesPerDay=3

# Maximum number of background processes
# Probably no more than 2 per processor needed.
# N.B. If you're taking snapshots, increasing this
# number will noticably increase memory usage.
MaxThreads=6

# Optional Method instead of MillisecondsPerFrame
#FramesPerDay=4

# Background in R,G,B
Background=0,0,0

# 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.
#
ColorAssign1="Ruby","app/(models|controllers|helpers).*|lib/.*rb|config/.*|db/.*", 255,20,10, 255,20,10
ColorAssign2="Tests","(test|spec)/.*", 33,255,47, 33,255,47
ColorAssign3="View","app/views/.*|public/.*\.(css|js|jpg|gif|png)", 0,255,255, 0,255,255
ColorAssign4="Libraries","vendor/(plugins|gems|rails).*", 234,38,255, 234,38,255
#ColorAssign5="Javascript","public/.*\.js", 255,255,0, 255,255,0
#ColorAssign6="Images","public/.*(png|jpg|gif", 119,68,119, 119,68,119
#ColorAssign7="Code6",".*src6.*", 136,51,17, 136,51,17
#ColorAssign8="Code7",".*src7.*", 250,110,110, 250,110,130
#ColorAssign9="Code8",".*src8.*", 238,102,68, 238,102,68
#ColorAssign10=".*src9.*", 238,68,119, 238,68,119

# Save each frame to an image?
TakeSnapshots=false

# Where to save each frame
SnapshotLocation=frames/code_swarm-######.png

# Draw names (combinatory) :
# Draw sharp names?
DrawNamesSharp=true
# And draw a glow around names? (Runs slower)
DrawNamesHalos=false

# Draw files (combinatory) :
# Draw sharp files
DrawFilesSharp=false
# Draw fuzzy files
DrawFilesFuzzy=true
# Draw jelly files
DrawFilesJelly=false

# Show the Legend at start
ShowLegend=true

# Show the History at start
ShowHistory=true

# Show the Date at start
ShowDate=true

# Show edges between authors and files, mostly for debug purpose
ShowEdges=false

# Turn on Debug counts.
ShowDebug=false

# Natural distance of files to people
EdgeLength=25

# Amount of life to decrement
EdgeDecrement=-2
FileDecrement=-1
PersonDecrement=-1

#Speeds.
#Optional: NodeSpeed=7.0, If used, FileSpeed and PersonSpeed need not be set.
#
FileSpeed=7.0
PersonSpeed=2.0

#Masses
FileMass=2.0
PersonMass=10.0

# Life of an Edge
EdgeLife=250

# Life of a File
FileLife=250

# Life of a Person
PersonLife=255

# Highlight percent.
# This is the amount of time that the person or
# file will be highlighted.
HighlightPct=5

## Physics engine selection and configuration
# Directory physics engine config files reside in.
PhysicsEngineConfigDir=physics_engine
# Force calculation algorithms ("PhysicsEngineLegacy", "PhysicsEngineSimple"...) :
PhysicsEngineSelection=PhysicsEngineOrderly

#Is the input xml sorted by date? It's faster and uses much less memory if it is
IsInputSorted=true

# OpenGL is experimental. Use at your own risk.
UseOpenGL=false
60 changes: 60 additions & 0 deletions run.sh
@@ -0,0 +1,60 @@
# run.sh : code_swarm launching script
# need the config file as first parameter

params=$@
default_config="data/sample.config"
code_swarm_jar="dist/code_swarm.jar"

# command line parameters basic check
if [ $# = 0 ]; then
# asking user for a config file
echo "code_swarm project !"
echo -n "Specify a config file, or ENTER for default one [$default_config] : "
read config
if [ ${#config} = 0 ]; then
params=$default_config
else
params=$config
fi
else
if [ $1 == "-h" ] || [ $1 == "--help" ]; then
# if help needed, print it and exit
echo "usage: run.sh <configfile>"
echo ""
echo " data/sample.config is the default config file"
echo ""
exit
else
echo "code_swarm project !"
fi
fi

# checking for code_swarm java binaries
if [ ! -f $code_swarm_jar ]; then
echo "no code_swarm binaries !"
echo "needing to build it with 'ant' and 'javac' (java-sdk)"
echo ""
echo "auto-trying the ant command..."
if ant; then
echo ""
else
echo ""
echo "ERROR, please verify 'ant' and 'java-sdk' installation"
echo -n "press a key to exit"
read key
echo "bye"
exit
fi
fi

# running
if java -Xmx1000m -classpath dist/code_swarm.jar:lib/core.jar:lib/xml.jar:lib/vecmath.jar:. code_swarm $params; then
# always on error due to no "exit buton" on rendering window
echo "bye"
# echo -n "error, press a key to exit"
# read key
else
echo "bye"
fi


0 comments on commit 1b53939

Please sign in to comment.