techniques=input("\nWhat techniques does your project use? Write them out in the following format: python, java, html, css\n\nTechniques: ").replace("","").lower().split(",")
description=input("Provide a description of your project: ")
url=input("Provide a link to the source code/demo of your project: ")
img_url=input("Image source (ex: logo.jpg): ")
# ---- COLLECT INFO ----
# lexicographical order sort aka alphabetical
techniques.sort()
new_project={
"project_name":project_title,
"project_id":project_id,
"used_techniques":techniques,
"long_description":description,
"img_url":img_url,
"url":url
}
cls()
print("\n\nProject preview:\n")
pprint.pp(new_project)
option=int(input("\n1: Create\n2: Cancel\n> "))
ifoption==1:
data.append(new_project)
save(data)
pass
deflist_projects(data):
cls()
forprojectindata:
pprint.pp(project)
print("\n")
defedit_project(data,id):
whileTrue:
ifid>get_project_count(data)orid<0:
print("Project ID doesn't exist.\n")
id=int(input("Project_ID to edit: "))
else:
cls()
project=get_project(data,id)
project.pop('project_id')# Project ID shouldn't be changed
print(f"Editing project: {project['title']}\n")
pprint.pp(project)
print("")
forfieldinenumerate(project):
print(f"{field[0]}: {field[1]}")
input("\nField to edit: ")
defdelete_project(data):
pass
defmenu(data):
menu_items=["Add new project","List projects","Edit existing project","Delete project","Quit"]