Dialog Swapper is an automation script for Aegisub that lets you quickly swap between multiple lines of text.
Dialog Swapper offers three primary swap operations as well as a number of configuration options.
Toggle
The toggle operation comments or uncomments text. This is most commonly used in subs for honorifics.
Example
foo{**-san}
becomes foo{*}-san{*}
,
foo{*}-san{*}
becomes foo{**-san}
Swap
The swap operation switches between two phrases. This is most commonly used in subs for localization decisions like name order.
Example
{*}Foo Bar{*Bar Foo}
becomes {*}Bar Foo{*Foo Bar}
,
{*}Bar Foo{*Foo Bar}
becomes {*}Foo Bar{*Bar Foo}
Comment Toggle
The comment toggle operation is a special toggle that is used for commenting entire lines. It runs only on lines with the Effect field set to exactly ***
.
Valid Lines
To avoid swapping lines unintentionally and breaking things (like typesetting), lines will only be swapped when they include a prefix of either "-" or "_" followed by one of the following words: Main, Alt, Overlap.
Examples
Valid: Coffee_Main, Flux-Alt, _Overlap
Invalid: Main, _FluxAlt, Overlap-
Invalid Text
Be very careful about swapping text that includes the delimeter as its starting character. This, as a general rule, breaks things horribly, and is easy enough to avoid and enough of a pain to fix that I'm just leaving in this warning.
The above documentation applies to the default settings. Lots of stuff is configurable. I have no input validation, so don't be retarded or things will break. Unicode may also break things.
Delimeter
The delimeter is the character used in the brackets for the swap operation. Can only be one character, and it can't be alphanumeric.
Default: *
Verify Style
This toggles whether or not the swap operation will only apply to lines with styles that meet the chosen guidelines. Turning it off means your script will run on all lines, regardless of style.
Default: true
Line Starters
The line starters are the characters used as a prefix to identify valid line styles. This should be a list of non-alphanumeric characters separated by commas. Setting this to an empty string will break things. Patches Welcome.
Default: -,_
Line Names
The line names are the rest of the name that is checked for when identifying valid lines. This should be a list of alphanumeric words separated by commas. Whitespace is not stripped and will be counted as part of the name.
Default: Main,Alt,Overlap
Applies English Title Case (maintains lower case on prepositions and other auxiliary words) to the selected lines.
Select the relevant lines and run the script. Not too difficult.
Select/navigate in the subtitle grid.
These are intended to be bound as hotkeys to speed up someone's workflow.
Options are as follows:
Saves/loads subtitle grid scrollbar position.
These are intended to be bound as hotkeys to speed up someone's workflow. The saves are currently session-only. By default three save slots are created.
The Macro Length parameter determines how many save slots will be created when the script is started up. After changing this setting, you must restart your automation directory for it to take effect.
This is intended to help make upsampling a script that uses rotation tags with \org less of a pain. It will scale the tags based on the video, but will do so incorrectly. It will, however, be closer than before, and might be good enough for small values.
DO NOT COMPLAIN TO ME ABOUT THE VALUES BEING INACCURATE
Select the relevant lines and run the script. Not too difficult.
Changes the value by which to scale the tag. The value is determined by old_vertical_resolution / new_vertical_resolution
.
The default, 0.6667 , is for going from 1280x720 to 1920x1080, which is what you probably want to do.