Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Useful Aegisub macros

NotificationsYou must be signed in to change notification settings

ihkk/KKSubs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Currently provides following plugins:

Lua FileFunction NameDisplay Chinese NameFunction Discription
QuickMove.luaLeft_move_small快速移动/左移小间隔Move the selected line left with a small step
Right_move_small快速移动/右移小间隔Move the selected line right with a small step
Up_move_small快速移动/上移小间隔Move the selected line up with a small step
Down_move_small快速移动/下移小间隔Move the selected line down with a small step
Left_move_big快速移动/左移大间隔Move the selected line left 15 px
Right_move_big快速移动/右移大间隔Move the selected line right 15 px
Up_move_big快速移动/上移大间隔Move the selected line up 15 px
Down_move_big快速移动/下移大间隔Move the selected line down with a big step
move_stylesFurigana Helper/Move by styleMove all lines with given style name.
KK's.luaNOKK's Scrpits/去注释Delete all commented lines.
recover_subfontKK's Scrpits/恢复字体子集化Change all style names with font subset.
cover_cn_by_jpKamigami/日文轴覆盖中文轴Cover all CN lines with the corresponding time of JP lines.
check_jp_cnKamigami/检查中日轴Check if all JP and CN lines corresponds.
jump_to_corresponding_lineKamigami/跳转到对应行Jump between the corresponding JP and CN lines.
cover_time_from_corresponding_lineKamigami/根据对应行调整时间Update a CN/JP line with its corresponding JP/CN line.
insert_auto_codelineAuto Template/code lineInsert a template line with "code line"
insert_auto_codesylAuto Template/code sylInsert a template line with "code syl"
insert_auto_codeonceAuto Template/code onceInsert a template line with "code once"
insert_auto_template_lineAuto Template/template lineInsert a template line with "template line"
insert_auto_template_charAuto Template/template charInsert a template line with "template char"
insert_auto_template_noblankAuto Template/template noblankInsert a template line with "template no blank"
insert_auto_template_line_noblank_notextAuto Template/template line noblank notextInsert a template line with "template line noblank notext"
insert_firstsylAuto Template/FirstSylInsert template lines to allow at effects with the first syllable
insert_ciAuto Template/Counter:ciInsert template lines to allow using a word counter with "template char" mode
insert_shape_code_onceAuto Template/ShapeInsert a template line with "code once" and "shape = {}"
insert_number_fixAuto Template/FixInsert a code line with math fix function
insert_Yutils_text_to_shapeAuto Template/Text to ShapeInsert template lines to convert text to shape (require Yutils lib)
insert_autotags_0Auto Template/AutoTags/原版Insert template lines with AutoTags Function (Original Version)
insert_autotags_1Auto Template/AutoTags/PauseInsert template lines with AutoTags Function (with Pause)
insert_autotags_2Auto Template/AutoTags/DelayInsert template lines with AutoTags Function (with Delay)
insert_autotags_3Auto Template/AutoTags/APInsert template lines with AutoTags Function (with changing intervals)

Quick Move

With hotkeys

This functions helps you to easily move a subtitle's\pos using hotkeys.

The default setting is to move1px for a small step andscript.width / 128 (px) for a big step, but you may change the setting in the scripts easily.

SMALL_STEP=1BIG_STEP=x/128

Part of script functions are adapted fromHyperdimensional Relocator written byunanimated.

Move by style

This plugin is under "FuriganaHelper" path as it is originally used for Japanese Furigana subtitles production propose.

The procedure and scripts of furigana subs may be released later.

Auto Template

These functions are under:\Automation\Auto Template

Using this macro, you can easily add the following lines by simply clicking the menu selection;

  • (commented) code line
  • (commented) code syl
  • (commented) code once
  • (commented) template line
  • (commented) template char
  • (commented) template noblank
  • (commented) template line noblank notext
  • (code) “First syl” and related template lines
  • (code) char counterci and related template lines
  • (code) A table which stores shape
  • (code) Add a math fix function
  • (code) Add text to shape function using Yutils
  • (code) Add functions of 4 types “AutoTags” and related template lines

Bilingual Tools

These macros are under:\Automation\Kamigami

At the very beginning the macros will ask you to fill in the style name of Japanese and Chinese Subtitles (also JP-UP & CN-UP if needed), then it will automatically do the checking or covering work.

Space Check

The macro follows the standard that in Japanese subtitles only full width spaces like  exist, while in Chinese subtitles only half width spaces like exist. Additionally, there should be no spaces at the end of a line.The macro will mark out the subtitles which violated the rules above. The following wrong subtitles are listed as examples.

Error TypeExample
Full space in CN忘不了 你的声音
Half space in JPきみの声忘れない
Space at line tail忘不了你的声音

Additionally, when pasting Japanese text from Excel, in some situations there will exist a Left-to-right mark like . This is similar to full-width space but they are different.

Space typeExampleAscii
Full space \u3000
Half space32
Full space with Left-to-right mark ‎\u3000\u200e

The macro cannot search for lines with a half-width space and the control character at the end. This issue might be solved in following updates.

Number & Time Check

In a bilingual subtitle file, all dialogue lines should have two lines in different languages theoretically. For example, the following two lines will appear at the same time.

IDTimeLayerStyleText
10:00-0:050JP-TEXTきみの声忘れない
20:02-0:030JP-TEXT-UP涙も忘れない
30:00-0:051CN-TEXT忘不了你的声音
40:02-0:031CN-TEXT-UP也忘不了你的泪水

Obviously, the total line numbers of JP-TEXT should be same as CN-TEXT; numbers of JP-TEXT-UP and CN-TEXT-UP should also be the same if exists. Additionally, the Japanese subtitle with its corresponding Chinese subtitle should appear at the same time.

The macro will automatically count the numbers of JP and CN lines and would warn you if the result differs. If the numbers agrees, the macro will then check the time of each subtitle sets, and will report if the times of all lines agree or not.

Additionally, if there are some labels including\fs,\pos in text lines, the macro will select these lines with labels to remind the user as the final step of the bilingual checking procedure.

Cover Lines

Usually when processing a bilingual subtitle file, lines in the original language are used for timing, and the translated lines' time are covered by the lines with original lines. This tool will automatically help you cover the translation lines. Subtitles should be set as below before using the macro.

Line IDLayerTimeStyleText
100:00-0:05JP-TEXTきみの声忘れない
210:02-0:03JP-TEXT-UP涙も忘れない
3*0:00-0:00CN-TEXT忘不了你的声音
4*0:00-0:00CN-TEXT也忘不了你的泪水

↓ The macro will process the lines above into:

Line IDLayerTimeStyleText
100:00-0:05JP-TEXTきみの声忘れない
210:02-0:03JP-TEXT-UP涙も忘れない
310:00-0:05CN-TEXT忘不了你的声音
420:02-0:03CN-TEXT-UP也忘不了你的泪水

Which means that, the macro can not only copy the time but also reset the correct style of the translation lines. The layer will automatically add on 1 to the original layer number.

Jump to corresponding line

This is a no-GUI function. It can help you quickly jump from one text line to its corresponding line.

Since this macro does not require to input the names of CN and JP styles (as this macro is used as a short-cut function), the default can only match some certain terms. Other style names are not supported.

Matching rules: the style name must containCN orJP to indicate its language; there should be noOP orED to avoid processing OP or ED lines. For normal lines there should be noUP orU, while for up lines there must beU orUP.

Line IDTimeStyleText
1 (selected)0:00-0:05JP-TEXTきみの声忘れない
20:02-0:03JP-TEXT-UP涙も忘れない
3 (re-selected)0:00-0:00CN-TEXT忘不了你的声音
40:00-0:00CN-TEXT也忘不了你的泪水

If you select Line 1 and run this macro, Line 3 will be automatically selected.

Cover time from corresponding line

This is a no_GUI function. It can help you quickly cover a line’s time from its corresponding bilingual line.

The style name match rules are same to theJump to corresponding line function.

This function could be used together with theJump to corresponding line function when timing precisely after the rough job.

Line IDTimeStyleText
10:01-0:05JP-TEXTきみの声忘れない
20:00-0:03CN-TEXT忘不了你的声音

If you select Line 2 and run this macro, the subtitles will be changed into

Line IDTimeStyleText
10:01-0:05JP-TEXTきみの声忘れない
20:01-0:05CN-TEXT忘不了你的声音

Reset subset font styles

This is a very private function. The reason I added this is that the nPlayer on my MiTV4 does not display fonts correctly when the MKV files are packaged with font subsets. This macro can automatically change the style with font names in the pattern of[\c\d]{8} intoSource Han Sans SC Medium.

Movies

Subtitles which were re-timed or edited by KK for certain versions.

I'd moved these subtitles to a specific repository:ihkk/movie-subs.

About

Useful Aegisub macros

Topics

Resources

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp