Single-space writer + lowercase filenames#8
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two cosmetic conventions Troy flagged from his real ToDo file:
Writer spacing.
.df_to_linespreviously emitted[X] - text(two spaces). Now emits[X] - textfor non-recurring and[X] -*textfor recurring, matching theinstantiateseed style and Troy's hand-edited convention. Parsers were already lenient on whitespace, so reads are unchanged.Lowercase filenames. New writes go to
todo_yymmdd_<period>.txtinstead ofToDo_yymmdd_<Period>.txt. Readers stay case-insensitive so legacyToDo_*.txtrepos 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 ininstantiate_todo()switched to the new convention. README updated.Practical note: the first time
fix_parents()orrun_monday()runs on an existing repo it'll rewrite every line because the spacing changed. The diff is noisy but cosmetic.Test plan
test_lowercase_compat.Rcovers the read-capitalized / write-lowercase path explicitly acrosstasks(),roll_day(), andrun_monday()test_blockedregex tightened for the new-*recurring format~/todo/repo:tasks()returns 296 rows from the existing capitalized files;fix_parents(preview = TRUE)reports the would-be rewrite