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
Pages: (5) </ 1 2 3 [4] 5 >/

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

reply to topic new topic new poll
Topic: wget gui, in lua< Next Oldest | Next Newest >
jaapz Offline





Group: Members
Posts: 129
Joined: May 2007
Posted: April 04 2008,07:27 QUOTE

What can u excaclty do with those sockets?
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: April 04 2008,16:08 QUOTE

You can go low level and implement an RFC as the example that I posted.

Or you can use higher level known protocols like FTP

Here is a trivial example: (Warning this script will try to download the mydsl extension Xeyes into the current directory)

Code Sample

#!/bin/murgaLua
local ftp = require("socket.ftp")
file,error = ftp.get("ftp://ibiblio.org/pub/Linux/distributions/damnsmall/mydsl/apps/xeyes.info")
if error == nil then io.output("xeyes.info"); io.write(file); end
file,error = ftp.get("ftp://ibiblio.org/pub/Linux/distributions/damnsmall/mydsl/apps/xeyes.tar.gz.md5.txt")
if error == nil then io.output("xeyes.tar.gz.md5.txt"); io.write(file); end
file,error = ftp.get("ftp://ibiblio.org/pub/Linux/distributions/damnsmall/mydsl/apps/xeyes.tar.gz;type=i")
if error == nil then io.output("xeyes.tar.gz"); io.write(file); end
Back to top
Profile PM WEB 
jaapz Offline





Group: Members
Posts: 129
Joined: May 2007
Posted: April 04 2008,20:44 QUOTE

is it possible to use those sockets and get a progress bar in the gui?
anyways, it looks cool, certainly gonna look at that some more
Back to top
Profile PM 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: April 04 2008,20:59 QUOTE

It would seem to me that in order to have a progress bar would be to fetch the file in chunks then it would be easy to write a co-routine and having such would not be difficult to display a progress bar.

Using the standard protocol ftp does not allow chunks. So, I would think the more difficult part would be to use the lower level socket interface and use the RFC specs for FTP. Much more work but doable. ATM I am very busy with working on new DSL tiny core or I would attempt it. Maybe later if still not done.
Back to top
Profile PM WEB 
jaapz Offline





Group: Members
Posts: 129
Joined: May 2007
Posted: April 04 2008,21:59 QUOTE

Ok, but when using sockets, are we still using wget? Cos this app is actually a wget GUI xD.
Back to top
Profile PM 
21 replies since Mar. 31 2008,15:53 < Next Oldest | Next Newest >

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

Pages: (5) </ 1 2 3 [4] 5 >/
reply to topic new topic new poll
Quick Reply: wget gui

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