You can download it here, or you can copy the following code into the edit program:
local tArgs = { ... } if #tArgs < 2 then print(fs.getName(shell.getRunningProgram()).." <code> <path>") return end if not fs.exists(tArgs[2]) then -- Download local response = http.get("http://pastebin.com/download.php?i="..tArgs[1]) if response then print("Success.") local data = response.readAll() local f = fs.open(tArgs[2], "w") f.write(data) f.close() print(tArgs[1].." has been saved to "..tArgs[2]) else print("Failure to download.") end else print("File exists.") end
The problem is simply that the shell pastebin program uses the URL: "http://pastebin.com/raw.php" whereas this program uses "http://pastebin.com/download.php"
Enjoy!
Edited by Lego Stax, 19 September 2014 - 02:25 AM.