diff options
-rwxr-xr-x | make-feed.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/make-feed.lua b/make-feed.lua index be4cde7..bf286d2 100755 --- a/make-feed.lua +++ b/make-feed.lua @@ -148,7 +148,10 @@ local function deepcopy(orig, copies) -- copied and pasted from https://lua-user return copy end +-- fake libraries so scripts don't throw a fit about not having stuff + local noop = function() end +local return_input = function(i) return i end local function fake_depctrl(i) __feedmaker_version = i @@ -175,6 +178,43 @@ local function fake_depctrl(i) } end +local function fake_aegisub() + local aegisub = {} + + aegisub.register_macro = noop + aegisub.register_filter = noop + + aegisub.progress = {} + aegisub.progress.set = noop + aegisub.progress.task = noop + aegisub.progress.title = noop + aegisub.progress.is_cancelled = noop + + aegisub.debug = {} + + aegisub.debug.out = noop + aegisub.log = noop + + aegisub.dialog = {} + + aegisub.dialog.display = noop + aegisub.dialog.open = noop + aegisub.dialog.save = noop + + aegisub.cancel = noop + aegisub.text_extents = noop + aegisub.gettext = return_input + + aegisub.frame_from_ms = noop + aegisub.ms_from_frame = noop + aegisub.video_size = noop + aegisub.keyframes = noop + aegisub.decode_path = noop + aegisub.project_properties = noop + + return aegisub +end + local function sandbox_require(obj) if obj == "l0.DependencyControl" then return fake_depctrl |