forked from hkc/cc-stuff
1
0
Fork 0
cc-stuff/ccshow.lua

18 lines
328 B
Lua
Raw Normal View History

2023-10-17 19:10:09 +03:00
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)