💻 lawa
A flat-file journaling script written in Python. You can prepend words with a +
to mark them as "positive", a -
to mark them as "negative", and a ~
to mark them as tags.
When viewing a post, it will display the key words in green, red, or blue (+,-,~), and show a count of how positive or negative a post was.
The intent is to journal, but with statistics on how you were feeling that day. The goal isn't to have only positive posts, but instead to assess your mental state over time. It's up to you to determine which words are positive or negative. Sometimes the same word could even be one or the other, depending on the context. It's all about how you feel.
Source code: https://github.com/0xdstn/lawa
Etymology
The name lawa comes from the language Toki Pona. It means "head" and felt appropriate since you are documenting your state of mind.
Data
All data is stored in a single ~/.lawa
file. Each day is prepended to the file and starts with the date. Line breaks are represented with a /
.
Timezone
There is a hard coded timezone of America/Los_Angeles
in the script. You can comment it out to use your system timezone, or specify your own. Just modify the timezone line in the lawa.py
file.
Usage
You can use the following commands (example: lawa.py add
):
help
- Displays the help screenabout
- Displays information about this programall
- Display all postslist
- Display a list of all poststoday
- Display today's postlast
- Display the most recent postview (YYYY-MM-DD)
- Display the specified posttagged (+,-,~)(tag)
- Display all posts with the specified tagadd
- Create or update today's postedit (YYYY-MM-DD)
- Edit the specified postdelete (YYYY-MM-DD)
- Delete the specified post
Release notes
v1.0.2
Added editing of today when edit with no date is providedv1.0.1
Added handling for no posts, added .lawa file creation if missingv1.0.0
Initial release
👋 Hey! Thanks for reading! If you have any comments or questions about this post, or anything else, I'd love to chat! You can find the best way to contact me on my hello page or send me an email.