-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopen_folders.py
More file actions
24 lines (22 loc) · 965 Bytes
/
Copy pathopen_folders.py
File metadata and controls
24 lines (22 loc) · 965 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
import os
import platform
import subprocess
def open_folders(title, channel):
video_path = os.path.join("output", "videos", channel, title)
# Opening ouput video folder
# Open the generated image
if platform.system() == 'Windows':
os.startfile(video_path)
elif platform.system() == 'Darwin': # macOS
subprocess.Popen(['open', video_path])
else: # Assuming Linux or other POSIX-compliant system
subprocess.Popen(['xdg-open', video_path])
thumbnail_path = os.path.join("test", "generated-thumbnails", channel)
# open thumbnail generated list for specific channel
if platform.system() == 'Windows':
os.startfile(thumbnail_path)
elif platform.system() == 'Darwin': # macOS
subprocess.Popen(['open', thumbnail_path])
else: # Assuming Linux or other POSIX-compliant system
subprocess.Popen(['xdg-open', thumbnail_path])
# open_folders("TEST_TITLE", "spiritual_mutation")