fixed a typo and stuff aaa; 2webm confirmed working

This commit is contained in:
Tangent / Rose / Nebula Rosa 2024-01-13 18:04:55 -07:00
parent 828a77d20b
commit 86e5c7f4db
4 changed files with 6 additions and 5 deletions

View File

@ -17,7 +17,7 @@ if arg[1] and arg[1]:find("help") then
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 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.required_program("ffpmeg") 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

@ -2,6 +2,7 @@
It's like dotfiles, but no, it's just Lua scripts I find useful. It's like dotfiles, but no, it's just Lua scripts I find useful.
## Scripts ## Scripts
- `2webm.lua`: Converts everything in the working directory to .webm files.
- `popen-command-test.lua`: A badly-named WIP script for working with LLMs through WSL using [ollama](https://github.com/jmorganca/ollama). - `popen-command-test.lua`: A badly-named WIP script for working with LLMs through WSL using [ollama](https://github.com/jmorganca/ollama).
- `print-arguments.lua`: For testing how a Lua script receives arguments. (It can be platform-specific.) - `print-arguments.lua`: For testing how a Lua script receives arguments. (It can be platform-specific.)
- `test.lua`: (Dev Test) Used repeatedly while working on these scripts to verify minor details I'm forgetful about. - `test.lua`: (Dev Test) Used repeatedly while working on these scripts to verify minor details I'm forgetful about.

View File

@ -6,8 +6,8 @@ utility = dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility
print("---") print("---")
for k,v in pairs(utility) do -- local value = os.execute("where ffmpeg")
print(k,v) -- print(value, type(value))
end utility.required_program("ffmpeg")
print("---") print("---")

View File

@ -40,7 +40,7 @@ end
utility.required_program = function(name) utility.required_program = function(name)
local command local command
if utility.OS == "Windows" then if utility.OS == "Windows" then
command = "where " -- NOTE: This will sometimes print errors that do not matter. Windows, am I right? command = "where " -- NOTE: This will print a path when it works. :\ Windows, am I right?
else else
command = "which " command = "which "
end end