~jordanreger/cc

cc/srht.lua -rw-r--r-- 239 bytes
51b7c72cJordan Reger feat(xNet): initial commit 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
local args = {...}

local response = http.get("https://paste.sr.ht/blob/" .. textutils.urlEncode(args[1]))

local file = fs.open(args[2] .. ".lua", "w")

file.write(response.readAll())

file.close()

print("Saved to " .. args[2] .. ".lua")