Exemple #1
0
def update_names():
	server.cachedata=server.load_cachedata()
	for i in server.cachedata["valid_caches"]:
		print "Pulling for '"+i+"'...",
		server.cachedata["name_mappings"][i]=get_name(i)
		print "Name="+server.cachedata["name_mappings"][i]
	server.save_cachedata()
Exemple #2
0
def update_names():
    server.cachedata = server.load_cachedata()
    for i in server.cachedata["valid_caches"]:
        print "Pulling for '" + i + "'...",
        server.cachedata["name_mappings"][i] = get_name(i)
        print "Name=" + server.cachedata["name_mappings"][i]
    server.save_cachedata()
Exemple #3
0
#!/usr/bin/python

import os, server

valid=server.load_cachedata()["valid_caches"]
toclear=[]

for x in os.listdir('cache'):
	if x!="dummy" and x.replace(".wav","") not in valid:
		toclear.append(x)

print "This will remove: "+", ".join(toclear)
if raw_input("Sure? (y/N) ").upper()=="Y":
	for x in toclear:
		os.system("yes|sudo rm cache/"+x)
	print "Done"
else:
	print "Aborted"
Exemple #4
0
#!/usr/bin/python

import os, server

valid = server.load_cachedata()["valid_caches"]
toclear = []

for x in os.listdir('cache'):
    if x != "dummy" and x.replace(".wav", "") not in valid:
        toclear.append(x)

print "This will remove: " + ", ".join(toclear)
if raw_input("Sure? (y/N) ").upper() == "Y":
    for x in toclear:
        os.system("yes|sudo rm cache/" + x)
    print "Done"
else:
    print "Aborted"