1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
# garret's aegisub scripts
These are automation scripts ("plugins" basically) I've written for the subtitle editor [Aegisub](https://aegisub.org).
I do timing and editing, so these scripts mainly help with those. There's nothing ground-breaking and exciting here, just some stuff to make my life easier.
## how do i install them
I believe you should just be able to add them via the [Automation Manager](https://aegisub.org/docs/3.2/Automation/Manager/index.html), or put them in your `autoload` folder.
Most of them should register themselves with [DependencyControl](https://github.com/TypesettingTools/DependencyControl) if you have it installed, but I haven't set up a feed, so you won't be able to update them that way.
I'm not bothering with DepCtrl for newer scripts as it's too much red tape/boilerplate imo. sorry about that.
## how do i get help
ping me in the [GJM discord server](https://discord.gg/hQewDqS) (same username) and I'll probably reply eventually. Otherwise, open a github issue.
```
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
```
ie, technically its not my problem if it doesnt work, burns your house down, etc 👍
fundamentally this is just stuff i wrote for myself and threw over the wall in case it could be useful to someone else as well, i will probably try to help though
----
And now, the scripts, in no particular order:
## Dupe and Comment
Duplicates a line and comments out the original.
This lets you:
- quickly create different versions of a line
- see the differences at a glance
- easily revert to the original, even if the undo history is gone
| Key | Function | Rationale |
| --- | -------- | --------- |
| D | `Dupe and Comment/Do` | Easy access. "D" for duplicate. |
| Shift-D | `Dupe and Comment/Undo` | Shift-D, like Shift-Delete for deleting files. |
| Ctrl-D | `edit/line/duplicate` | Still want to dupe without commenting occasionally. |
These hotkeys let me have everything related to duplication on one key.
Thanks to [Akatsumekusa](https://github.com/Akatmks) for helping improve this script.
## Chapter Generator
Generates a chapters file that you can mux into your MKV.
Make a new line, starting at the start of your chapter. Put the chapter name in the text, then mark it with `chapter`, `chptr` or `chap` in the effect field.
For example:
```
Comment: 0,0:00:00.00,0:00:01.00,Default,,0,0,0,chap,Intro
Comment: 0,0:03:12.96,0:03:13.96,Default,,0,0,0,chap,OP
Comment: 0,0:04:43.01,0:04:44.01,Default,,0,0,0,chap,Part A
Comment: 0,0:11:43.02,0:11:44.02,Default,,0,0,0,chap,Part B
Comment: 0,0:21:09.96,0:21:10.96,Default,,0,0,0,chap,ED
Comment: 0,0:22:40.01,0:22:41.01,Default,,0,0,0,chap,Outro
```
Then run the script and save the file it gives you. You use it in the Chapters section of MKVToolNix (in the `Output` tab).
### tips/useful things to know
- The first letter of the effect can be uppercase if you want.
- The end time of the line doesn't matter, it's not used in the chapters.
- The language is hardcoded to English, but it's not _too_ difficult to edit the script to change it. Just CTRL-F for `eng` and change the two values.
### acknowledgements
Includes code by unanimated to convert from ms to `H:MM:SS.mmm` (stolen from [Significance](http://unanimated.hostfree.pw/ts/signi.lua)).
Includes [code by arch1t3cht](https://github.com/TypesettingTools/arch1t3cht-Aegisub-Scripts/blob/0b67d516c7087c308c81d6a663596615d83126a6/modules/arch/Util.moon#L26-L40) to make the timestamps frame-accurate. Used under the terms of the MIT License.
## Restyler
Changes the style of selected lines to `Default`, and converts italic+alignment (`\an`) values from the script's styles to inline tags.
This is meant for restyling crunchyroll scripts that use separate styles like `main`, `top`, `italics`, `italicstop`, etc.
On a related note, you might like [Chrolo's script](https://github.com/Chrolo/ChroloScripts_Aegisub/blob/master/chrolo.Restyler.lua) to change a line's base style without changing how it actually looks.
previously `become-fansubber.lua`
## Check Pre-timing
This script puts stuff in empty dialogue lines (the actor name, and alternating `a` or `b`).
This lets you check pre-timed subtitles without actually having a translation.
You can't check CPS of course, but you can see whether the lines are lined up properly, whether they match their actor, etc.
It also includes an undo macro, so you can clean up after yourself after making changes.
It ignores lines that already have text in them.
If the line only has tags, it puts the text after them. (that way you can see what those tags do to the text.)
Formerly known as A-B, after the alternating a-b it puts in the lines.
## K-Timing -> Alpha Timing
Makes doing [alpha timing](https://fansubbers.miraheze.org/wiki/Glossary#alpha_timing) significantly easier, by getting rid of the part where you do alpha timing.
[Time the line in karaoke mode](https://zahuczky.com/0-ktiming-guide/), with the "syllables" as the sections of the line you want to appear. Then run the script, and it'll generate some nice alpha-timed lines for you.
The original line will be commented out, so you can go back and change it easily.
Originally created to convert stuff that should've been alpha timed in the first place, but that used a hack with `\ko` instead.
## DependencyControl Global Config
This macro adds additional configuration interfaces for DependencyControl, so you don't have to edit the JSON file.
- `Global Configuration`: lets you change DependencyControl's behaviour.
- `Extra Feeds`: lets you provide additional update feeds that will be used when checking any script for updates.
Please see [the DependencyControl README](https://github.com/typesettingTools/DependencyControl#configuration) for details on the configuration options.
Time format: `[number][unit]`
- `y` for years
- `d` for days
- `h` for hours
- `m` for minutes
- `s` for seconds
so `7d` is 7 days, `3d12h` is 3 days and 12 hours, `5m30s` is 5 minutes and 30 seconds, you get the idea
### rationale
There's a line in the DependencyControl README that goes:
> DependencyControl stores its configuration as a JSON file in the _config_ subdirectory of your Aegisub folder (`l0.DependencyControl.json`). Currently you'll have to edit this file manually, in the future there will be a management macro.
That line was there for 7 years and the management macro still didn't exist, so I wrote one myself.
## faderer
Lets you as the timer do fade-in/outs without having to bother the typesetter.
Go to the frame before the fade starts, and run the script. Then go to the frame where the fade finishes, and run the script again.
Select whether the fade is to/from Black, White, or Alpha. It'll try to guess from the timings whether you want to fade in or out, and apply the fade.
Includes [code by arch1t3cht](https://github.com/TypesettingTools/arch1t3cht-Aegisub-Scripts/blob/0b67d516c7087c308c81d6a663596615d83126a6/modules/arch/Util.moon#L26-L40) to get frame-accurate times. Used under the terms of the MIT License.
## Em-dash
Lets you:
- Append an Em-dash to the selected lines
- Replace instances of `--` with an em-dash
Also, if you use [arch1t3cht's Aegisub](https://github.com/arch1t3cht/aegisub):
- Insert an Em-dash at the cursor position
because chances are you don't have an em-dash key on your keyboard :)
## Select Comments
Tiny utility script.
Easier than `Subtitle > Select Lines` etc.
## Song timer
makes song timing into a rhythm game, so you can vibe while you time
bind the script to to e.g. space, and then:
0. tap to initialise (`READY`)
1. tap to set start time (`START`)
2. tap to set end time (`END`) + move to next line (`READY`)
3. go to 1.
apparently that's what some vhs era groups did for their entire dialogue timing
it's reasonable enough for (rough pass) song timing, especially if you know the song well.
probably won't be faster, but will be much more enjoyable
## Scenebleed Detector
Finds scenebleeds in the selected lines, and marks them with an effect (`bleed`).
This is meant in the vein of unanimated's Quality Check script. It's to help spot mistakes, not as your only check.
It has a hardcoded threshold of 500ms.
## Consistency assistant
`ctrl-c-ctrl-v.lua`
i dont remember
## Shenanigans
This script makes dialogue motion-tracking shenanigans easier to manage, by splitting them off into a separate file.
First, define a shenanigan file by making a line in the dialogue file with the effect `import`, and a path to the file as the text.
Like so: `Comment: 10,0:00:00.00,0:00:00.00,Default,,0,0,0,import,shenanigans_naga02_08.ass`
Then time/edit as normal. When you see a line (or group of lines) that could use a shenanigan, mark each line with `shenan some meaningful identifier` in the effect field.
The typesetter goes through all the shenanigans, copies them to the shenanigans file, and does all the motion tracking/effects/whatever in there.
Then, at mux time, you run the script, and it replaces the marked dialogue lines with their counterparts from the shenanigans file.
It's good, because if you ever need to go back and change a line, you can do it without having to wade through 516879832 lines of frame-by-frame motion tracking.
Nowadays this can be handled with folds in [arch1t3cht's Aegisub](https://github.com/arch1t3cht/Aegisub), but they weren't invented yet when this script was written.
There are two implementations here: the python one which we actually use in the mux script, and a lua proof-of-concept.
## Syllable Splitter
Splits romaji into karaoke syls.
It tries to use the lengths that the Aegisub K-Timing mode would give if you split it manually.
## Timings copier
For when you've timed the romaji for a song and just want to copy those timings to the english thats already in the file.
Requires two consecutive equal-length blocks of lines with different styles from each other.
i.e. you have your romaji lines, and the english ones directly after, with separate romaji and english styles.
## Comment selection
Make the highlighted text into an inline comment. (encloses it in `{curly brackets}`)
Requires [arch1t3cht's Aegisub](https://github.com/arch1t3cht/aegisub).
i don't think i've ever actually used this lol
## Append Comment
pops up a text box for you to write your comment in, and appends it to the line.
i'm not sure i ever used this one either
## pos -> an
converts `\pos` positions into `\an` alignments
the idea is you click in the general area of where you want, and then the script converts that into eg `\an1 \an8 \an6` etc
but it's not really very useful because that's more effort than just typing it, especially on a numpad
## Audio Clipper
Makes audio clips of all the selected lines.
Output is either stream-copied, or encoded to a format of your choice.
Select the lines you want to clip, and run the script.
By default, makes a folder called `audioclipper_output` and dumps all the files in there.
The filename is the index of the line in your selection. (no thats not very useful)
Needs [FFMPEG](https://ffmpeg.org) in your $PATH.
## TXT Cleanup
`light-purge.lua`
Script I wrote for LightArrowsEXE to remove actors and/or linebreaks when exporting to TXT.
I think he wanted it to make doing diffs easier, idk
This is an export filter, not a macro. As such, it won't show up in the normal Automation menu- you have to use `File > Export Subtitles...` and use it from there.
|