Skip to content
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

KaraTemplater: Fold generated output #12

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

petzku
Copy link
Contributor

@petzku petzku commented Apr 21, 2023

Requires users to be running a fold-supported Aegisub build for this to do anything, but works on non-folding builds too.

@petzku petzku force-pushed the kara/fold-output branch from 828ae3a to 8e4bbdf Compare April 21, 2023 21:09
@petzku
Copy link
Contributor Author

petzku commented Apr 21, 2023

We could also consider requiring a "directive" somewhere in the file to set this, e.g. a commented line with directive folds, if it's not desired to fold output by default.

Said line could also define e.g. fold default state (expanded/collapsed), if we want to go down that road.

Possibly something like below (probably, generate=true would be the default if the directive exists, but generate=false could allow the directive to remain in-file despite being disabled):

Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,directive fold,generate = true, collapsed = false

@The0x539
Copy link
Owner

The0x539 commented Jun 7, 2023

This needs to be opt-in by way of some form of directive feature, which would have to be implemented first (possibly starting as a means of customizing some other script-global behavior).

@petzku
Copy link
Contributor Author

petzku commented Jun 16, 2023

A possible way to do this before said directive feature exists could be setting a special variable, though that risks backwards incompatibility (if a user happens to incidentally use a variable by that name), and is probably not worth it.

What other directives might be useful?

@petzku
Copy link
Contributor Author

petzku commented Jul 8, 2023

I have been informed this PR errors when the template generates no lines. While this is a rare case, it nevertheless should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants