9 # 3. echo 0 > data/count
10 # 4. change data_dir below
11 data_dir
= '/home/bansheeweb/download.banshee-project.org/metrics/data/';
14 form
= cgi
.FieldStorage()
17 # Read the current count
18 f
= open(data_dir
+ 'count', 'r')
23 # Increment it and write it out
24 f
= open(data_dir
+ 'count', 'w')
29 # Save the POSTed file
30 filename
= data_dir
+ str(count
) + '.json'
31 f
= open(filename
, 'w')
34 line
= form
.file.readline()
41 os
.system ('gzip ' + filename
)
45 print "Status-Code: 200"
46 print "Content-type: text/html"
49 print "Status-Code: 500"