Skip to content

Single-space writer + lowercase filenames#8

Merged
TroyHernandez merged 2 commits into
mainfrom
spacing-and-lowercase
Apr 27, 2026
Merged

Single-space writer + lowercase filenames#8
TroyHernandez merged 2 commits into
mainfrom
spacing-and-lowercase

Conversation

@TroyHernandez
Copy link
Copy Markdown
Contributor

Summary

Two cosmetic conventions Troy flagged from his real ToDo file:

  1. Writer spacing. .df_to_lines previously emitted [X] - text (two spaces). Now emits [X] - text for non-recurring and [X] -*text for recurring, matching the instantiate seed style and Troy's hand-edited convention. Parsers were already lenient on whitespace, so reads are unchanged.

  2. Lowercase filenames. New writes go to todo_yymmdd_<period>.txt instead of ToDo_yymmdd_<Period>.txt. Readers stay case-insensitive so legacy ToDo_*.txt repos keep working without a migration step. .resolve_period_paths() prefers the lowercase form when nothing exists yet, falls back to capitalized otherwise.

tasks(), roll_day(), run_monday(), sync_from_daily(), next_day(), fix_parents() all updated. Config defaults and the seed config in instantiate_todo() switched to the new convention. README updated.

Practical note: the first time fix_parents() or run_monday() runs on an existing repo it'll rewrite every line because the spacing changed. The diff is noisy but cosmetic.

Test plan

  • New test_lowercase_compat.R covers the read-capitalized / write-lowercase path explicitly across tasks(), roll_day(), and run_monday()
  • Existing tests updated to use the new conventions; one test_blocked regex tightened for the new -* recurring format
  • All 123 tests pass
  • Smoke test on Troy's real ~/todo/ repo: tasks() returns 296 rows from the existing capitalized files; fix_parents(preview = TRUE) reports the would-be rewrite
  • Version bumped to 0.1.7

Two cosmetic changes Troy flagged from his real ToDo file:

1. Writer spacing. .df_to_lines previously emitted "[X]  - text"
   (two spaces between bracket and dash). Now emits "[X] - text"
   for non-recurring and "[X] -*text" for recurring, matching the
   instantiate seed style. Parsers were already lenient on
   whitespace, so reads are unchanged.

2. Lowercase filenames. New writes go to todo_yymmdd_<period>.txt
   instead of ToDo_yymmdd_<Period>.txt. Readers stay case-
   insensitive so legacy ToDo_*.txt repos keep working without a
   migration step. .resolve_period_paths() prefers the lowercase
   form when nothing exists yet, falls back to capitalized
   otherwise. tasks(), roll_day(), run_monday(), sync_from_daily(),
   next_day(), fix_parents() all updated.

Practical note: the first time fix_parents() or run_monday() runs
on an existing repo it'll rewrite every line because the spacing
changed. The diff is noisy but cosmetic.

New test_lowercase_compat.R covers the read-capitalized /
write-lowercase path explicitly. Existing tests updated to use
the new conventions; one test_blocked regex tightened for the
new "-*" recurring format.

Bump version to 0.1.7.
Update folder layout, command examples, and preview output to
match the new lowercase convention. Add a note that pre-0.1.7
capitalized files keep working via case-insensitive readers.
@TroyHernandez TroyHernandez merged commit 78e16ee into main Apr 27, 2026
0 of 4 checks passed
@TroyHernandez TroyHernandez deleted the spacing-and-lowercase branch April 27, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant