-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02323d9
commit 29a42da
Showing
3 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
export script_name = "FBF-ifier" -- thank Light for the name, I needed something that doesn't clash with Zeref's "Line To FBF" | ||
export script_description = "Convert lines into frame-by-frame chunks" | ||
export script_author = "arch1t3cht" | ||
export script_namespace = "arch.Line2Fbf" | ||
export script_version = "0.1.0" | ||
|
||
DependencyControl = require "l0.DependencyControl" | ||
dep = DependencyControl{ | ||
feed: "https://raw.githubusercontent.com/TypesettingTools/arch1t3cht-Aegisub-Scripts/main/DependencyControl.json", | ||
{ | ||
{"a-mo.LineCollection", version: "1.3.0", url: "https://github.com/TypesettingTools/Aegisub-Motion", | ||
feed: "https://raw.githubusercontent.com/TypesettingTools/Aegisub-Motion/DepCtrl/DependencyControl.json"}, | ||
{"l0.ASSFoundation", version: "0.5.0", url: "https://github.com/TypesettingTools/ASSFoundation", | ||
feed: "https://raw.githubusercontent.com/TypesettingTools/ASSFoundation/master/DependencyControl.json"}, | ||
{"arch.Util", version: "0.1.0", url: "https://github.com/TypesettingTools/arch1t3cht-Aegisub-Scripts", | ||
feed: "https://raw.githubusercontent.com/TypesettingTools/arch1t3cht-Aegisub-Scripts/main/DependencyControl.json"}, | ||
} | ||
} | ||
LineCollection, ASS, Util = dep\requireModules! | ||
|
||
logger = dep\getLogger! | ||
|
||
fbfify = (subs, sel, active) -> | ||
lines = LineCollection subs, sel, () -> true | ||
|
||
to_delete = {} | ||
lines\runCallback ((lines, line) -> | ||
data = ASS\parse line | ||
|
||
table.insert to_delete, line | ||
|
||
fbf = Util.line2fbf data | ||
for fbfline in *fbf | ||
lines\addLine fbfline | ||
), true | ||
|
||
lines\insertLines! | ||
lines\deleteLines to_delete | ||
|
||
dep\registerMacro fbfify | ||
|