-
Notifications
You must be signed in to change notification settings - Fork 34
/
massqc.py
executable file
·39 lines (34 loc) · 970 Bytes
/
massqc.py
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
#!/usr/bin/env python
'''
Launches qcli on all mov/mkv files in all subfolders beneath your input.
qcli makes xml.gz QCTools reports.
'''
import sys
import subprocess
import os
import ififuncs
def main():
'''
Simple recursive process that makes QCTools sidecar reports.
'''
ififuncs.check_existence(['qcli'])
source = sys.argv[1]
if os.path.isfile(source):
cmd = [
'qcli',
'-i',
source]
subprocess.call(cmd)
else:
for root, _, filenames in os.walk(source):
for filename in filenames:
if filename.endswith(('.mov', '.mkv','.dv', '.m2t')):
if filename[0] != '.':
cmd = [
'qcli',
'-i',
os.path.join(root, filename)
]
subprocess.call(cmd)
if __name__ == '__main__':
main()