Skip to content

Line2Fbf: Select fbfed lines at completion #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion macros/arch.Line2Fbf.moon
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export script_name = "FBF-ifier" -- thank Light for the name, I needed someth
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"
export script_version = "0.1.1"

DependencyControl = require "l0.DependencyControl"
dep = DependencyControl{
Expand All @@ -24,6 +24,7 @@ fbfify = (subs, sel, active) ->
lines = LineCollection subs, sel, () -> true

to_delete = {}
preFbfCount = #lines
lines\runCallback ((lines, line) ->
data = ASS\parse line

Expand All @@ -37,5 +38,7 @@ fbfify = (subs, sel, active) ->
lines\insertLines!
lines\deleteLines to_delete

return [i - preFbfCount for i in *lines\getSelection!]

dep\registerMacro fbfify