Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: Lua .tar.gz - Viewer< Next Oldest | Next Newest >
struppi Offline





Group: Members
Posts: 93
Joined: Dec. 2004
Posted: Sep. 18 2005,17:39 QUOTE

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.
Back to top
Profile PM 
SaidinUnleashed Offline





Group: Members
Posts: 1428
Joined: Mar. 2004
Posted: Sep. 19 2005,05:04 QUOTE

Or, you can just double-click the tar.gz file in emelfm, and you can view the contents, or even use what's inside if you want. When you are done, you can either repack the tarball with your changes, of leave it as it was.

-J.P.


--------------
They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, cause if you play it forwards, it installs Windows.

Unleash the power of the TILDE~~~
Back to top
Profile PM AOL MSN YIM 
1 replies since Sep. 18 2005,17:39 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: Lua .tar.gz - Viewer

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code