forked from mia/Aegisub
Delete the Clean Script Info macro
It doesn't actually do anything anymore.
This commit is contained in:
parent
9c7119fdc2
commit
6a8958f287
5 changed files with 0 additions and 60 deletions
|
@ -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 \
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
-- Copyright (c) 2012, Thomas Goyne <plorkyeran@aegisub.org>
|
||||
--
|
||||
-- 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)
|
||||
|
||||
|
|
@ -47,9 +47,6 @@
|
|||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
<RarContents Include="$(AegisubSourceBase)automation\autoload\clean-info.lua">
|
||||
<OutputPath>automation\autoload\</OutputPath>
|
||||
</RarContents>
|
||||
<RarContents Include="$(AegisubSourceBase)automation\autoload\cleantags-autoload.lua">
|
||||
<OutputPath>automation\autoload\</OutputPath>
|
||||
</RarContents>
|
||||
|
|
|
@ -34,9 +34,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<RarContents Include="$(AegisubSourceBase)automation\autoload\clean-info.lua">
|
||||
<Filter>Automation\Autoload</Filter>
|
||||
</RarContents>
|
||||
<RarContents Include="$(AegisubSourceBase)automation\autoload\cleantags-autoload.lua">
|
||||
<Filter>Automation\Autoload</Filter>
|
||||
</RarContents>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue