This commit is contained in:
Tangent / Rose / Nebula Rosa 2024-11-05 21:54:00 -07:00
parent b3d10e9b6f
commit e1ef52ad69
4 changed files with 30 additions and 6 deletions

View File

@ -3,7 +3,13 @@
-- The first time this is run (on Windows), a dialog will appear. -- The first time this is run (on Windows), a dialog will appear.
-- Uncheck the "always show this" thing and click Install. -- Uncheck the "always show this" thing and click Install.
local error_occurred, utility = pcall(function() return dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility-functions.lua") end) if not error_occurred then error("\n\nThis script is installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n") end local success, utility = pcall(function()
return dofile((arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "utility-functions.lua")
end)
if not success then
print("\n\n" .. tostring(utility))
error("\n\nThis script may be installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n")
end
local for_files = utility.ls() local for_files = utility.ls()
os.execute("mkdir 2pdf-output") os.execute("mkdir 2pdf-output")

View File

@ -16,7 +16,14 @@ if arg[1] and arg[1]:find("help") then
return false return false
end end
local error_occurred, utility = pcall(function() return dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility-functions.lua") end) if not error_occurred then error("\n\nThis script is installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n") end local success, utility = pcall(function()
return dofile((arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "utility-functions.lua")
end)
if not success then
print("\n\n" .. tostring(utility))
error("\n\nThis script may be installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n")
end
utility.required_program("ffmpeg") utility.required_program("ffmpeg")
local threads = tonumber(arg[1]) or arg[1] or 1 local threads = tonumber(arg[1]) or arg[1] or 1

View File

@ -19,7 +19,14 @@ if arg[1] and arg[1]:find("help") then
return false return false
end end
local error_occurred, utility = pcall(function() return dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility-functions.lua") end) if not error_occurred then error("\n\nThis script is installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n") end local success, utility = pcall(function()
return dofile((arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "utility-functions.lua")
end)
if not success then
print("\n\n" .. tostring(utility))
error("\n\nThis script may be installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n")
end
utility.required_program("ffmpeg") utility.required_program("ffmpeg")
local tune local tune

View File

@ -1,8 +1,12 @@
#!/usr/bin/env luajit #!/usr/bin/env luajit
-- if utility-functions.lua has an error, this won't show it, so for testing purposes, I don't use it here local success, utility = pcall(function()
-- local error_occurred, utility = pcall(function() return dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility-functions.lua") end) if not error_occurred then error("\n\nThis script is installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n") end return dofile((arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)")) .. "utility-functions.lua")
utility = dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility-functions.lua") end)
if not success then
print("\n\n" .. tostring(utility))
error("\n\nThis script may be installed improperly. Follow instructions at:\n\thttps://github.com/TangentFoxy/.lua-files#installation\n")
end
print("---") print("---")