Compare commits

...

5 Commits

Author SHA1 Message Date
3f10d8049a hamburger 2025-11-25 23:21:11 -05:00
8e9d57c5cb formatting changes 2025-11-25 23:20:57 -05:00
ff32de4ac0 formatting changes 2025-11-25 23:20:46 -05:00
b137fcb0f9 minor filepath changes 2025-11-25 23:20:25 -05:00
dfca9bf2ed Updated project name 2025-11-25 23:19:56 -05:00
5 changed files with 19 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
[project]
name = "Meal Picker"
name = "NoteNook"
version = "0.1.0"
description = "An app designed to build, store, and select meals for shopping purposes."
readme = "README.md"
@@ -18,7 +18,7 @@ org = "codes.kalar"
# project display name that is used as an app title on Android and iOS home screens,
# shown in window titles and about app dialogs on desktop.
product = "Meal Picker"
product = "NoteNook"
# company name to display in about app dialogs
company = "Nick Kalar"

View File

@@ -5,11 +5,13 @@ from dotenv import load_dotenv
load_dotenv()
file_path = os.getenv("FILE_PATH") + "/checklist.md" if os.getenv("FILE_PATH") else "./checklist.md"
checklist_file_path = os.getenv("FILE_PATH") + "/checklist.md" if os.getenv("FILE_PATH") else "./checklist.md"
ingredients_file_path = "./src/json/ingredients.json"
def read_json() -> dict:
try:
with open("./src/json/ingredients.json", "rt") as file:
with open(ingredients_file_path, "rt") as file:
return json.load(file)
except:
print("Could not find or read file.")
@@ -17,7 +19,7 @@ def read_json() -> dict:
def update_json(meals: dict) -> None:
try:
with open("./src/json/ingredients.json", "w") as file:
with open(ingredients_file_path, "w") as file:
json.dump(meals, file, indent=4)
except Exception as e:
print(f"Unable to write data to file. {e}")
@@ -44,7 +46,7 @@ def combine_ingredients(meals: dict) -> dict:
def write_checklist(data: dict) -> None:
try:
with open(file_path, 'w') as checklist:
with open(checklist_file_path, 'w') as checklist:
for ingredient, details in data.items():
s = ingredient + " - " + str(details['quantity'])
if details['units'] != None:

BIN
src/assets/hamburger.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -5,12 +5,14 @@ from models.MenuBar import create_menubar
def main(page: ft.Page):
page.window.width = 750
page.window.height = 900
page.window.top = 10
page.appbar = create_menubar(page, selector, builder)
page.bgcolor = '#013328'
page.add(ft.Pagelet(
content = ft.Text("Welcome to Meal Picker! Please select an option from the menu above to get started.")
)
)
page.add(ft.Pagelet(content=ft.Text()))
selector(page)
if __name__ == "__main__":
ft.app(main)

View File

@@ -2,15 +2,17 @@ import flet as ft
def create_menubar(page: ft.Page, selector, builder):
menu = ft.AppBar(
title=ft.Text("Meal Picker"),
bgcolor=ft.Colors.GREEN_700,
title=ft.Text("NoteNook"),
bgcolor='#CC8B65',
center_title=False,
actions=[
ft.PopupMenuButton(
items=[
ft.PopupMenuItem(text="Meal Selector", on_click=lambda e: selector(page)),
ft.PopupMenuItem(text="Meal Builder", on_click=lambda e: builder(page)),
]
],
icon = ft.Icons.FASTFOOD_OUTLINED,
icon_color = '#E3DCD2'
)
]
)