1
This commit is contained in:
parent
4c7296ac84
commit
7a12ea8557
@ -38,16 +38,21 @@ local width, height = term.getSize() -- 获取终端尺寸(width=宽度,hei
|
||||
local width = width * 2 -- 宽度×2
|
||||
local height = height * 3 -- 高度×3
|
||||
|
||||
|
||||
local download_url = Get_image_url(INPUT_URL,API_URL,width,height)
|
||||
|
||||
|
||||
-- ===== 显示图片 / Display image =====
|
||||
print("\nConversion successful! Download URL:")
|
||||
print(download_url)
|
||||
luafile = http.get(download_url)
|
||||
if luafile then
|
||||
-- 保存Lua文件 / Save Lua file
|
||||
print("\nLua file downloaded successfully.")
|
||||
local data = luafile.readAll()
|
||||
print("\nExecuting Lua code...")
|
||||
load(data)()
|
||||
f = fs.open("demo.lua", "w")
|
||||
f.write(luafile.readAll())
|
||||
f.close()
|
||||
print("\nLua file saved as demo.lua.")
|
||||
else
|
||||
print("\nFailed to download Lua file.")
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user