-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubsync
More file actions
executable file
·40 lines (31 loc) · 1.31 KB
/
subsync
File metadata and controls
executable file
·40 lines (31 loc) · 1.31 KB
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
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import re
import importlib
import os
from subsync_packages import color
from subsync_packages import synctime
from subsync_packages import calibrate
try:
if(len(sys.argv)==1):
print("usage: subsync [--help] [--sync-time] [--calibrate]")
elif (sys.argv[1] == '--h' or sys.argv[1] == '--help' or sys.argv[1] == '-h' or sys.argv[1] == '-help' ):
print('--sync-time\tTo find haste/delay between video and subtitle in sec')
print('--calibrate\tTo sync subtitles')
elif (sys.argv[1] == '--v' or sys.argv[1] == '--version' or sys.argv[1] == '-v' or sys.argv[1] == '-version' ):
print('Version - v0.0.1')
elif sys.argv[1] == '--sync-time':
color.prCyan("\nType : INT (Input in number only)\n")
synctime.synctime()
elif sys.argv[1] == '--calibrate':
calibrate.calibrate()
else:
print("unknown option: "+str(sys.argv[1]))
print("usage: subsync [--help] [--sync-time] [--calibrate]")
except Exception:
color.prRed("\nError Occured\n\n")
print("usage: subsync [--help] [--sync-time] [--calibrate]")
color.prYellow("\nRefer documentation for further explination with examples\n")
print("Documentation link : ",end="")
color.prGreen("https://kushtej.github.io/subsync\n\n")