Skip to content

Commit 8574aa9

Browse files
committed
Normalize user days path to lowercase and update references
1 parent 838160c commit 8574aa9

5 files changed

Lines changed: 16 additions & 12 deletions

File tree

commands/today.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ def select_template_for_day(day_of_week, status_context):
425425
Smart Template Selection: All templates compete, best wins.
426426
427427
Process:
428-
1. Gather ALL templates from user/Days/
428+
1. Gather ALL templates from user/days/
429429
2. Filter by eligibility (days property + filename matching)
430430
3. Score by status alignment
431431
4. Pick highest scorer
@@ -2822,7 +2822,7 @@ def _collect_kairos_manual_injections(mods):
28222822
template = template_info.get("template")
28232823
template_path = template_info.get("path")
28242824
if not template:
2825-
print(f"No template found for {day_of_week}. Please create a '{day_of_week}.yml' file in the 'user/Days' directory.")
2825+
print(f"No template found for {day_of_week}. Please create a '{day_of_week}.yml' file in the 'user/days' directory.")
28262826
return
28272827
canonical_path = get_day_template_path(day_of_week)
28282828
if template_info.get("score", 0) > 0 and os.path.normpath(template_path) != os.path.normpath(canonical_path):
@@ -3146,3 +3146,4 @@ def get_help_message():
31463146
"""
31473147

31483148

3149+

docs/changelog.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -644,14 +644,14 @@
644644

645645
### Day Templates / Place Status
646646
- Updated travel templates to explicitly require travel context:
647-
- `user/Days/travel_day_example.yml` -> `place: travel`, `status_requirements.place: [travel]`
648-
- `user/Days/travel_reset_day_example.yml` -> `place: travel`, `status_requirements.place: [travel]`
647+
- `user/days/travel_day_example.yml` -> `place: travel`, `status_requirements.place: [travel]`
648+
- `user/days/travel_reset_day_example.yml` -> `place: travel`, `status_requirements.place: [travel]`
649649
- Added normalized `place` coverage across `*_example.yml` day templates:
650-
- `user/Days/deep_work_day_kairos_example.yml` -> `at_work`
651-
- `user/Days/recovery_and_reset_day_example.yml` -> `at_home`
652-
- `user/Days/sick_day_example.yml` -> `at_home`
653-
- `user/Days/weekday_builder_example.yml` -> `at_school`
654-
- `user/Days/weekday_example.yml` -> `at_home`
650+
- `user/days/deep_work_day_kairos_example.yml` -> `at_work`
651+
- `user/days/recovery_and_reset_day_example.yml` -> `at_home`
652+
- `user/days/sick_day_example.yml` -> `at_home`
653+
- `user/days/weekday_builder_example.yml` -> `at_school`
654+
- `user/days/weekday_example.yml` -> `at_home`
655655
- Expanded `user/settings/place_settings.yml` to include additional place options and ranking updates (including `At School` and `Travel`).
656656

657657

@@ -663,3 +663,4 @@
663663

664664

665665

666+

modules/planner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def build_preview_for_date(target_date, *, save_path=None, show_warnings=True):
9494
template_info = select_template_for_day(day_of_week, settings["status_context"])
9595
template = template_info.get("template")
9696
if not template:
97-
print(f"No template found for {day_of_week}. Create 'user/Days/{day_of_week}.yml' first.")
97+
print(f"No template found for {day_of_week}. Create 'user/days/{day_of_week}.yml' first.")
9898
return None, None
9999
if template_info.get("score", 0) > 0:
100100
print(f"Status-aware pick: {os.path.basename(template_info['path'])} (score {template_info['score']:.2f}).")
@@ -126,3 +126,4 @@ def build_preview_for_date(target_date, *, save_path=None, show_warnings=True):
126126
return resolved_schedule, remaining_conflicts
127127

128128

129+

modules/scheduler/v1.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def get_day_template_path(day_of_week):
6868

6969
def list_day_template_paths(day_of_week):
7070
"""
71-
Returns ALL template candidates from user/Days/.
71+
Returns ALL template candidates from user/days/.
7272
Templates self-describe their eligibility via 'days' property.
7373
If no 'days' property, the template is eligible for any day.
7474
"""
@@ -86,7 +86,7 @@ def list_day_template_paths(day_of_week):
8686

8787
def list_all_day_templates():
8888
"""
89-
Returns all template files from user/Days/ without any filtering.
89+
Returns all template files from user/days/ without any filtering.
9090
"""
9191
days_dir = os.path.join(USER_DIR, "Days")
9292
if not os.path.isdir(days_dir):
@@ -995,3 +995,4 @@ def to_datetime(time_str):
995995
return schedule
996996

997997

998+
File renamed without changes.

0 commit comments

Comments
 (0)