cc-stuff/ccshow.lua

18 lines
328 B
Lua

local ccpi = require("ccpi")
local args = { ... }
local terminal = term.current()
if args[1] == "-m" then
table.remove(args, 1)
terminal = peripheral.wrap(table.remove(args, 1))
end
local img, err = ccpi.load(args[1])
if not img then
printError(err)
return
end
terminal.clear()
ccpi.draw(img, 1, 1, terminal)