Skip to content

Commit 34dcee2

Browse files
author
Gun.io Whitespace Robot
committed
Remove whitespace [Gun.io WhitespaceBot]
1 parent cc1daa4 commit 34dcee2

21 files changed

+242
-242
lines changed

bin/README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ convert_logs.py supports more formats than we have documented here. For more in
1010
cd path/to/svn/project
1111
svn log -v > my_svn.log
1212
python convert_logs.py -s path/to/svn/project/my_svn.log -o svn_log.xml
13-
13+
1414
# git #
1515

1616
cd path/to/git/project
1717
git-log --name-status --pretty=format:'%n------------------------------------------------------------------------%nr%h | %ae | %ai (%aD) | x lines%nChanged paths:' > my_git_project.log
1818
python convert_logs.py -g path/to/git/project/my_git_project -o git_log.xml
19-
19+
2020

2121
# Startteam #
2222

bin/code_swarm

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import md5
2424
from random import random
2525
from threading import Thread
2626
from shutil import copy
27-
27+
2828
def parse_args():
2929
from optparse import OptionParser
3030

@@ -55,15 +55,15 @@ def parse_args():
5555
def main():
5656
"""
5757
Visualizes the project in the current working directory.
58-
58+
5959
Doing this automagically involves three steps:
6060
1) Discovering what kind of repository is used in the current working
6161
directory.
62-
62+
6363
2) Converting the log formats from each kind of repository to the event
6464
xml format that code_swarm expects.
65-
66-
3) Invoking code_swarm
65+
66+
3) Invoking code_swarm
6767
"""
6868

6969
options = parse_args()[0]
@@ -127,7 +127,7 @@ def invoke_code_swarm(code_swarm_jar, proj_cfg, options):
127127
path_64 = os.path.join(path, "linux-x86_64")
128128
path = os.pathsep.join([path_64, path])
129129
return "-Djava.library.path=" + os.pathsep.join([path, old_path])
130-
130+
131131
classpath = os.pathsep.join([code_swarm_jar, get_jars(), "."])
132132
ea = "-da"
133133
if options.debug: ea = "-ea"
@@ -175,15 +175,15 @@ def autogenerate_files(options):
175175

176176
if options.reload or not os.path.exists(os.path.join(dir, "log.xml")):
177177
generate_log(dir)
178-
178+
179179
proj_cfg = os.path.join(dir, "project.config")
180180
if not os.path.exists(proj_cfg):
181181
print >>sys.stderr, "Creating default config file at " + proj_cfg
182182
cp_tpl = os.path.join(root_path(), "bin", "config.template")
183183
copy(cp_tpl, proj_cfg)
184-
184+
185185
return proj_cfg
186-
186+
187187

188188
def do_cmds(*cmds):
189189
for cmd in cmds:
@@ -222,7 +222,7 @@ def do_hg(dir):
222222
def do_darcs(dir):
223223
tmp = os.path.join(dir, "darcs.xml")
224224
xml = os.path.join(dir, "log.xml")
225-
225+
226226
return do_cmds("darcs changes -s --xml-output > '%s'" % tmp
227227
,"convert_logs.py -d '%s' -o '%s'" % (tmp, xml)
228228
,"rm -f '%s'" % tmp)
@@ -240,7 +240,7 @@ def do_freebase(domain):
240240
cfgf.write("InputFile=%s\n" % xml)
241241
cfgf.close()
242242
return cfg
243-
244-
243+
244+
245245
if __name__ == "__main__":
246246
main()

bin/config.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ InputFile=log.xml
66
# Color assignment rules
77
# Keep in order, do not skip numbers. Numbers start
88
# at 1.
9-
#
9+
#
1010
# Pattern: "Label", "regex", R,G,B, R,G,B
1111
# Label is optional. If it is omitted, the regex
1212
# will be used.
@@ -37,6 +37,6 @@ IsInputSorted=true
3737
# To use local avatars, uncomment this line:
3838
#AvatarFetcher=LocalAvatar
3939

40-
# then place png files named after the usernames of committers in
40+
# then place png files named after the usernames of committers in
4141
# the data/local_avatars directory
4242
# data/local_avatars/default.png is used by default

data/sample.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Background=0,0,0
3535
# Color assignment rules
3636
# Keep in order, do not skip numbers. Numbers start
3737
# at 1.
38-
#
38+
#
3939
# Pattern: "Label", "regex", R,G,B, R,G,B
4040
# Label is optional. If it is omitted, the regex
4141
# will be used.

data/twitter.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Background=0,0,0
3636
# Color assignment rules
3737
# Keep in order, do not skip numbers. Numbers start
3838
# at 1.
39-
#
39+
#
4040
# Pattern: "Label", "regex", R,G,B, R,G,B
4141
# Label is optional. If it is omitted, the regex
4242
# will be used.

defaults/code_swarm.config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Font=SansSerif
6464
FontSize=10
6565
FontColor=255,255,255
6666

67-
# Font for people's names immediately after they've made an edit
67+
# Font for people's names immediately after they've made an edit
6868
BoldFont=SansSerif
6969
BoldFontSize=14
7070

@@ -103,7 +103,7 @@ IsInputSorted=false
103103
# Particle sprite file
104104
ParticleSpriteFile=src/particle.png
105105

106-
# OpenGL has problems on some platforms. We're closer to having it work
106+
# OpenGL has problems on some platforms. We're closer to having it work
107107
# automatically out of the box, but not close enough to enable it by default
108108
UseOpenGL=false
109109

@@ -114,7 +114,7 @@ AvatarFetcher=GravatarFetcher
114114

115115
#AvatarFetcher=NoAvatar
116116

117-
# looks for avatar images (with the same name as the user name) in
117+
# looks for avatar images (with the same name as the user name) in
118118
# the LocalAvatarDirectory
119119
#AvatarFetcher=LocalAvatar
120120

src/AvatarFetcher.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,35 @@
1111

1212
public class AvatarFetcher {
1313
protected CodeSwarmConfig cfg;
14-
public int size;
14+
public int size;
1515
public AvatarFetcher(CodeSwarmConfig cfg) {
1616
this.cfg = cfg;
1717
size = cfg.getPositiveIntProperty("AvatarSize");
1818
}
19-
19+
2020
public String fetchUserImage(String username) {
2121
throw new RuntimeException("Override fetchUserImage in your Avatar Fetcher");
2222
}
23-
23+
2424
protected static String getFilename(String key){
2525
return "image_cache/" + key;
2626
}
27-
27+
2828
protected static boolean imageCached(String key) {
2929
return new File(getFilename(key)).exists();
3030
}
31-
31+
3232
protected static String getImage(String key, URL url) {
3333
String filename = getFilename(key);
3434
if (!imageCached(key)){
35-
boolean successful = fetchImage(filename, url);
35+
boolean successful = fetchImage(filename, url);
3636
if (!successful)
3737
return null;
3838
}
39-
39+
4040
return filename;
4141
}
42-
42+
4343
protected static boolean fetchImage(String filename, URL url) {
4444
try {
4545
new File("image_cache").mkdirs();
@@ -72,7 +72,7 @@ protected static boolean fetchImage(String filename, URL url) {
7272
return false;
7373
}
7474
}
75-
75+
7676
//these two methods taken from http://en.gravatar.com/site/implement/java
7777
private static String hex(byte[] array) {
7878
StringBuffer sb = new StringBuffer();

src/CodeSwarmConfig.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ public class CodeSwarmConfig {
108108
public static final String DRAW_CIRCULAR_AVATARS = "CircularAvatars";
109109

110110
private List<Properties> propStack;
111-
112-
111+
112+
113113

114114
// Cache variables
115115
private Color _background = null;
@@ -118,7 +118,7 @@ public CodeSwarmConfig(String configFileName) throws IOException {
118118
initPropStack();
119119
addPropertiesLayer(configFileName);
120120
}
121-
121+
122122
public CodeSwarmConfig(Iterable<String> configFileNames) throws IOException {
123123
initPropStack();
124124
for (String filename: configFileNames)
@@ -134,12 +134,12 @@ public void addPropertiesLayer(String filename) throws IOException {
134134
props.load(new FileInputStream(filename));
135135
addPropertiesLayer(props);
136136
}
137-
137+
138138
protected void initPropStack() {
139139
propStack = new LinkedList<Properties>();
140140
propStack.add(createDefaults());
141141
}
142-
142+
143143
private Properties createDefaults() {
144144
Properties def = new Properties();
145145
def.setProperty( COLOR_ASSIGN_KEY + "1" , DEFAULT_COLOR_ASSIGN );
@@ -148,7 +148,7 @@ private Properties createDefaults() {
148148

149149

150150
/**
151-
*
151+
*
152152
* @param key
153153
* @return Returns the first key found in the stack of config files.
154154
*/
@@ -163,7 +163,7 @@ public Color getColorProperty(String key) {
163163
return stringToColor( getStringProperty(key) );
164164
}
165165

166-
166+
167167
/**
168168
* Specify the path to the Xml-input file containing the repository
169169
* entries.<br />
@@ -176,13 +176,13 @@ public void setInputFile(String filePath){
176176
propStack.get(0).setProperty(INPUT_FILE_KEY, filePath);
177177
}
178178

179-
179+
180180
public boolean getBooleanProperty(String key) {
181181
return Boolean.valueOf(getStringProperty(key));
182182
}
183-
183+
184184
/**
185-
*
185+
*
186186
* @param key
187187
* @return value of property if found, 0 if not found.
188188
*/
@@ -191,7 +191,7 @@ public int getIntProperty( String key ) {
191191
}
192192

193193
/**
194-
*
194+
*
195195
* @param key
196196
* @param defValue
197197
* @return value of property if found.
@@ -204,7 +204,7 @@ public int getPositiveIntProperty(String key) {
204204
}
205205

206206
/**
207-
*
207+
*
208208
* @param key
209209
* @param defValue
210210
* @return defValue if not found or found value isn't negative, Value of property if found.
@@ -219,7 +219,7 @@ public int getNegativeIntProperty( String key) {
219219

220220

221221
/**
222-
*
222+
*
223223
* @param key
224224
* @return value of property if found, 0 if not found.
225225
*/
@@ -228,7 +228,7 @@ public long getLongProperty( String key ) {
228228
}
229229

230230
/**
231-
*
231+
*
232232
* @param key
233233
* @return value of property if found, 0 if not found.
234234
*/
@@ -237,7 +237,7 @@ public float getFloatProperty( String key ) {
237237
}
238238

239239
/**
240-
*
240+
*
241241
* @param index
242242
* @return String containing the regex and rgb values used to colorcode nodes, null if not found
243243
*/
@@ -246,7 +246,7 @@ public String getColorAssignProperty( Integer index ) {
246246
}
247247

248248
/**
249-
*
249+
*
250250
* @param str
251251
* @return Color object constructed from values in str
252252
*/

src/FreebaseAvatarFetcher.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public FreebaseAvatarFetcher(CodeSwarmConfig cfg) {
1515
}
1616

1717
static private Pattern imageIDPattern = Pattern.compile("\"image:id\"\\s*:\\s*\"(.*?)\"");
18-
18+
1919
private static String readURLToString(URL url) {
2020
try {
2121
URLConnection con = url.openConnection();
@@ -25,7 +25,7 @@ private static String readURLToString(URL url) {
2525
if (length == -1){
2626
//read until exhausted
2727
while(true){
28-
String line = reader.readLine();
28+
String line = reader.readLine();
2929
if (line == null) break;
3030
sb.append(line);
3131
}
@@ -41,7 +41,7 @@ private static String readURLToString(URL url) {
4141
return null;
4242
}
4343
}
44-
44+
4545
private static String getUserImageID(String username) {
4646
try {
4747
new File("image_cache").mkdirs();
@@ -58,17 +58,17 @@ private static String getUserImageID(String username) {
5858
}
5959
return null;
6060
}
61-
61+
6262
public String fetchUserImage(String username) {
6363
String key = md5Hex("metaweb:" + username);
6464
if (imageCached(key))
6565
return getFilename(key);
6666
try {
6767
String imageID = getUserImageID(username);
6868
if (imageID == null) return null;
69-
return getImage(key, new URL("http://www.freebase.com/api/trans/image_thumb/"
70-
+ imageID
71-
+ "?maxheight=" + size
69+
return getImage(key, new URL("http://www.freebase.com/api/trans/image_thumb/"
70+
+ imageID
71+
+ "?maxheight=" + size
7272
+ "&maxwidth=" + size
7373
+ "&mode=fillcrop"));
7474
} catch (MalformedURLException e) {

src/GravatarFetcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public String fetchUserImage(String username) {
1818
return null;
1919
}
2020
}
21-
21+
2222
private Pattern emailPattern = Pattern.compile("<(.*?@.*?\\..*?)>");
2323
private String getEmail(String username) {
2424
Matcher emailMatcher = emailPattern.matcher(username);

0 commit comments

Comments
 (0)