-
Notifications
You must be signed in to change notification settings - Fork 1
/
code-buddy.py
42 lines (40 loc) · 1.41 KB
/
code-buddy.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
import os
from getArgs import getArgs
from modules import python, javascript, html, php, bootstrap, cca
# from folder import file
# code-buddy.py create (file type) (directory name)
# Checks for "create"
if getArgs(1) == "create":
# Checks for which file type
projectType = getArgs(2)
# Checks for file name
if projectType == "python":
name = getArgs(3)
python.createPythonProject(name)
print("Folder created succesfully")
elif projectType == "javascript":
name = getArgs(3)
javascript.createJavascriptProject(name)
print("Folder created succesfully")
elif projectType == "html":
name = getArgs(3)
html.createHtmlProject(name)
print("Folder created succesfully")
elif projectType == "php":
name = getArgs(3)
php.createPhpProject(name)
print("Folder created succesfully")
elif projectType == "bootstrap":
name = getArgs(3)
bootstrap.createPhpProject(name)
print("Folder created succesfully")
elif projectType == "cca"
name = getArgs(3)
cca.createCcaProject(name)
print("Folder created succesfully")
# If not valid file type
else:
print(f"argument {getArgs(2)} is unknown, try: 'python, javascript, html, php or bootstrap'")
else:
# If invalid "create"
print(f"argument {getArgs(1)} is unknown, use 'create' to create a folder")