diff --git a/pomodorodiscord/README.md b/pomodorodiscord/README.md new file mode 100644 index 0000000..4caa9a6 --- /dev/null +++ b/pomodorodiscord/README.md @@ -0,0 +1,29 @@ + +## Structure + +- `run.py`: The main entry point. +- `src/`: The main package directory. + - `app.py`: Defines the main window and tab view, into which the three visible frames are packed. + - `utils.py`: Loading and saving data, configuration. + - `frames/`: + - `pomodoro_frame.py`: Entire timer functionality + storing data + communicating with Rich Presence. + - `settings_frame.py`: Updates config. + - `stats_frame.py`: Displays stats and graphs. + - `reusable/`: Reusable UI components. + - `entry_frame.py`: For settings_frame.py, where you put in custom durations for the pomodoro. + - `statistic_display.py`: For stats_frame.py. + - `logic/`: Logic separate from customtkinter. + - `richpresence.py`: The Discord Rich Presence integration - editable, but if you change function args go to pomodoro_frame.py update_rpc. + - `graphs.py`: matplotlib plots using data collected. +- `sounds/`: Beep. +- `themes/`: Responsible for all colors in the GUI. Theme is loaded on launch in run.py. + +## File Dependencies + +- `run.py` imports and uses `src/app.py`. +- `src/app.py` imports and uses `src/frames/*` and `src/utils.py`. +- `src/frames/pomodoro_frame.py` imports and uses `src/utils.py` and `src/logic/richpresence.py`. +- `src/frames/settings_frame.py` imports and uses `src/components/entry_frame.py` and `src/utils.py`. +- `src/frames/stats_frame.py` imports and uses `src/components/statistic_display.py`, `src/utils.py`, and `src/logic/graphs.py`. + +## When running make sure you're in pomodoro-discord/pomodorodiscord. diff --git a/pomodorodiscord/src/__init__.py b/pomodorodiscord/src/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pomodorodiscord/src/frames/__init__.py b/pomodorodiscord/src/frames/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pomodorodiscord/src/frames/settings_frame.py b/pomodorodiscord/src/frames/settings_frame.py index c7e2d86..7fe4a5c 100644 --- a/pomodorodiscord/src/frames/settings_frame.py +++ b/pomodorodiscord/src/frames/settings_frame.py @@ -1,6 +1,6 @@ import os import customtkinter as ctk -from src.components.entry_frame import EntryFrame +from src.reusable.entry_frame import EntryFrame from src.utils import load_config, save_config, reload_app, beep, DEF_POMODORO_MINS, DEF_SB_MINS, DEF_LB_MINS, DEF_SB_BEFORE_L diff --git a/pomodorodiscord/src/frames/stats_frame.py b/pomodorodiscord/src/frames/stats_frame.py index 1a002c0..85caa92 100644 --- a/pomodorodiscord/src/frames/stats_frame.py +++ b/pomodorodiscord/src/frames/stats_frame.py @@ -1,6 +1,6 @@ import customtkinter as ctk from datetime import datetime -from src.components.statistic_display import StatisticDisplay +from src.reusable.statistic_display import StatisticDisplay from src.utils import load_data from src.logic.graphs import graph_pomodoro_sessions, graph_hours_studied diff --git a/pomodorodiscord/src/logic/__init__.py b/pomodorodiscord/src/logic/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pomodorodiscord/src/reusable/__init__.py b/pomodorodiscord/src/reusable/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/pomodorodiscord/src/components/entry_frame.py b/pomodorodiscord/src/reusable/entry_frame.py similarity index 100% rename from pomodorodiscord/src/components/entry_frame.py rename to pomodorodiscord/src/reusable/entry_frame.py diff --git a/pomodorodiscord/src/components/statistic_display.py b/pomodorodiscord/src/reusable/statistic_display.py similarity index 100% rename from pomodorodiscord/src/components/statistic_display.py rename to pomodorodiscord/src/reusable/statistic_display.py