Commits

Lynn Rees committed 1256151

- clean up

Comments (0)

Files changed (6)

scripts/siScore0.groovy

 	def parent = target.parent
 	def grandParent = parent.parent
 
+	// set score
 	target.icons.icons.findAll { it.startsWith('full') }.each {
 		target.icons.remove(it)
 	}
 	target.icons.add("full-${full}")
 	target.style.font.size = baseTextSize + full
 
+	// calculate pro average
 	def pros = parent.children*.icons.findAll {
 		it.first == 'very_positive' }.collect { it[1][-1].toInteger() }
 	pros = pros.size() > 0 ? pros : [0]
 	def prosAvg = (pros.sum() / pros.size()).toDouble().round().toInteger()
 
+	// calculante con average
 	def cons = parent.children*.icons.findAll {
 		it.first == 'very_negative' }.collect { it[1][-1].toInteger() }
 	cons = cons.size() > 0 ? cons : [0]
 	full = (prosAvg - consAvg)
 	full = full > 0 ? full : 0
 
+	// sort node and peers by score
 	parent.icons.icons.findAll { it.startsWith('full') }.each {
 		parent.icons.remove(it)
 	}
 	c.select(firstChild)
 	firstChild.style.font.bold = true
 
+	// sort parent and peers by children's averages
 	hold = grandParent.children.findAll {
 		it.icons.contains('idea')
 	}.each { it.style.font.bold = false }.sort {

scripts/siScore1.groovy

 	def parent = target.parent
 	def grandParent = parent.parent
 
+	// set score
 	target.icons.icons.findAll { it.startsWith('full') }.each {
 		target.icons.remove(it)
 	}
 	target.icons.add("full-${full}")
 	target.style.font.size = baseTextSize + full
 
+	// calculate pro average
 	def pros = parent.children*.icons.findAll {
 		it.first == 'very_positive' }.collect { it[1][-1].toInteger() }
 	pros = pros.size() > 0 ? pros : [0]
 	def prosAvg = (pros.sum() / pros.size()).toDouble().round().toInteger()
 
+	// calculante con average
 	def cons = parent.children*.icons.findAll {
 		it.first == 'very_negative' }.collect { it[1][-1].toInteger() }
 	cons = cons.size() > 0 ? cons : [0]
 	full = (prosAvg - consAvg)
 	full = full > 0 ? full : 0
 
+	// sort node and peers by score
 	parent.icons.icons.findAll { it.startsWith('full') }.each {
 		parent.icons.remove(it)
 	}
 	c.select(firstChild)
 	firstChild.style.font.bold = true
 
+	// sort parent and peers by children's averages
 	hold = grandParent.children.findAll {
 		it.icons.contains('idea')
 	}.each { it.style.font.bold = false }.sort {

scripts/siScore2.groovy

 	def parent = target.parent
 	def grandParent = parent.parent
 
+	// set score
 	target.icons.icons.findAll { it.startsWith('full') }.each {
 		target.icons.remove(it)
 	}
 	target.icons.add("full-${full}")
 	target.style.font.size = baseTextSize + full
 
+	// calculate pro average
 	def pros = parent.children*.icons.findAll {
 		it.first == 'very_positive' }.collect { it[1][-1].toInteger() }
 	pros = pros.size() > 0 ? pros : [0]
 	def prosAvg = (pros.sum() / pros.size()).toDouble().round().toInteger()
 
+	// calculante con average
 	def cons = parent.children*.icons.findAll {
 		it.first == 'very_negative' }.collect { it[1][-1].toInteger() }
 	cons = cons.size() > 0 ? cons : [0]
 	full = (prosAvg - consAvg)
 	full = full > 0 ? full : 0
 
+	// sort node and peers by score
 	parent.icons.icons.findAll { it.startsWith('full') }.each {
 		parent.icons.remove(it)
 	}
 	c.select(firstChild)
 	firstChild.style.font.bold = true
 
+	// sort parent and peers by children's averages
 	hold = grandParent.children.findAll {
 		it.icons.contains('idea')
 	}.each { it.style.font.bold = false }.sort {

scripts/siScore3.groovy

 	def parent = target.parent
 	def grandParent = parent.parent
 
+	// set score
 	target.icons.icons.findAll { it.startsWith('full') }.each {
 		target.icons.remove(it)
 	}
 	target.icons.add("full-${full}")
 	target.style.font.size = baseTextSize + full
 
+	// calculate pro average
 	def pros = parent.children*.icons.findAll {
 		it.first == 'very_positive' }.collect { it[1][-1].toInteger() }
 	pros = pros.size() > 0 ? pros : [0]
 	def prosAvg = (pros.sum() / pros.size()).toDouble().round().toInteger()
 
+	// calculante con average
 	def cons = parent.children*.icons.findAll {
 		it.first == 'very_negative' }.collect { it[1][-1].toInteger() }
 	cons = cons.size() > 0 ? cons : [0]
 	full = (prosAvg - consAvg)
 	full = full > 0 ? full : 0
 
+	// sort node and peers by score
 	parent.icons.icons.findAll { it.startsWith('full') }.each {
 		parent.icons.remove(it)
 	}
 	c.select(firstChild)
 	firstChild.style.font.bold = true
 
+	// sort parent and peers by children's averages
 	hold = grandParent.children.findAll {
 		it.icons.contains('idea')
 	}.each { it.style.font.bold = false }.sort {

scripts/siScore4.groovy

 	def parent = target.parent
 	def grandParent = parent.parent
 
+	// set score
 	target.icons.icons.findAll { it.startsWith('full') }.each {
 		target.icons.remove(it)
 	}
 	target.icons.add("full-${full}")
 	target.style.font.size = baseTextSize + full
 
+	// calculate pro average
 	def pros = parent.children*.icons.findAll {
 		it.first == 'very_positive' }.collect { it[1][-1].toInteger() }
 	pros = pros.size() > 0 ? pros : [0]
 	def prosAvg = (pros.sum() / pros.size()).toDouble().round().toInteger()
 
+	// calculante con average
 	def cons = parent.children*.icons.findAll {
 		it.first == 'very_negative' }.collect { it[1][-1].toInteger() }
 	cons = cons.size() > 0 ? cons : [0]
 	full = (prosAvg - consAvg)
 	full = full > 0 ? full : 0
 
+	// sort node and peers by score
 	parent.icons.icons.findAll { it.startsWith('full') }.each {
 		parent.icons.remove(it)
 	}
 	c.select(firstChild)
 	firstChild.style.font.bold = true
 
+	// sort parent and peers by children's averages
 	hold = grandParent.children.findAll {
 		it.icons.contains('idea')
 	}.each { it.style.font.bold = false }.sort {

scripts/siScore5.groovy

 	def parent = target.parent
 	def grandParent = parent.parent
 
+	// set score
 	target.icons.icons.findAll { it.startsWith('full') }.each {
 		target.icons.remove(it)
 	}
 	target.icons.add("full-${full}")
 	target.style.font.size = baseTextSize + full
 
+	// calculate pro average
 	def pros = parent.children*.icons.findAll {
 		it.first == 'very_positive' }.collect { it[1][-1].toInteger() }
 	pros = pros.size() > 0 ? pros : [0]
 	def prosAvg = (pros.sum() / pros.size()).toDouble().round().toInteger()
 
+	// calculante con average
 	def cons = parent.children*.icons.findAll {
 		it.first == 'very_negative' }.collect { it[1][-1].toInteger() }
 	cons = cons.size() > 0 ? cons : [0]
 	full = (prosAvg - consAvg)
 	full = full > 0 ? full : 0
 
+	// sort node and peers by score
 	parent.icons.icons.findAll { it.startsWith('full') }.each {
 		parent.icons.remove(it)
 	}
 	c.select(firstChild)
 	firstChild.style.font.bold = true
 
+	// sort parent and peers by children's averages
 	hold = grandParent.children.findAll {
 		it.icons.contains('idea')
 	}.each { it.style.font.bold = false }.sort {