-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheclipseBatch.py
More file actions
26 lines (23 loc) · 969 Bytes
/
eclipseBatch.py
File metadata and controls
26 lines (23 loc) · 969 Bytes
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
import subprocess
from tqdm import tqdm
from glob import glob
from termcolor import cprint
from os.path import expanduser, join
(AUD_PATH, OUT_PATH) = (
'/Users/chipdelmal/Pictures/Waveart/',
expanduser('/Users/chipdelmal/Pictures/Waveart/out')
)
# Read playlists --------------------------------------------------------------
playlists = glob(join(AUD_PATH, '*m3u'))
# Process playlists -----------------------------------------------------------
for playlist in playlists[:]:
cprint(playlist, 'white')
# Get filenames from playlist ---------------------------------------------
myFile = open(playlist, "r")
data = myFile.read()
files = data.split("\n")[::2][1:]
# Process files -----------------------------------------------------------
for file in tqdm(files):
# cmd = ['python', 'eclipse.py', file, OUT_PATH, '1']
cmd = ['python', 'eclipseSimple.py', file, OUT_PATH, '1']
subprocess.Popen(cmd).wait()