Example #1
0
def csvfy(filename):
	out = getCSV(filename)
	oName = str(time.mktime(datetime.datetime.now().timetuple()))+'.csv'
	toCSV(oName, out)
	title = "Json -> CSV"
	message = "Json has been converted to CSV"
	return render_template('generalout.html',title = title, message = message, imagePath = "", outputFilename = oName, filename = filename, pad = True)
Example #2
0
def keysums(filename):
	vals = getKeySums(filename)
	out = keySumsToString(vals)
	oName = str(time.mktime(datetime.datetime.now().timetuple()))+'.csv'
	toCSV(oName, out)
	title = "Unique Keys and Counts"
	message = ""
	return render_template('generalout.html',title = title, message = message, imagePath = "", outputFilename = oName, filename = filename, piechart = True, vals = vals)
Example #3
0
def keysumsbyplayer(filename):
	#f = send_from_directory(app.config['UPLOAD_FOLDER'], filename)
	out = getKeySumsByPlayer(filename)
	oName = str(time.mktime(datetime.datetime.now().timetuple()))+'.csv'
	toCSV(oName, out)
	title = "Unique Keys and counts by player"
	message = ""#out  #Out should be what we see, but right now it's unreadable. Fix this.
	return render_template('generalout.html',title = title, message = message, imagePath = "", outputFilename = oName, filename = filename, pad = True)