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 width = width * 2 -- 宽度×2
|
||||||
local height = height * 3 -- 高度×3
|
local height = height * 3 -- 高度×3
|
||||||
|
|
||||||
|
|
||||||
local download_url = Get_image_url(INPUT_URL,API_URL,width,height)
|
local download_url = Get_image_url(INPUT_URL,API_URL,width,height)
|
||||||
|
|
||||||
|
|
||||||
-- ===== 显示图片 / Display image =====
|
-- ===== 显示图片 / Display image =====
|
||||||
print("\nConversion successful! Download URL:")
|
print("\nConversion successful! Download URL:")
|
||||||
print(download_url)
|
print(download_url)
|
||||||
luafile = http.get(download_url)
|
luafile = http.get(download_url)
|
||||||
if luafile then
|
if luafile then
|
||||||
|
-- 保存Lua文件 / Save Lua file
|
||||||
print("\nLua file downloaded successfully.")
|
print("\nLua file downloaded successfully.")
|
||||||
local data = luafile.readAll()
|
f = fs.open("demo.lua", "w")
|
||||||
print("\nExecuting Lua code...")
|
f.write(luafile.readAll())
|
||||||
load(data)()
|
f.close()
|
||||||
|
print("\nLua file saved as demo.lua.")
|
||||||
else
|
else
|
||||||
print("\nFailed to download Lua file.")
|
print("\nFailed to download Lua file.")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user