old_contents: """
  Database Emulator for the teammetrics project
  Temporarily the data is generated by accessing data available at http://blend.debian.org/liststats
  
  """
  import urllib2
  import logging
  
  def extractMetrics(team, metric):
  	"""
  	Parses the data available at the url into a data structure.
  	"""
  	url = "http://blends.debian.net/liststats/"+metric+"_"+team+"_year.txt"
  	lines = urllib2.urlopen(url).readlines()
  	ll = len(lines)
  	names = lines[0].split('\t')
  	results = list()
  	for i in range (1,ll):
  		data =  lines[i].split('\t')
  		year = data[0]
  		results.append(dict());
  		results[len(results)-1]["year"]=year;
  		results[len(results)-1]["userdata"]=list();
  		
  		lw = len(data)
  		yeardata=dict()
  		for j in range(1,lw):
  			results[len(results)-1]["userdata"].append(dict())
  			results[len(results)-1]["userdata"][len(results[len(results)-1]["userdata"])-1]["user"]=names[j]
  			results[len(results)-1]["userdata"][len(results[len(results)-1]["userdata"])-1]["data"]=data[j]
  	metricresult = dict()
  	metricresult["metric"]=metric
  	metricresult["data"]=results;
  	return metricresult
  
  
new_contents: """
  Database Emulator for the teammetrics project
  Temporarily the data is generated by accessing data available at http://blend.debian.org/liststats
  
  """
  import urllib2
  import logging
  
  def extractMetrics(team, metric):
  	"""
  	Parses the data available at the url into a data structure.
  	"""
  	url = "http://blends.debian.net/liststats/"+metric+"_"+team+"_year.txt"
  	lines = urllib2.urlopen(url).readlines()
  	ll = len(lines)
  	names = lines[0].split('\t')
  	results = list()
  	for i in range(1,ll):
  		data = lines[i].split('\t')
  		ld = len(data)
  		
  		for j in range (1,ld):
  			if(i==1):
  				results.append(dict())
  				results[j-1]["user"]=names[j].strip();
  				results[j-1]["userdata"]=list()
  			results[j-1]["userdata"].append(dict())
  			results[j-1]["userdata"][i-1]["year"]=data[0].strip()
  			results[j-1]["userdata"][i-1]["data"]=data[j].strip()
  	metricresult = dict()
  	metricresult["metric"]=metric
  	metricresult["data"]=results;
  	return metricresult
  
subject: Update the API to make it more semantic.