From 481f82e2d83169bd36ffedf68116204dd851a5b0 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:08:55 +0300 Subject: [PATCH 01/18] pomodorotimer --- problems/pomodorotimer | 1 + 1 file changed, 1 insertion(+) create mode 100644 problems/pomodorotimer diff --git a/problems/pomodorotimer b/problems/pomodorotimer new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/problems/pomodorotimer @@ -0,0 +1 @@ + From c3af289e4d025c3217dc11f80c78c51d2933cd19 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:18:45 +0300 Subject: [PATCH 02/18] Delete problems/pomodorotimer --- problems/pomodorotimer | 1 - 1 file changed, 1 deletion(-) delete mode 100644 problems/pomodorotimer diff --git a/problems/pomodorotimer b/problems/pomodorotimer deleted file mode 100644 index 8b137891..00000000 --- a/problems/pomodorotimer +++ /dev/null @@ -1 +0,0 @@ - From 02a83dd9613524c13fd8db6ab4921ccb5270125c Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:19:23 +0300 Subject: [PATCH 03/18] SPEC-v1.txt --- problems/pomodorotimer/SPEC-v1.txt | 76 ++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 problems/pomodorotimer/SPEC-v1.txt diff --git a/problems/pomodorotimer/SPEC-v1.txt b/problems/pomodorotimer/SPEC-v1.txt new file mode 100644 index 00000000..036c2682 --- /dev/null +++ b/problems/pomodorotimer/SPEC-v1.txt @@ -0,0 +1,76 @@ +PROJECT: pomodorotimer +AUTHOR: Ömer Faruk Aksoy (251478060) +VERSION: v1 +DATE: 2026-03-13 + +======================================== +OVERVIEW +======================================== + +pomodorotimer is a command-line Pomodoro and time-tracking application. +It forces users to focus by limiting the number of pauses allowed during a session. +All data is persisted in a directory called .pomodoro.timer/ +in the current working directory. + +======================================== +COMMANDS +======================================== + +--- init --- +Usage: python pomodorotimer.py init +Creates a .pomodorotimer/ directory and an empty timer.dat file. +If .pomodorotimer/ already exists, print "Already initialized" and exit. + +--- start --- +Usage: python pomodorotimer.py start "Math Study" +Starts a new task. Checks if the last completed task was finished less than 5 minutes ago.  +If so, rejects starting. +Appends a new task to timer.dat with status RUNNING. +Prints "Started task: . Focus!" + +--- pause --- +Usage: python pomodorotimer.py pause +Pauses the currently RUNNING task.  +A user can only pause a task a maximum of 3 times. +If pause count is 3, prints "Error: Pause limit reached! Keep focusing." +Otherwise, updates status to PAUSED, increments pause count, and prints "Task paused. pauses remaining." + +--- resume --- +Usage: python pomodorotimer.py resume +Changes the currently PAUSED task status back to RUNNING. +Prints "Task resumed. Get back to work!" + +--- stop --- +Usage: python pomodorotimer.py stop +Stops the active task and calculates total elapsed time. +If elapsed time is less than 25 minutes, prints "Warning: Stopped before 25 minutes." +Marks task as DONE. +Prints "Task stopped. Total time: mins." + +--- log --- +Usage: python pomodorotimer.py log +Prints all tasks, one per line: +  [1] [DONE] Math Study (25 mins) - 2 pauses +  [2] [RUNNING] Read Book (12 mins) - 0 pauses +If no tasks exist, prints "No timer logs found." + +======================================== +DATA FORMAT +======================================== + +File: .pomodorotimertimer/timer.dat +Format: One task per line, fields separated by | +Structure: id | description | status | elapsed_minutes | pause_count | last_update_timestamp +Example: +1|Math Study|DONE|25|2|1710345600 +2|Read Book|RUNNING|12|0|1710347800 + +======================================== +ERROR HANDLING +======================================== + +- Running any command before "init": print "Not initialized. Run: python minitimer.py init" +- Starting a task while one is RUNNING: print "Error: A task is already running. Stop or pause it first." +- Pausing a task that is not RUNNING: print "Error: No active task to pause." +- Starting a task before 5-minute break: print "Error: You must rest for 5 minutes between tasks." +- Invalid command: print "Unknown command: " From 6552e5a8a50fbfc3edeca1b661804befd6b7a73e Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:26:25 +0300 Subject: [PATCH 04/18] Update SPEC-v1.txt --- problems/pomodorotimer/SPEC-v1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/pomodorotimer/SPEC-v1.txt b/problems/pomodorotimer/SPEC-v1.txt index 036c2682..1d14c855 100644 --- a/problems/pomodorotimer/SPEC-v1.txt +++ b/problems/pomodorotimer/SPEC-v1.txt @@ -9,7 +9,7 @@ OVERVIEW pomodorotimer is a command-line Pomodoro and time-tracking application. It forces users to focus by limiting the number of pauses allowed during a session. -All data is persisted in a directory called .pomodoro.timer/ +All data is persisted in a directory called .pomodorotimer/ in the current working directory. ======================================== From aefa83cb8986772aeb7bd29040ca10f2a6f93a11 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:29:34 +0300 Subject: [PATCH 05/18] Create SPEC-v2.txt --- problems/pomodorotimer/SPEC-v2.txt | 85 ++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 problems/pomodorotimer/SPEC-v2.txt diff --git a/problems/pomodorotimer/SPEC-v2.txt b/problems/pomodorotimer/SPEC-v2.txt new file mode 100644 index 00000000..0451f811 --- /dev/null +++ b/problems/pomodorotimer/SPEC-v2.txt @@ -0,0 +1,85 @@ +PROJECT: pomodorotimer +AUTHOR: Ömer Faruk Aksoy (251478060) +VERSION: v2 +DATE: 2026-03-28 + +======================================== +OVERVIEW +======================================== + +pomodorotimer is a command-line Pomodoro and time-tracking application. +It forces users to focus by limiting the number of pauses allowed during a session. +All data is persisted in a directory called .pomodorotimer/ +in the current working directory. + +======================================== +COMMANDS +======================================== + +--- init --- +Usage: python pomodorotimer.py init +Creates a .pomodorotimer/ directory and an empty timer.dat file. +If .pomodorotimer/ already exists, print "Already initialized" and exit. + +--- start --- +Usage: python pomodorotimer.py start "Math Study" +Starts a new task. Checks if the last completed task was finished less than 5 minutes ago. +If so, rejects starting. +Appends a new task to timer.dat with status RUNNING. +Prints "Started task: . Focus!" + +--- pause --- +Usage: python pomodorotimer.py pause +Pauses the currently RUNNING task. +A user can only pause a task a maximum of 3 times. +If pause count is 3, prints "Error: Pause limit reached! Keep focusing." +Otherwise, updates status to PAUSED, increments pause count, and prints "Task paused. pauses remaining." + +--- resume --- +Usage: python pomodorotimer.py resume +Changes the currently PAUSED task status back to RUNNING. +Prints "Task resumed. Get back to work!" + +--- stop --- +Usage: python pomodorotimer.py stop +Stops the active task and calculates total elapsed time. +If elapsed time is less than 25 minutes, prints "Warning: Stopped before 25 minutes." +Marks task as DONE. +Prints "Task stopped. Total time: mins." + +--- log --- +Usage: python pomodorotimer.py log +Prints all tasks, one per line: + [1] [DONE] Math Study (25 mins) - 2 pauses + [2] [RUNNING] Read Book (12 mins) - 0 pauses +If no tasks exist, prints "No timer logs found." + +======================================== +DATA FORMAT +======================================== + +File: .minitimer/timer.dat +Format: One task per line, fields separated by | +Structure: id | description | status | elapsed_minutes | pause_count | last_update_timestamp +Example: +1|Math Study|DONE|25|2|1710345600 +2|Read Book|RUNNING|12|0|1710347800 + +======================================== +DISPLAY REQUIREMENTS +======================================== + +--- Time Formatting --- +All durations displayed to the user must follow the MM:SS (Minutes:Seconds) format. +If the total duration exceeds 60 minutes, the format must automatically switch to HH:MM:SS (Hours:Minutes:Seconds). +Internal integer values (seconds) must be converted to this human-readable format before being printed to the console. + +======================================== +ERROR HANDLING +======================================== + +- Running any command before "init": print "Not initialized. Run: python pomodorotimer.py init" +- Starting a task while one is RUNNING: print "Error: A task is already running. Stop or pause it first." +- Pausing a task that is not RUNNING: print "Error: No active task to pause." +- Starting a task before 5-minute break: print "Error: You must rest for 5 minutes between tasks." +- Invalid command: print "Unknown command: " From 7b256f5f969c8607c5394ca2144558d2ada8c6b9 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:32:31 +0300 Subject: [PATCH 06/18] Update SPEC-v1.txt --- problems/pomodorotimer/SPEC-v1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/pomodorotimer/SPEC-v1.txt b/problems/pomodorotimer/SPEC-v1.txt index 1d14c855..dc4551c8 100644 --- a/problems/pomodorotimer/SPEC-v1.txt +++ b/problems/pomodorotimer/SPEC-v1.txt @@ -69,7 +69,7 @@ Example: ERROR HANDLING ======================================== -- Running any command before "init": print "Not initialized. Run: python minitimer.py init" +- Running any command before "init": print "Not initialized. Run: python pomodorotimer.py init" - Starting a task while one is RUNNING: print "Error: A task is already running. Stop or pause it first." - Pausing a task that is not RUNNING: print "Error: No active task to pause." - Starting a task before 5-minute break: print "Error: You must rest for 5 minutes between tasks." From 515c46e6130d4ebb9849bc2a4ec7833d62b00a49 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:34:28 +0300 Subject: [PATCH 07/18] Update SPEC-v2.txt --- problems/pomodorotimer/SPEC-v2.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/problems/pomodorotimer/SPEC-v2.txt b/problems/pomodorotimer/SPEC-v2.txt index 0451f811..b5d07539 100644 --- a/problems/pomodorotimer/SPEC-v2.txt +++ b/problems/pomodorotimer/SPEC-v2.txt @@ -58,7 +58,7 @@ If no tasks exist, prints "No timer logs found." DATA FORMAT ======================================== -File: .minitimer/timer.dat +File: .pomodorotimer/timer.dat Format: One task per line, fields separated by | Structure: id | description | status | elapsed_minutes | pause_count | last_update_timestamp Example: From 2a421ecbc6a520c22b98c12d757eb465f003075a Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:35:46 +0300 Subject: [PATCH 08/18] Create problem.json --- problems/pomodorotimer/problem.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 problems/pomodorotimer/problem.json diff --git a/problems/pomodorotimer/problem.json b/problems/pomodorotimer/problem.json new file mode 100644 index 00000000..08e854dc --- /dev/null +++ b/problems/pomodorotimer/problem.json @@ -0,0 +1,10 @@ +{ + "name": "PomodoroTimer", + "binary_name": "pomodorotimer.py", + "v1_spec": "SPEC-v1.txt", + "v1_test": "test-v1.sh", + "v1_prompt": "Implement {{binary_name}} as described in SPEC-v1.txt using {{language}}. The executable must be named '{{binary_name}}' and be runnable as ./{{binary_name}}. For compiled languages, include a Makefile or build script. For interpreted languages, ensure the {{binary_name}} file has a proper shebang line and is executable. Verify your implementation passes all tests by running: bash test-v1.sh", + "v2_spec": "SPEC-v2.txt", + "v2_test": "test-v2.sh", + "v2_prompt": "Read SPEC-v2.txt and extend the existing {{binary_name}} implementation with timer commands. Verify your implementation passes all tests by running: bash test-v2.sh" +} From 970bb744834e3e1026678e6c5ac0a71bfc7dda98 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:37:00 +0300 Subject: [PATCH 09/18] Create test-v1.sh --- problems/pomodorotimer/test-v1.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 problems/pomodorotimer/test-v1.sh diff --git a/problems/pomodorotimer/test-v1.sh b/problems/pomodorotimer/test-v1.sh new file mode 100644 index 00000000..58f8387d --- /dev/null +++ b/problems/pomodorotimer/test-v1.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# test-v1.sh - Testing core functionality (init, start, log) + +echo "--- Running test-v1.sh ---" +rm -rf .pomodorotimer + +python3 pomodorotimer.py init +python3 pomodorotimer.py start "Math Study" +python3 pomodorotimer.py log + +echo "--- Test v1 completed successfully ---" From 07356ec12b524735c15f81ee657921a47b5af34f Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 10:37:21 +0300 Subject: [PATCH 10/18] Create test-v2.sh --- problems/pomodorotimer/test-v2.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 problems/pomodorotimer/test-v2.sh diff --git a/problems/pomodorotimer/test-v2.sh b/problems/pomodorotimer/test-v2.sh new file mode 100644 index 00000000..2c831342 --- /dev/null +++ b/problems/pomodorotimer/test-v2.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# test-v2.sh - Testing edge-cases and new features (pause, resume, stop) + +echo "--- Running test-v2.sh ---" +rm -rf .pomodorotimer + +python3 pomodorotimer.py init +python3 pomodorotimer.py start "Math Study" +python3 pomodorotimer.py pause +python3 pomodorotimer.py resume +python3 pomodorotimer.py stop +python3 pomodorotimer.py pause +python3 pomodorotimer.py log + +echo "--- Test v2 completed successfully ---" From 68069f23d0bda9fbe919040f3d391ea8740e97ee Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 18:38:58 +0300 Subject: [PATCH 11/18] Update SPEC-v1.txt --- .../SPEC-v1.txt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename problems/{pomodorotimer => minipomodoro}/SPEC-v1.txt (79%) diff --git a/problems/pomodorotimer/SPEC-v1.txt b/problems/minipomodoro/SPEC-v1.txt similarity index 79% rename from problems/pomodorotimer/SPEC-v1.txt rename to problems/minipomodoro/SPEC-v1.txt index dc4551c8..8b300385 100644 --- a/problems/pomodorotimer/SPEC-v1.txt +++ b/problems/minipomodoro/SPEC-v1.txt @@ -1,4 +1,4 @@ -PROJECT: pomodorotimer +PROJECT: minipomodoro AUTHOR: Ömer Faruk Aksoy (251478060) VERSION: v1 DATE: 2026-03-13 @@ -7,9 +7,9 @@ DATE: 2026-03-13 OVERVIEW ======================================== -pomodorotimer is a command-line Pomodoro and time-tracking application. +minipomodoro is a command-line Pomodoro and time-tracking application. It forces users to focus by limiting the number of pauses allowed during a session. -All data is persisted in a directory called .pomodorotimer/ +All data is persisted in a directory called .minipomodoro/ in the current working directory. ======================================== @@ -17,38 +17,38 @@ COMMANDS ======================================== --- init --- -Usage: python pomodorotimer.py init -Creates a .pomodorotimer/ directory and an empty timer.dat file. -If .pomodorotimer/ already exists, print "Already initialized" and exit. +Usage: python minipomodoro.py init +Creates a .minipomodoro/ directory and an empty timer.dat file. +If .minipomodoro/ already exists, print "Already initialized" and exit. --- start --- -Usage: python pomodorotimer.py start "Math Study" +Usage: python minipomodoro.py start "Math Study" Starts a new task. Checks if the last completed task was finished less than 5 minutes ago.  If so, rejects starting. Appends a new task to timer.dat with status RUNNING. Prints "Started task: . Focus!" --- pause --- -Usage: python pomodorotimer.py pause +Usage: python minipomodoro.py pause Pauses the currently RUNNING task.  A user can only pause a task a maximum of 3 times. If pause count is 3, prints "Error: Pause limit reached! Keep focusing." Otherwise, updates status to PAUSED, increments pause count, and prints "Task paused. pauses remaining." --- resume --- -Usage: python pomodorotimer.py resume +Usage: python minipomodoro.py resume Changes the currently PAUSED task status back to RUNNING. Prints "Task resumed. Get back to work!" --- stop --- -Usage: python pomodorotimer.py stop +Usage: python minipomodoro.py stop Stops the active task and calculates total elapsed time. If elapsed time is less than 25 minutes, prints "Warning: Stopped before 25 minutes." Marks task as DONE. Prints "Task stopped. Total time: mins." --- log --- -Usage: python pomodorotimer.py log +Usage: python minipomodoro.py log Prints all tasks, one per line:   [1] [DONE] Math Study (25 mins) - 2 pauses   [2] [RUNNING] Read Book (12 mins) - 0 pauses @@ -58,7 +58,7 @@ If no tasks exist, prints "No timer logs found." DATA FORMAT ======================================== -File: .pomodorotimertimer/timer.dat +File: .minipomodoro/timer.dat Format: One task per line, fields separated by | Structure: id | description | status | elapsed_minutes | pause_count | last_update_timestamp Example: @@ -69,7 +69,7 @@ Example: ERROR HANDLING ======================================== -- Running any command before "init": print "Not initialized. Run: python pomodorotimer.py init" +- Running any command before "init": print "Not initialized. Run: python minipomodoro.py init" - Starting a task while one is RUNNING: print "Error: A task is already running. Stop or pause it first." - Pausing a task that is not RUNNING: print "Error: No active task to pause." - Starting a task before 5-minute break: print "Error: You must rest for 5 minutes between tasks." From 10948a564d7419b1fd1f929d02434e6d56fc0ea1 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 18:43:53 +0300 Subject: [PATCH 12/18] Update SPEC-v2.txt --- .../SPEC-v2.txt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) rename problems/{pomodorotimer => minipomodoro}/SPEC-v2.txt (82%) diff --git a/problems/pomodorotimer/SPEC-v2.txt b/problems/minipomodoro/SPEC-v2.txt similarity index 82% rename from problems/pomodorotimer/SPEC-v2.txt rename to problems/minipomodoro/SPEC-v2.txt index b5d07539..e8b59d19 100644 --- a/problems/pomodorotimer/SPEC-v2.txt +++ b/problems/minipomodoro/SPEC-v2.txt @@ -1,4 +1,4 @@ -PROJECT: pomodorotimer +PROJECT: minipomodoro AUTHOR: Ömer Faruk Aksoy (251478060) VERSION: v2 DATE: 2026-03-28 @@ -7,9 +7,9 @@ DATE: 2026-03-28 OVERVIEW ======================================== -pomodorotimer is a command-line Pomodoro and time-tracking application. +minipomodoro is a command-line Pomodoro and time-tracking application. It forces users to focus by limiting the number of pauses allowed during a session. -All data is persisted in a directory called .pomodorotimer/ +All data is persisted in a directory called .minipomodoro/ in the current working directory. ======================================== @@ -17,38 +17,38 @@ COMMANDS ======================================== --- init --- -Usage: python pomodorotimer.py init -Creates a .pomodorotimer/ directory and an empty timer.dat file. -If .pomodorotimer/ already exists, print "Already initialized" and exit. +Usage: python minipomodoro.py init +Creates a .minipomodoro/ directory and an empty timer.dat file. +If .minipomodoro/ already exists, print "Already initialized" and exit. --- start --- -Usage: python pomodorotimer.py start "Math Study" +Usage: python minipomodoro.py start "Math Study" Starts a new task. Checks if the last completed task was finished less than 5 minutes ago. If so, rejects starting. Appends a new task to timer.dat with status RUNNING. Prints "Started task: . Focus!" --- pause --- -Usage: python pomodorotimer.py pause +Usage: python minipomodoro.py pause Pauses the currently RUNNING task. A user can only pause a task a maximum of 3 times. If pause count is 3, prints "Error: Pause limit reached! Keep focusing." Otherwise, updates status to PAUSED, increments pause count, and prints "Task paused. pauses remaining." --- resume --- -Usage: python pomodorotimer.py resume +Usage: python minipomodoro.py resume Changes the currently PAUSED task status back to RUNNING. Prints "Task resumed. Get back to work!" --- stop --- -Usage: python pomodorotimer.py stop +Usage: python minipomodoro.py stop Stops the active task and calculates total elapsed time. If elapsed time is less than 25 minutes, prints "Warning: Stopped before 25 minutes." Marks task as DONE. Prints "Task stopped. Total time: mins." --- log --- -Usage: python pomodorotimer.py log +Usage: python minipomodoro.py log Prints all tasks, one per line: [1] [DONE] Math Study (25 mins) - 2 pauses [2] [RUNNING] Read Book (12 mins) - 0 pauses @@ -58,7 +58,7 @@ If no tasks exist, prints "No timer logs found." DATA FORMAT ======================================== -File: .pomodorotimer/timer.dat +File: .minipomodoro/timer.dat Format: One task per line, fields separated by | Structure: id | description | status | elapsed_minutes | pause_count | last_update_timestamp Example: @@ -78,7 +78,7 @@ Internal integer values (seconds) must be converted to this human-readable forma ERROR HANDLING ======================================== -- Running any command before "init": print "Not initialized. Run: python pomodorotimer.py init" +- Running any command before "init": print "Not initialized. Run: python minipomodoro.py init" - Starting a task while one is RUNNING: print "Error: A task is already running. Stop or pause it first." - Pausing a task that is not RUNNING: print "Error: No active task to pause." - Starting a task before 5-minute break: print "Error: You must rest for 5 minutes between tasks." From 3030e49b4c2d0add453c228323a2b457c2825f7a Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 18:45:44 +0300 Subject: [PATCH 13/18] Update problem.json --- problems/{pomodorotimer => minipomodoro}/problem.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename problems/{pomodorotimer => minipomodoro}/problem.json (91%) diff --git a/problems/pomodorotimer/problem.json b/problems/minipomodoro/problem.json similarity index 91% rename from problems/pomodorotimer/problem.json rename to problems/minipomodoro/problem.json index 08e854dc..20c10142 100644 --- a/problems/pomodorotimer/problem.json +++ b/problems/minipomodoro/problem.json @@ -1,6 +1,6 @@ { - "name": "PomodoroTimer", - "binary_name": "pomodorotimer.py", + "name": "Mini-Pomodoro", + "binary_name": "minipomodoro.py", "v1_spec": "SPEC-v1.txt", "v1_test": "test-v1.sh", "v1_prompt": "Implement {{binary_name}} as described in SPEC-v1.txt using {{language}}. The executable must be named '{{binary_name}}' and be runnable as ./{{binary_name}}. For compiled languages, include a Makefile or build script. For interpreted languages, ensure the {{binary_name}} file has a proper shebang line and is executable. Verify your implementation passes all tests by running: bash test-v1.sh", From a7d08f51a771ea3312792013a7d736c0cc9f1cbd Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 18:46:30 +0300 Subject: [PATCH 14/18] Update test-v1.sh --- problems/{pomodorotimer => minipomodoro}/test-v1.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename problems/{pomodorotimer => minipomodoro}/test-v1.sh (55%) diff --git a/problems/pomodorotimer/test-v1.sh b/problems/minipomodoro/test-v1.sh similarity index 55% rename from problems/pomodorotimer/test-v1.sh rename to problems/minipomodoro/test-v1.sh index 58f8387d..f0e9834c 100644 --- a/problems/pomodorotimer/test-v1.sh +++ b/problems/minipomodoro/test-v1.sh @@ -2,10 +2,10 @@ # test-v1.sh - Testing core functionality (init, start, log) echo "--- Running test-v1.sh ---" -rm -rf .pomodorotimer +rm -rf .minipomodoro -python3 pomodorotimer.py init -python3 pomodorotimer.py start "Math Study" -python3 pomodorotimer.py log +python3 minipomodoro.py init +python3 minipomodoro.py start "Math Study" +python3 minipomodoro.py log echo "--- Test v1 completed successfully ---" From 9a261febc741083e58b443685f5aad462de06ba6 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Tue, 14 Apr 2026 18:47:07 +0300 Subject: [PATCH 15/18] Update test-v2.sh --- problems/minipomodoro/test-v2.sh | 15 +++++++++++++++ problems/pomodorotimer/test-v2.sh | 15 --------------- 2 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 problems/minipomodoro/test-v2.sh delete mode 100644 problems/pomodorotimer/test-v2.sh diff --git a/problems/minipomodoro/test-v2.sh b/problems/minipomodoro/test-v2.sh new file mode 100644 index 00000000..024e1163 --- /dev/null +++ b/problems/minipomodoro/test-v2.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# test-v2.sh - Testing edge-cases and new features (pause, resume, stop) + +echo "--- Running test-v2.sh ---" +rm -rf .minipomodoro + +python3 minipomodoro.py init +python3 minipomodoro.py start "Math Study" +python3 minipomodoro.py pause +python3 minipomodoro.py resume +python3 minipomodoro.py stop +python3 minipomodoro.py pause +python3 minipomodoro.py log + +echo "--- Test v2 completed successfully ---" diff --git a/problems/pomodorotimer/test-v2.sh b/problems/pomodorotimer/test-v2.sh deleted file mode 100644 index 2c831342..00000000 --- a/problems/pomodorotimer/test-v2.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# test-v2.sh - Testing edge-cases and new features (pause, resume, stop) - -echo "--- Running test-v2.sh ---" -rm -rf .pomodorotimer - -python3 pomodorotimer.py init -python3 pomodorotimer.py start "Math Study" -python3 pomodorotimer.py pause -python3 pomodorotimer.py resume -python3 pomodorotimer.py stop -python3 pomodorotimer.py pause -python3 pomodorotimer.py log - -echo "--- Test v2 completed successfully ---" From a3c798f21dadb4fcceabe3eaa24b2b06cbf48a80 Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Sat, 18 Apr 2026 13:52:06 +0300 Subject: [PATCH 16/18] Create SPEC-v3.txt --- problems/minipomodoro/SPEC-v3.txt | 103 ++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 problems/minipomodoro/SPEC-v3.txt diff --git a/problems/minipomodoro/SPEC-v3.txt b/problems/minipomodoro/SPEC-v3.txt new file mode 100644 index 00000000..9e7b26c3 --- /dev/null +++ b/problems/minipomodoro/SPEC-v3.txt @@ -0,0 +1,103 @@ +PROJECT: minipomodoro +AUTHOR: Ömer Faruk Aksoy (251478060) +VERSION: v3 +DATE: 2026-04-18 + +======================================== +OVERVIEW +======================================== + +minipomodoro is a command-line Pomodoro and time-tracking application. +It forces users to focus by limiting the number of pauses allowed during a session, +and helps maintain consistency through a daily goal tracking system. +All data is persisted in a directory called .minipomodoro/ +in the current working directory. + +======================================== +COMMANDS +======================================== + +--- init --- +Usage: python minipomodoro.py init +Creates a .minipomodoro/ directory, an empty timer.dat file, and a default goal.dat file (default value: 0). +If .minipomodoro/ already exists, print "Already initialized" and exit. + +--- goal --- +Usage: python minipomodoro.py goal +Sets the daily target for completed tasks. +Example: python minipomodoro.py goal 4 +Saves the target integer to goal.dat. +Prints: "Daily goal set to tasks. You can do it!" + +--- start --- +Usage: python minipomodoro.py start "Math Study" +Starts a new task. Checks if the last completed task was finished less than 5 minutes ago. +If so, rejects starting. +Appends a new task to timer.dat with status RUNNING. +Prints "Started task: . Focus!" + +--- pause --- +Usage: python minipomodoro.py pause +Pauses the currently RUNNING task. +A user can only pause a task a maximum of 3 times. +If pause count is 3, prints "Error: Pause limit reached! Keep focusing." +Otherwise, updates status to PAUSED, increments pause count, and prints "Task paused. pauses remaining." + +--- resume --- +Usage: python minipomodoro.py resume +Changes the currently PAUSED task status back to RUNNING. +Prints "Task resumed. Get back to work!" + +--- stop --- +Usage: python minipomodoro.py stop +Stops the active task and calculates total elapsed time. +If elapsed time is less than 25 minutes, prints "Warning: Stopped before 25 minutes." +Marks task as DONE. +Prints "Task stopped. Total time: ." + +--- log --- +Usage: python minipomodoro.py log +First, checks goal.dat. If a goal > 0 is set, calculates the percentage of DONE tasks and prints a progress bar (10 characters wide, using '=' for progress and ' ' for empty). +Example: + Progress: [==== ] 2/5 tasks (40%) + +Then, prints all tasks, one per line: + [1] [DONE] Math Study (25:00) - 2 pauses + [2] [RUNNING] Read Book (12:05) - 0 pauses +If no tasks exist, prints "No timer logs found." + +======================================== +DATA FORMAT +======================================== + +File: .minipomodoro/timer.dat +Format: One task per line, fields separated by | +Structure: id | description | status | elapsed_seconds | pause_count | last_update_timestamp +Example: +1|Math Study|DONE|1500|2|1710345600 +2|Read Book|RUNNING|725|0|1710347800 + +File: .minipomodoro/goal.dat +Format: A single plain text integer representing the daily task goal. +Example: +4 + +======================================== +DISPLAY REQUIREMENTS +======================================== + +--- Time Formatting --- +All durations displayed to the user must follow the MM:SS (Minutes:Seconds) format. +If the total duration exceeds 60 minutes, the format must automatically switch to HH:MM:SS (Hours:Minutes:Seconds). +Internal integer values (seconds) must be converted to this human-readable format before being printed to the console. + +======================================== +ERROR HANDLING +======================================== + +- Running any command before "init": print "Not initialized. Run: python minipomodoro.py init" +- Starting a task while one is RUNNING: print "Error: A task is already running. Stop or pause it first." +- Pausing a task that is not RUNNING: print "Error: No active task to pause." +- Starting a task before 5-minute break: print "Error: You must rest for 5 minutes between tasks." +- Setting a goal with non-positive integer: print "Error: Goal must be a positive integer." +- Invalid command: print "Unknown command: " From e846f3140b4f457c0930b59524a235c8a817303f Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Sat, 18 Apr 2026 13:52:51 +0300 Subject: [PATCH 17/18] Create test-v3.sh --- problems/minipomodoro/test-v3.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 problems/minipomodoro/test-v3.sh diff --git a/problems/minipomodoro/test-v3.sh b/problems/minipomodoro/test-v3.sh new file mode 100644 index 00000000..0f345cc4 --- /dev/null +++ b/problems/minipomodoro/test-v3.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# test-v3.sh - Testing Daily Goals and Progress Bar + +echo "--- Running test-v3.sh ---" +rm -rf .minipomodoro + +# Sistemi başlat ve günlük hedefi 3 olarak belirle +python3 minipomodoro.py init +python3 minipomodoro.py goal 3 + +# İlk görevi yap ve bitir +python3 minipomodoro.py start "Math Study" +python3 minipomodoro.py stop + +# İkinci görevi başlat, duraklat, devam et ve bitir +python3 minipomodoro.py start "Read Book" +python3 minipomodoro.py pause +python3 minipomodoro.py resume +python3 minipomodoro.py stop + +# İlerleme çubuğunu (Progress Bar) görmek için logları bas +python3 minipomodoro.py log + +echo "--- Test v3 completed successfully ---" From f4e15b41d7a2c80eb4c723c533498d51e6e94b7a Mon Sep 17 00:00:00 2001 From: Omer-419 Date: Sat, 18 Apr 2026 13:53:11 +0300 Subject: [PATCH 18/18] Update problem.json --- problems/minipomodoro/problem.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/problems/minipomodoro/problem.json b/problems/minipomodoro/problem.json index 20c10142..51a2a32a 100644 --- a/problems/minipomodoro/problem.json +++ b/problems/minipomodoro/problem.json @@ -6,5 +6,8 @@ "v1_prompt": "Implement {{binary_name}} as described in SPEC-v1.txt using {{language}}. The executable must be named '{{binary_name}}' and be runnable as ./{{binary_name}}. For compiled languages, include a Makefile or build script. For interpreted languages, ensure the {{binary_name}} file has a proper shebang line and is executable. Verify your implementation passes all tests by running: bash test-v1.sh", "v2_spec": "SPEC-v2.txt", "v2_test": "test-v2.sh", - "v2_prompt": "Read SPEC-v2.txt and extend the existing {{binary_name}} implementation with timer commands. Verify your implementation passes all tests by running: bash test-v2.sh" + "v2_prompt": "Read SPEC-v2.txt and extend the existing {{binary_name}} implementation with timer commands. Verify your implementation passes all tests by running: bash test-v2.sh", + "v3_spec": "SPEC-v3.txt", + "v3_test": "test-v3.sh", + "v3_prompt": "Read SPEC-v3.txt and extend the existing {{binary_name}} implementation with a daily goal tracking system and progress bar. Verify your implementation passes all tests by running: bash test-v3.sh" }