Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- DFPWM Tape recorder by http://szymekk.me
- local args = { ... }
- local link = args[1]
- local label = args[2]
- if not args[1] then
- print("Usage: tape-download link [label]")
- return
- end
- print("Downloading the file")
- local response = http.get("http://home.szymekk.me/dfpwm/convert.py?link=" .. link)
- if label then
- tape.setLabel(label)
- end
- tape = peripheral.wrap("left")
- print("Recording tape")
- data = response.readLine()
- while data do
- tape.write(tonumber(data))
- data = response.readLine()
- end
- print("Done! Please rewind the tape.")
Advertisement
Add Comment
Please, Sign In to add comment