Add some more code

This commit is contained in:
2026-01-05 10:42:29 +08:00
parent 209da70424
commit 365c9c843f

View File

@@ -44,6 +44,10 @@ HALF_FULL_MAP = (
('&', ''),
('%', ''),
('', '·'),
('', ''),
('', ''),
("", ''),
("", ''),
)
MIXED_RULE1 = re.compile(r'[,。、]+([…—~]+)')
MIXED_RULE2 = re.compile(r'([…—~]+)[,。、]+')
@@ -196,7 +200,7 @@ if __name__ == "__main__":
parser.add_argument("m3t_path", help="Path to M3T file/directory.")
parser.add_argument("target_path", nargs="?", default=None, help="Path to save processed M3T file/directory. If not specified, overwrite original files.")
parser.add_argument("-d", "--dry-run", action="store_true", help="Only show changes without saving.")
parser.add_argument("--type", type=ScriptType.from_string, choices=list(ScriptType), help="Process lines with special rules.")
parser.add_argument("--type", default=ScriptType.XML, type=ScriptType.from_string, choices=list(ScriptType), help="Process lines with special rules.")
parser.add_argument("--llm-only", action="store_true", help="Only process LLM lines.")
parser.add_argument("--ext", default=".txt", help="File extension to process in directory mode.")
parser.add_argument("--no-replace-quotes", action="store_true", help="Do not replace quotes.")