DEV Community

loading...
Cover image for ๐Ÿ› ๏ธ Tools for working with plain text files - My Plain Text Journey Part II

๐Ÿ› ๏ธ Tools for working with plain text files - My Plain Text Journey Part II

Ryan Collins
Just a geek developing through life.
Originally published at gozgeek.com on ใƒป4 min read

This is an ongoing series:


To work with my files in plain text, I use the following tools. Iโ€™m not covering the sync part yet, but thatโ€™s coming. These are the tools I use at least once a day to manage my journal, notes, and tasks.

Espanso - text expansion

Espanso is a cross-platform text expansion tool which I use constantly. At the start of my journey, I was modifying or adding to my text editor ways to type things automatically, starting with journal entries. My journal is one text file per year, and each entry starts with a date & timestamp that looks like YYYY-MM-DD hh:mm. This was easy enough to add to Vim and VS Code, but I wanted to play with more tools and didnโ€™t want journal entries to hold me back. Thatโ€™s when I found Espanso. Now I type ;je; in to any app and I get a journal entry date.

Journal entry dates are probably my most used expansion, but I also have ;d; which expands to the current date (YYYY-MM-DD). There are several more that I use.

Keeping all of my expansions in a Git repo allows me to use them on any machine I have Espanso installed.

bash scripts

Bash scripts are used to automate certain tasks as they pertain to my journal and my to do list. I have a cron job that runs at midnight. It finds the to dos that I completed the previous day (the script runs at midnight, so it is already on the next day) and adds them to my journal. The script then adds a # header for the current day. My journal is in one file for the year, so the # header for each day helps separate out the different posts.

Finally, the script goes through my todo.txt file and finds any tasks that are due that day. These tasks are then set with a priority of (A) and all tasks with a priority are sent to me through Telegram.

I also have a new note (nn)script that I talked about in my previous article. The nn script automates the creation of notes.

Telegram

Telegram is my favorite instant messenger, and the ability to write bots is but one small feature that I canโ€™t live without. I have two bots. One I use to send me notifications for tasks. The other is a bot that Iโ€™ve been writing. Unfortunately, itโ€™s not polished enough for release, but Iโ€™m hoping to do that soon.

To send notifications, I use telegram-notify. Itโ€™s a bash script that I run to send notifications.

Brantley is my WIP Telegram bot for adding tasks, journal entries, and saving quotes to my plain text files. It runs on a virtual private server (VPS). To add a journal entry, I send a message to it. When I need to add a task, I prefix the task with a hyphen so the bot knows itโ€™s a task. The final feature is saving quotes. I keep a quotes.md file in my Notes repository. If a send a message to Brantley that starts with a โ€œ, Brantley will add the message to my quotes file.

Using an instant messenger for management was one of my better ideas. Since I can run Telegram on anything, I can easily add items to my files.

Vim

My editor of choice is Vim, along with the following plugins:

I do a lot of my note taking and writing at the command line. Why? Vim is an exceptional writing tool and I can use it from any device by connecting to my VPS.

Conclusion

Since my files are plain text, I can use other editors if Vim isnโ€™t available. This is usually VS Code. But, the nice thing is I can use basically any editor I want.

Discussion (0)