/
Make_New_Project.py
58 lines (50 loc) · 1.58 KB
/
Make_New_Project.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import os, tkinter as tk
from tkinter import simpledialog
root = tk.Tk()
root.withdraw()
new_project = simpledialog.askstring(title=" ", prompt="New Project Name:")
new_project = new_project.replace(" ", "_")
new_project = new_project.upper()
path = os.path.dirname(__file__)
prj_dir = path + "\\" + new_project
os.mkdir(prj_dir)
main_directories = [
"01_REFERENCE",
"02_FOOTAGE",
"03_ELEMENTS",
"04_PROJECTS",
"05_OUTPUT",
]
sub_directories = [
["01_INTERNAL", "02_FROM_CLIENT", "03_TO_CLIENT"],
["01_PLATES", "02_PRERENDERS"],
[
"01_STILLS",
"02_PSD",
"03_VECTOR",
"04_MODEL",
"05_VIDEO",
"06_SOUND",
"07_FONTS",
"02_PRESETS",
],
["01_COMP", "02_3D", "03_TRACK", "04_EDIT"],
["01_REVIEW", "02_POSTING", "03_DELIVERY"],
]
for x in range(len(sub_directories)):
os.mkdir(os.path.join(prj_dir, main_directories[x]))
for y in range(len(sub_directories[x])):
os.mkdir(os.path.join(prj_dir, main_directories[x], sub_directories[x][y]))
for z in range(len(sub_directories[4])):
file_dir = prj_dir + "\\05_OUTPUT\\" + sub_directories[4][z]
file_name = file_dir + "\\" + "Make_Date_Folder.py"
f = open(file_name, "a")
f.write(
"import os \n"
+ "from datetime import date \n"
+ "today = date.today() \n"
+ 'datetime = today.strftime("%m/%d/%y") \n'
+ 'datetime = datetime.replace("/","") \n'
+ 'os.mkdir(os.path.dirname(__file__) + "\\\\" + datetime)'
)
f.close()