Make SubFox production-ready with parallel translation and UI controls
This commit is contained in:
parent
c40b8bed2b
commit
2b1d05f02c
6046 changed files with 798327 additions and 0 deletions
18
test_srt.py
Normal file
18
test_srt.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from app.services.srt_parser import parse_srt
|
||||
from app.services.translator import translate_blocks
|
||||
from app.services.srt_builder import build_srt
|
||||
|
||||
sample = """1
|
||||
00:00:01,000 --> 00:00:03,000
|
||||
Hello there
|
||||
|
||||
2
|
||||
00:00:04,000 --> 00:00:06,000
|
||||
How are you?
|
||||
"""
|
||||
|
||||
blocks = parse_srt(sample)
|
||||
blocks = translate_blocks(blocks)
|
||||
result = build_srt(blocks)
|
||||
|
||||
print(result)
|
||||
Loading…
Add table
Add a link
Reference in a new issue