| struppi  
 
 
 
 
 Group: Members
 Posts: 93
 Joined: Dec. 2004
 | 
|  | Posted: Sep. 18 2005,17:39 |  |  hello,
 
 i like rox and think, that this filemanager is a perfect tool to make dsl more comfortable for newbies.
 
 i another flua-script to improve rox' ability to browse around:
 
 | Code Sample |  | #!/bin/flua -f 
 -- Archive einsehen
 
 if getn(arg) == 1 then
 archive = arg[1]
 else
 print("usage: viewTarGz.lua [archive]")
 exit(1)
 end
 
 execute('tar -ztf '..archive..' > index.txt')
 local file,err = openfile("index.txt", "r")
 
 if not file then
 print("Cannot open file index.txt: ".. err)
 exit(1)
 end
 
 filetable = {}
 fname = tmpname()
 filelist = openfile(fname,"w")
 line = read(file, "*l")
 while line do
 result = line
 if result then
 tinsert(filetable,result)
 write(filelist, result .. "\n")
 end
 line = read(file,"*l")
 end
 closefile(file)
 closefile(filelist)
 
 w = Window{250,300,archive}
 function w:callback()
 remove(fname)
 remove('index.txt')
 exit(0)
 end
 
 browser = Browser{0,0,250,300}
 
 if not browser:load(fname) then
 print("can't load ", fname)
 exit(1)
 end
 
 browser.position = 0
 w.resizable = browser
 w:show()
 | 
 
 use this script as "run action" for rox and you can view the content of all *.tar.gz-files.
 |