From 0f36dee9ed3225662e551fce165e30867b246656 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Fri, 17 May 2024 14:25:52 -0500 Subject: updates --- bin/main.ml | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) (limited to 'bin/main.ml') diff --git a/bin/main.ml b/bin/main.ml index 79addc1..385f273 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -86,13 +86,23 @@ let headlines_cmd = ; `Pre "export STITCH_DIRECTORY=/home/bob/notes" ; `P "Stitch does not specify anything on how to capture your notes, but you can add \ - the following in your profile to have a basic note capture command" + the following in your profile to have a basic note capturing system." ; `Pre "function capture {\n\ - \ NEW_NOTE=\"\\$STITCH_DIRECTORY/\\$(date +'%y-%m-%d.%H:%M.%S').org\"\n\ - \ echo '* ' >> \\$NEW_NOTE \n\ - \ \\$EDITOR \"\\$NEW_NOTE\" +1:3 \"\n\ - }\n" + \ JRNL=\"\\$STITCH_DIRECTORY/\\$(date +'%y-%m-%d.%H:%M.%S').org\"\n\ + \ echo '* ' > /tmp/capture \n\ + \ $EDITOR /tmp/capture +1\n\ + \ if grep -q '^\\*\\s*\\$' /tmp/capture \n\ + \ then \n\ + \ echo \"Empty capture; ignoring\"\n\ + \ else \n\ + \ echo \"Storing capture in \\$JRNL\"\n\ + \ cat /tmp/capture > \\$JRNL\n\ + \ fi\n\ + }" + ; `P + "Now you can run capture in your terminal and it will prompt you to write your \ + note and store it in your notes with a timestamp." ; `P "With that, you can begin to capture your notes and they will be displayed in \ reverse chronological order in stitch. You can add tags, for example :journal: \ @@ -110,9 +120,17 @@ let headlines_cmd = capture TODO items" ; `Pre "function todo {\n\ - \ NEW_NOTE=\"\\$STITCH_DIRECTORY/\\$(date +'%y-%m-%d.%H:%M.%S').org\"\n\ - \ echo '* TODO ' >> \\$NEW_NOTE \n\ - \ \\$EDITOR \"\\$NEW_NOTE\" +1 \n\ + \ TODO_BASE='* TODO '\n\ + \ JRNL=\"\\$STITCH_DIRECTORY/\\$(date +'%y-%m-%d.%H:%M.%S').org\"\n\ + \ echo '* TODO ' > /tmp/capture\n\ + \ \\$EDITOR /tmp/capture +1\"\n\ + \ if grep -q '^\\* TODO\\s*\\$' /tmp/capture \n\ + \ then \n\ + \ echo \"Empty capture\"\n\ + \ else \n\ + \ echo \"Storing capture in \\$JRNL\"\n\ + \ cat /tmp/capture > \\$JRNL\n\ + \ fi\n\ }" ; `P "After that, you can capture a few TODO items, and you will be able to view them \ @@ -129,7 +147,7 @@ let headlines_cmd = Cmd.info ~envs "stitch" - ~version:"0.1 ALPHA" + ~version:"0.0.1 ALPHA" ~doc ~man:(List.concat [ bugs; author; description; example_set_up_basic; credit ]) in -- cgit v1.2.3