5 SYSTEM = "Matita---0.1.0.UNS-Ref.s"
6 URL = "http://www.cs.miami.edu/~tptp/cgi-bin/DVTPTP2WWW/view_file.pl?Category=Solutions&Domain=%s&File=%s&System=%s"
8 function url_for(system, problem)
9 local domain = string.sub(problem,1,3)
10 local url = string.format(URL,domain,problem,system)
14 function load_todo_list(file)
15 local f = io.open(file,"r")
25 assert(table.getn(argv) == 1,
26 "Only one paarmeter: the file containing the problems")
27 local todo = load_todo_list(argv[1])
28 local todo_size = table.getn(todo)
30 local filename = todo[i]
31 local url = url_for(SYSTEM,filename)
32 print("Fetching "..filename.." ("..i.."/"..todo_size..") "..url)
33 local data,err = socket.http.get(url)
35 local logfilename = "log."..filename
36 local f = io.open(logfilename,"w")
39 os.execute("gzip -f "..logfilename)