another pass on cleanup

This commit is contained in:
trav 2022-12-22 10:29:39 -08:00
parent f8a936cffe
commit 1bd57833d4

View File

@ -2,7 +2,7 @@
<img src="https://git.laboratoryb.org/trav/calendarender/raw/branch/master/calendar.jpg" width=556>
These are 2 scripts I use for calendaring in plantext files. The calendar consists of 2 files:
These are 2 scripts I use for calendaring in plain text files. The calendar consists of 2 files:
- `calendar_archive.txt` contains all the days before current day.
- `calendar.txt` shows the current day at the top and continues down as far as the number of months that have been rendered. My calendar contains events and tasks for the current day. A typical day might look like:
@ -18,17 +18,17 @@ lunch with james
reply to jim
reply to susan
laundry
groceries
locate receipts
```
Events are at the top with a space inbetween them and the tasks for the day are below without spaces. As tasks and events are completed I move them to just below the day, sometimes with little notes. At the end of the day any uncompleted tasks will either get copied to the next day or migrated into my kanban task list in Obsidian. Then after midnight or next morning I run `calendarchive.sh` and start again for the next day.
Events are at the top with a space inbetween them and the tasks for the day are below without spaces. As tasks and events are completed I move them to just below the day title, sometimes with little notes. At the end of the day any uncompleted tasks will either get copied to the next day or migrated into my kanban task list in Obsidian. Then after midnight or next morning I run `calendarchive.sh` and start again for the next day.
I've been calendaring this way since fall of 2019.
I sync the notes between computers with SyncThing and edit them via Notational Velocity, TextEdit or Gedit, depending on what computer I'm on. In the future I think I might merge this plaintext notes folder with my markdown project notes in Obsidian.
I sync the notes between computers with SyncThing and edit them via Notational Velocity, TextEdit or Gedit, depending on what computer I'm on. In the future I think I might merge this plain text notes folder with my markdown project notes in Obsidian.
## the scripts
@ -36,7 +36,7 @@ I sync the notes between computers with SyncThing and edit them via Notational V
calendarender takes one argument and that's the number of months in the future you'd like to render. So say it's currently some day in November and I want to add the days in January to my calendar.txt, I would run `calendarender 2`. It then prints to the terminal as well as to the file.
Each day is rendered with `moon phase, day of the week, month, and day of the month`. Moon phases that are printed are: new, full, crescents and halfs. On any day that isn't one of those phases a sun is printed. If it's waxing an up-arrow will be printed, waning, down-arrow. It's not the _most_ accurate moon-phase algorithm but close enough for me :)
Each day is rendered with a title containing the moon phase, day of the week, month, and day of the month. Moon phases that are printed are: new, full, crescents and halfs. On any day that isn't one of those phases a sun is printed. If it's waxing an up-arrow will be printed, waning, down-arrow. It's not the _most_ accurate moon-phase algorithm but close enough for me :)
### calendarchive.sh
@ -46,9 +46,11 @@ if you run calendarchive without any arguments it will remove all days from cale
## installation + configuration
1. clone or download the repo.
2. open calendarender.sh in your texteditor of choice and find the line:
### calendarender.sh
Open calendarender.sh in your texteditor of choice and find the line:
`calendarFile="/Users/YOU/WHEREYOURNOTESARE/calendar.txt"`
@ -76,7 +78,7 @@ _copy this to another day and change `Sun`, `sunday`, and `sunday` to another da
_this one is a liiiitle more complicated but you can copy and paste this one to create events on the last monday/tuesday/etc of the month. Just change "Sun" to a different day of the week_
3. configure calendarchive
### calendarchive.sh
Within calendarchive.sh, find the lines:
@ -86,9 +88,9 @@ Within calendarchive.sh, find the lines:
and modify them to point to the absolute path of your calendar files. Make sure both those exist at least as blank files.
4. you might need to `chmod +x` each of the scripts to make sure they're executable.
### that's basically it
5. You can now just run them with `sh calendarchive.sh` or `sh calendarender.sh`. I've added the following lines to `.bashrc` so that I can just run `arch` when I'm ready for the next day:
You might need to `chmod +x` each of the scripts to make sure they're executable. You can now just run them with `sh calendarchive.sh` or `sh calendarender.sh`. I've added the following lines to `.bashrc` so that I can just run `arch` when I'm ready for the next day:
```
function arch() {