commit 4159537fc9ae6eeef339fff661e025b6b05a467e
parent 7dd8136475a838572556070a2234dd647816c33d
Author: brookjeynes <me@brookjeynes.dev>
Date: Wed, 10 Jun 2026 10:50:23 +0000
feat: generate file name based off title
Diffstat:
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/main.c b/main.c
@@ -74,7 +74,19 @@ int main(int argc, char *argv[]) {
printf("(%c)\n", cli_args.priority);
}
+ int title_len = strlen(cli_args.title);
+ char title_to_file[title_len + 5];
+ for (int idx = 0; idx < title_len; idx++) {
+ if (cli_args.title[idx] == ' ') {
+ title_to_file[idx] = '_';
+ } else {
+ title_to_file[idx] = cli_args.title[idx];
+ }
+ }
+ strcpy(title_to_file + title_len, ".txt");
+
printf("%s\n", cli_args.title);
+ printf("%s\n", title_to_file);
if (cli_args.properties != NULL) {
printf("%s\n", cli_args.properties);
diff --git a/manifesto.txt b/manifesto.txt
@@ -64,9 +64,9 @@ A task file might look like the following:
$ tree tasks
tasks
-├── 0001-checkout-race-condition.txt
+├── checkout-race-condition.txt
└── done
- └── 0000-checkout-ui-design.txt
+ └── checkout-ui-design.txt
$ cat 0001-checkout-race-condition.txt
(A) checkout race condition @bug +checkout
@@ -75,16 +75,16 @@ Add a reservation hold on the orders table
# Query all not-done items tagged with '+checkout'
$ grep --exclude-dir=done -r '+checkout' tasks
-tasks/0001-checkout-race-condition.txt:(A) Checkout race condition @bug +checkout
+tasks/checkout-race-condition.txt:(A) Checkout race condition @bug +checkout
# Query all not-done items tagged as '@bug' with a priority of '(A)'
$ grep --exclude-dir=done -r '(A).*@bug' tasks
-tasks/0001-checkout-race-condition.txt:(A) Checkout race condition @bug +checkout
+tasks/checkout-race-condition.txt:(A) Checkout race condition @bug +checkout
# Query all items tagged as '@bug' or '@ui'
$ grep -r '@ui\|@bug' tasks
-tasks/0001-checkout-race-condition.txt:(A) Checkout race condition @bug +checkout
-tasks/done/0000-checkout-ui-design.txt:update ui to match new styleguide @ui +checkout
+tasks/checkout-race-condition.txt:(A) Checkout race condition @bug +checkout
+tasks/done/checkout-ui-design.txt:update ui to match new styleguide @ui +checkout
There are three formatting rules for current todo's.