From 6a8958f2870cd6bf99e87f0df16fb121d170619f Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 22 May 2014 06:25:52 -0700 Subject: [PATCH] Delete the Clean Script Info macro It doesn't actually do anything anymore. --- automation/Makefile | 1 - automation/autoload/clean-info.lua | 52 ------------------- .../PortableInstaller.vcxproj | 3 -- .../PortableInstaller.vcxproj.filters | 3 -- .../win_installer/fragment_automation.iss | 1 - 5 files changed, 60 deletions(-) delete mode 100644 automation/autoload/clean-info.lua diff --git a/automation/Makefile b/automation/Makefile index 7e317501e..a6ff06a25 100644 --- a/automation/Makefile +++ b/automation/Makefile @@ -20,7 +20,6 @@ test: $(PROGRAM) # share/ DATA_AUTOMATION += \ - autoload/clean-info.lua \ autoload/cleantags-autoload.lua \ autoload/kara-templater.lua \ autoload/karaoke-auto-leadin.lua \ diff --git a/automation/autoload/clean-info.lua b/automation/autoload/clean-info.lua deleted file mode 100644 index 4cf0fdd78..000000000 --- a/automation/autoload/clean-info.lua +++ /dev/null @@ -1,52 +0,0 @@ --- Copyright (c) 2012, Thomas Goyne --- --- Permission to use, copy, modify, and distribute this software for any --- purpose with or without fee is hereby granted, provided that the above --- copyright notice and this permission notice appear in all copies. --- --- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -local tr = aegisub.gettext - -script_name = tr"Clean Script Info" -script_description = tr"Removes all but the absolutely required fields from the Script Info section. You might want to run this on files that you plan to distribute in original form." -script_author = "Thomas Goyne" -script_version = "1" - -function clean_script_info(subs) - local keep_keys = { - ["collisions"] = true, - ["playresx"] = true, - ["playresy"] = true, - ["scaledborderandshadow"] = true, - ["scripttype"] = true, - ["video colorspace"] = true, - ["ycbcr matrix"] = true, - ["wrapstyle"] = true - } - - local deleted = 0 - for i = 1, #subs do - local idx = i - deleted - if subs[idx].class == "info" and not keep_keys[subs[idx].key:lower()] then - subs.delete(idx) - deleted = deleted + 1 - end - end -end - -function clean_script_info_macro(subs) - clean_script_info(subs) - aegisub.set_undo_point(script_name) -end - -aegisub.register_macro(script_name, script_description, clean_script_info_macro) -aegisub.register_filter(script_name, script_description, 0, clean_script_info) - - diff --git a/build/PortableInstaller/PortableInstaller.vcxproj b/build/PortableInstaller/PortableInstaller.vcxproj index 4c5776778..d9051a624 100644 --- a/build/PortableInstaller/PortableInstaller.vcxproj +++ b/build/PortableInstaller/PortableInstaller.vcxproj @@ -47,9 +47,6 @@ - - automation\autoload\ - automation\autoload\ diff --git a/build/PortableInstaller/PortableInstaller.vcxproj.filters b/build/PortableInstaller/PortableInstaller.vcxproj.filters index 29357b4a9..48080ffcf 100644 --- a/build/PortableInstaller/PortableInstaller.vcxproj.filters +++ b/build/PortableInstaller/PortableInstaller.vcxproj.filters @@ -34,9 +34,6 @@ - - Automation\Autoload - Automation\Autoload diff --git a/packages/win_installer/fragment_automation.iss b/packages/win_installer/fragment_automation.iss index 151258ae2..f5518df7e 100644 --- a/packages/win_installer/fragment_automation.iss +++ b/packages/win_installer/fragment_automation.iss @@ -35,7 +35,6 @@ ; This file declares all installables related to Aegisub Automation [Files] -DestDir: {app}\automation\autoload; Source: ..\..\automation\autoload\clean-info.lua; Flags: ignoreversion overwritereadonly uninsremovereadonly; Attribs: readonly DestDir: {app}\automation\autoload; Source: ..\..\automation\autoload\cleantags-autoload.lua; Flags: ignoreversion overwritereadonly uninsremovereadonly; Attribs: readonly DestDir: {app}\automation\autoload; Source: ..\..\automation\autoload\kara-templater.lua; Flags: ignoreversion overwritereadonly uninsremovereadonly; Attribs: readonly DestDir: {app}\automation\autoload; Source: ..\..\automation\autoload\karaoke-auto-leadin.lua; Flags: ignoreversion overwritereadonly uninsremovereadonly; Attribs: readonly