aboutsummaryrefslogtreecommitdiffstats
path: root/modules/garret/simpleconf.lua
diff options
context:
space:
mode:
authorgarret <garret@airmail.cc>2022-06-17 22:45:44 +0100
committergarret <garret@airmail.cc>2022-06-17 22:52:44 +0100
commitd636f1b008fa1dfc665b9eff2764002202631e13 (patch)
tree1857ae6327895f8f731df06f7cc1239f179f42a4 /modules/garret/simpleconf.lua
parenta86e96d96b1c018a91a8d656e9e85e8f2507c120 (diff)
downloadaegisub-scripts-d636f1b008fa1dfc665b9eff2764002202631e13.tar.gz
aegisub-scripts-d636f1b008fa1dfc665b9eff2764002202631e13.tar.bz2
aegisub-scripts-d636f1b008fa1dfc665b9eff2764002202631e13.zip
nuke old and bad config stuff
This reverts commit 52f3a086f2ad7a3bbc9b8f8225a99e9e99120613. It also manually bandages over the places where it was ripped out. it was never a good idea in the first place
Diffstat (limited to 'modules/garret/simpleconf.lua')
-rw-r--r--modules/garret/simpleconf.lua46
1 files changed, 0 insertions, 46 deletions
diff --git a/modules/garret/simpleconf.lua b/modules/garret/simpleconf.lua
deleted file mode 100644
index 6d5f1a8..0000000
--- a/modules/garret/simpleconf.lua
+++ /dev/null
@@ -1,46 +0,0 @@
--- primitive config handler
-
-local function tobool(value)
- if value == "true" then
- return true
- elseif value == "false" then
- return false
- else
- return nil
- end
-end
-
-local function cast(value)
- return tonumber(value) or tobool(value) or value
-end
-
-local function get_config(config_file, defaults)
- local conf = defaults or {}
- local ok, lines = pcall(io.lines, config_file)
- if ok then
- for line in lines do
- local key, value = string.match(line, "(%a+)%s*=%s*(.+)")
- conf[key] = cast(value)
- end
- end
- return conf
-end
-
-local simpleconf = {get_config = get_config}
-
-
-local have_depctrl, depctrl = pcall(require, "l0.DependencyControl")
-
-if have_depctrl then
- local version = depctrl{
- name = "Simple (bad) Config",
- version = "0.1.0",
- description = "primitive config handler",
- author = "garret",
- url = "http://github.com/garret1317/aegisub-scripts",
- moduleName = "garret.simpleconf"}
- simpleconf.version = version
- return version:register(simpleconf)
-else
- return simpleconf
-end