mirror of
https://github.com/TangentFoxy/.lua-files.git
synced 2024-11-20 21:34:23 +00:00
Fix #20
This commit is contained in:
parent
b3d10e9b6f
commit
e1ef52ad69
8
2pdf.lua
8
2pdf.lua
@ -3,7 +3,13 @@
|
||||
-- The first time this is run (on Windows), a dialog will appear.
|
||||
-- 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()
|
||||
os.execute("mkdir 2pdf-output")
|
||||
|
@ -16,7 +16,14 @@ if arg[1] and arg[1]:find("help") then
|
||||
return false
|
||||
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")
|
||||
|
||||
local threads = tonumber(arg[1]) or arg[1] or 1
|
||||
|
9
720p.lua
9
720p.lua
@ -19,7 +19,14 @@ if arg[1] and arg[1]:find("help") then
|
||||
return false
|
||||
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")
|
||||
|
||||
local tune
|
||||
|
10
test.lua
10
test.lua
@ -1,8 +1,12 @@
|
||||
#!/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 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
|
||||
utility = dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility-functions.lua")
|
||||
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
|
||||
|
||||
print("---")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user