This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Creeper9207's profile picture

wget program [file downloader] [gui] [much wow!]

Started by Creeper9207, 17 February 2015 - 11:50 PM
Creeper9207 #1
Posted 18 February 2015 - 12:50 AM
New wget program, again, havent really seen a very… quality program for this, atleast not one dedicated soely to this purpose: downloading files

Install it:
Spoilerpastebin get QWfprnTx wget

this program is made to work out-of-the-box, and it detects its own first run.
just run the program, and it will install itself if it needs it!

usage:
downloading a file from internet:
wget download <url (WITH "HTTP://"!)> <file name>
update:
wget update
api help:
wget apihelp
use the gui!!!:
wget gui

feel free to use in OSes, just keep the top comment with my name on it
it also has an api built in!
functions:
openGUI()
downloadFile(string url, string outputfile)
silentDownload(string url, string outputfile)
screenClear()
example: (this will download a file without any disruptions, perfect for downloading without anyone noticing)
os.loadAPI("wgetAPI")
wget.silentDownload("http://creeper9207.com/file.html", "file.html")

more api info:
when you install the program, it downloads the api file, to the root folder as "wgetAPI", get the standalone api: pastebin get T9X1D1He

THERES A GUI!
it pretty simple, heres a gui screenshot!
Spoiler[attachment=2116:2015-02-18_20.25.14.png]

Note: to show off how good the api is, the program actually uses the api!
other note: dont delete files in .wget directory, those are the prorgams dependencies!
Edited on 18 February 2015 - 03:45 AM
Krutoy242 #2
Posted 15 March 2015 - 10:41 AM
This program can be very userful. Its work, but in first run throw two errors:



Also, it demand to input first argument as option, but can you change it, and if first argument is URL, automatically choose "download"?


And last, i tryed to load binary file. It size is 27 800 bites, but after DL on CC it become 49 509 b. Do you know way to get binary files from web?
KingofGamesYami #3
Posted 15 March 2015 - 09:24 PM
CC's http api only supports downloading plain-text files. It'll do the same thing if you try to send it through the event system or rednet / modems.
thecrimulo #4
Posted 01 July 2016 - 06:44 PM
It throws me "unknown error", there is no other error code.

Actually, i've put the silent download code in another empty file and printed event, eUrl and content. event = "key_up", eUrl = 28, content = ""
Edited on 01 July 2016 - 10:47 PM
Bomb Bloke #5
Posted 02 July 2016 - 12:51 AM
Heh, when KoGY told you to use wget, he meant the one built into ComputerCraft. I suspect the particular script you've found here requires an update to work with whatever version of ComputerCraft you're using.

You do need to be on at least CC 1.77 or later to have access to CC's own "wget", though. Otherwise you may be better off simply using http.get() directly.
thecrimulo #6
Posted 02 July 2016 - 03:26 AM
Well, I'm on a server, and I didn't found any wget program, so I supposed it was this. Anyways, kinda solved it out by various sources
LDDestroier #7
Posted 02 July 2016 - 03:47 AM
As for a download program, this seems like a more fitting time than any to shamelessly plug in my Super Text Downloader, which has a wget function (std dd [path]). My profile page had the link to it.
Edited on 02 July 2016 - 01:48 AM