From 86e5c7f4db266974b21825084517023eccccd050 Mon Sep 17 00:00:00 2001 From: Tangent Date: Sat, 13 Jan 2024 18:04:55 -0700 Subject: [PATCH] fixed a typo and stuff aaa; 2webm confirmed working --- 2webm.lua | 2 +- README.md | 1 + test.lua | 6 +++--- utility-functions.lua | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/2webm.lua b/2webm.lua index 1f136ed..d51ca5d 100644 --- a/2webm.lua +++ b/2webm.lua @@ -17,7 +17,7 @@ if arg[1] and arg[1]:find("help") then 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 diff --git a/README.md b/README.md index 6d73564..3b26757 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ It's like dotfiles, but no, it's just Lua scripts I find useful. ## 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). - `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. diff --git a/test.lua b/test.lua index dade58e..62ac8de 100644 --- a/test.lua +++ b/test.lua @@ -6,8 +6,8 @@ utility = dofile(arg[0]:match("@?(.*/)") or arg[0]:match("@?(.*\\)") .. "utility print("---") -for k,v in pairs(utility) do - print(k,v) -end +-- local value = os.execute("where ffmpeg") +-- print(value, type(value)) +utility.required_program("ffmpeg") print("---") diff --git a/utility-functions.lua b/utility-functions.lua index 4cdefe2..6c5d954 100644 --- a/utility-functions.lua +++ b/utility-functions.lua @@ -40,7 +40,7 @@ end utility.required_program = function(name) local command 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 command = "which " end