提交必要文件

This commit is contained in:
2026-06-12 10:59:32 +08:00
parent 8b2ac635db
commit bb27963fc1
15 changed files with 2994 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
from __future__ import annotations
import argparse
from m3u_tools import shuffle_text_lines
def main() -> int:
parser = argparse.ArgumentParser(description="随机打乱文本文件行顺序")
parser.add_argument("file", nargs="?", default="pass_test.txt", help="目标文件")
parser.add_argument("--no-header", action="store_true", help="不保留第一行注释头")
args = parser.parse_args()
count, path = shuffle_text_lines(args.file, keep_comment_header=not args.no_header)
print(f"已打乱 {count} 行:{path}")
return 0
if __name__ == "__main__":
raise SystemExit(main())