aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
Diffstat (limited to 'macros')
-rw-r--r--macros/garret.chapters.lua15
-rw-r--r--macros/garret.restyler.lua13
2 files changed, 8 insertions, 20 deletions
diff --git a/macros/garret.chapters.lua b/macros/garret.chapters.lua
index 826ca93..bcb78b9 100644
--- a/macros/garret.chapters.lua
+++ b/macros/garret.chapters.lua
@@ -5,24 +5,16 @@ script_version = "2.1.0"
script_namespace = "garret.chapters"
local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl")
-local simpleconf, config_dir
if haveDepCtrl then
depctrl = DependencyControl {
--feed="TODO",
- {
- {"garret.simpleconf", url="https://github.com/garret1317/aegisub-scripts",}
- --feed="TODO"},
- }
}
- simpleconf = depctrl:requireModules()
- config_dir = depctrl.configDir
-else
- simpleconf = require 'garret.simpleconf'
- config_dir = "?user/config"
end
-local config = simpleconf.get_config(aegisub.decode_path(config_dir.."/"..script_namespace..".conf"), {language = "eng", language_ietf = "en"})
+--local config = simpleconf.get_config(aegisub.decode_path(config_dir.."/"..script_namespace..".conf"), {language = "eng", language_ietf = "en"})
+local config = {language = "eng", language_ietf = "en"}
+
function ms_to_human(start) -- From Significance
local timecode=math.floor(start/1000)
@@ -62,7 +54,6 @@ function get_user_path(default_dir)
end
function main(sub)
- aegisub.log(config_dir)
local times = {}
local names = {}
for i=1,#sub do
diff --git a/macros/garret.restyler.lua b/macros/garret.restyler.lua
index 1c5dc9f..043ee1e 100644
--- a/macros/garret.restyler.lua
+++ b/macros/garret.restyler.lua
@@ -5,22 +5,19 @@ script_version = "2.1.0"
script_namespace = "garret.restyler"
local haveDepCtrl, DependencyControl, depctrl = pcall(require, "l0.DependencyControl")
-local simpleconf
+local karaskel, cleantags
if haveDepCtrl then
depctrl = DependencyControl {
--feed="TODO",
- {"karaskel", "cleantags", {"garret.simpleconf", url="https://github.com/garret1317/aegisub-scripts"}, }
+ {"karaskel", "cleantags"}
}
- kara, clean, simpleconf = depctrl:requireModules()
- config_dir = depctrl.configDir
+ kara, clean = depctrl:requireModules()
else
include("karaskel.lua")
include("cleantags.lua")
- simpleconf = require 'garret.simpleconf'
- config_dir = "?user/config"
end
-local config = simpleconf.get_config(aegisub.decode_path(config_dir.."/"..script_namespace..".conf"), {new_style = "Default"})
+-- local config = simpleconf.get_config(aegisub.decode_path(config_dir.."/"..script_namespace..".conf"), {new_style = "Default"})
-- TODO: detect pre-existing inline tags
-- probably need some kind of ass parsing, or a hack with match()
@@ -52,7 +49,7 @@ end
function main(sub, sel)
local _, styles = karaskel.collect_head(sub, false)
- --local config.new_style = "Default" -- the one we'll be changing stuff to - TODO: configurable
+ local config.new_style = "Default"
local new_style = styles[config.new_style]
for h, i in ipairs(sel) do
-- TODO: automatically exclude styles (also configurable)