Looks like a nice tool, but it seems to be built around a very specific workflow that you've found works for you.
Personally I have been managing most of my plaintext notes with the minimal tools required to do so: a text editor and a file system. For technical notes about software I add git into the mix[1], mostly as a means of synchronization between machines.
Thanks for the feedback! textnote did start out as a tool for a workflow I found myself using, but at its core is simply opening a templated dated file every day to take plain text notes, which I posted here because I hope it is sufficiently general for others to find use. I also am continuing to work to make it configurable to suit others as well. I'd love to take any suggestions for what you might find useful.
Thanks for sharing your post - I really like the idea of using git to sync/track notes and believe textnote can fit in with that workflow quite well. Appreciate your feedback!
I wanted to share a tool I built out of a desire to easily create and organize plain-text notes on the command line. textnote is a CLI for quickly creating, opening and managing daily plain-text notes. I built it to encourage myself to practice daily note taking by making it dead simple to open a prebuilt, templated, dated note file in Vim. I thought it would be good to share here with the HN community because it is intentionally lightweight and meant to be paired with other commandline tools (grep, fzf, etc) for additional functionality.
The key feature built into textnote that I couldn't find elsewhere is archiving. Running its archive command will consolidate notes into monthly archive summary files and (optionally) remove the original daily files to declutter and turn your notes organized records over time.
I hope you might find it useful and I'd love to take any feedback or suggestions that might come to mind!
I have released v1.1.0 with support for $EDITOR. While textnote will work with any editor, the ability to open on a specific line is currently supported for vi/vim, emacs, neovim, and nano. Thanks again for your feedback, which lead to this improvement!
Thanks for the feedback! I agree with you in general and considered supporting $EDITOR. The problem is that I wanted to support always opening on a specific line, because it quickly became annoying starting at the top of the file and always scrolling/jumping.
The options that I see for using $EDITOR are: (1) simply ignore the line option for non-vim editors, (2) add implementation for specific editors, each with their own "jump to line" argument if it exists, or (3) add an additional command line argument that passes args/flags on to the editor. Option (3) seems best to me but I do worry about the number of supported flags - it is quite a lot already! More seriously, this option could be a vector for malicious code execution.
Thanks again, really appreciate the feedback! I'd love to hear your thoughts.
You could support a variable $TEXTNOTE_EDITOR and it contains a string with placeholders for line number and file name.
Or you always invoke the editor as "$EDITOR +$LINE $FILE" and if someone wants to use an editor that uses different command line arguments, they have to write a wrapper shell script to rewrite it.
vim, nano, and emacs support this syntax. micro uses "micro ${FILE}:${LINE}", and subl (Mac command line tool for Sublime Text) uses it as well.
That looks neat, cheers dankco! I think there is a lot of room for these lightweight text-first systems.
I use a simple homebrewed system for my notes too, https://github.com/d5ve/noop which is just a search/edit loop, where you look for files and add/edit them.
https://github.com/d5ve/noop started out in golang too, but I ended up shelling out for so much stuff anyway, that I rewrote it in bash.
Thanks, d5ve! I will check out your REPL approach, that sounds interesting.
Fortunately, for textnote I only have to shell out once to open the file. I will try hard to keep it that way, otherwise I agree with you and others that bash might be the more appropriate tool. Then again, there is functionality included that would be much more difficult to accomplish in bash (templating, archiving, configuration).
Pure bash is indeed a good choice for this kind of application. I developed something similar, with some more functionality (and definitely more LoC :-) )
> ... and archive for consolidating notes into monthly archive files.
Why not just perform the consolidation automatically (the first time textnote is executed after the first of the month), allowing you to do away with the subcommand?
Or perhaps make automatic consolidation configurable / optional (along with any desired default options)?
OP here, thanks for your suggestion! I considered doing exactly that: automatic archiving. The problem I see is that I want archiving to also "clean up" (that is, delete) the daily notes that it has consolidated and I worry about performing destructive actions such as deletes on an automated basis. For this reason, I chose to leave it in the users hands. I also worried about the possibility (albeit unlikely) for a race condition where a file you are manually opening is deleted out from under you. I'd love to hear any thoughts you might have though in light of these concerns. I'm definitely open to adapting the tool. Appreciate your feedback!
I was suggesting that as an alternative. It was right there as I ran this everyday. I was lazy to spell out other functionalities provided by `ls`, `cp`, `mv`, `ln`, ` grep`, ...
As someone who has been creating plain text notes since 2001 I found in practice daily notes tend to be a bit too scattered. Usually if you're working on something and you want to reference your notes the next day it's a nicer experience to have that in the same notes file as today instead of yesterday. Over the decades I've settled on a YYYY-MM.txt file, or 1 file per month.
Last year I open sourced https://github.com/nickjj/notes which is similar'ish to this tool. It supports opening your notes in any editor (using $EDITOR), launches this month's notes with `notes` but also lets you create notes with `notes hey just writing a note` or sending notes in from stdin with `echo "cool" | notes` (useful for pasting a note).
Also, if you really wanted daily notes you could easily change the date format to include -%d. After doing notes by hand for so long I initially wrote the script with daily notes thinking it would be better but very quickly reverted back to monthly notes.
The whole thing is a 25 line bash script so it's super easy to edit if you don't like what it does by default.
> Usually if you're working on something and you want to reference your notes the next day it's a nicer experience to have that in the same notes file as today instead of yesterday. Over the decades I've settled on a YYYY-MM.txt file, or 1 file per month.
As someone who's been practicing plain text notes only few years less than you, I'm contemplating going in the reverse direction now. My default for quite a while was a YYYY-MM.org file. But now that I use org-roam[0] to organize my personal wiki, and link to the entries from my daily notes, I've found the month-files are becoming "super nodes" in the resulting graph. In any given month, I can be thinking about dozens of unrelated things - and now they suddenly become connected by virtue of being considered in the same month.
It's a spurious connection that I currently exclude when visualizing/exploring the graph of my notes, but completely rejecting the connection between "transient" daily notes and permanent documents doesn't feel right either. The options I have are to either a) patch org-roam to work with headline-level granularity, instead of file-level, or b) just start using daily (YYYY-MM-DD.org) files. The latter is simpler.
So in general, my experience agrees with yours here wrt. granularity, but the extra constraint of using graph building and exploration tools on top of the notes makes daily notes much more appealing.
Ah, I haven't gone as far as graphing things out or linking them. I sort of treat my monthly files like tax records. Once the month is over it's a sealed document unless I go back to fix a typo or dead link when reviewing them later on.
The super-node'ish factor of the file ends up being kind of cool from a human review perspective because you can glance through the month and get an idea of what you did during that time frame overall.
I know you're big into Emacs (I've seen you comment about it a bit in the past), but have you looked into https://obsidian.md/ for managing your notes in the style you've described? It seems like an app designed specifically for linking and creating graph views of your notes.
I think any new plain-text based tool needs a comprehensive section (and support the workflow) on how to synchronize across devices using git or syncthing.
I tried noteKit and zettlr and so many more and I am willing to give this one a try, but I am always hesitant to reverse-engineer the file-structure and create autocommit/push/pull/etc. scripts to handle all the syncing across my work devices.
As a proof of concept I once created a "personal log" (where you could just put a few lines of what you're currently doing and why and for whome) and it was basically a git-wrapper where empty commits were created and all the data was in the commit message. A simple sync-command then pull-rebased and pushed everything.
Of course, the append-only nature of this model made synchronization incredibly easy.
I just wish that distributed workflow was more of a consideration for authors of personal organization tooling.
Edit: of course, also plain-text accounting, for example. The plain-text nature brings a lot of possibilities that are rarely used to the fullest.
I see this has rolled off the front page already but I just wanted to chime in and say this is pretty neat. I recently cobbled together almost the exact same thing in Python, the main differences in mine are:
* the notes are filed into dirs by year and then month, so I don't need an archive command
* the "todo" section serves as my backlog and is automatically carried over from one day to the next
* I have a command to take all of last week's "done" items and email them to my manager
The source code for mine is not public because it was lashed together out of duct tape and optimism.
Thanks, appreciate the kind words! Sounds like your take on this workflow has a couple of cool features, especially the year-based archives and the weekly "done" list with email.
I considered archiving at the year level, but realized that the month level of granularity is likely what I actually want because a yearly file would be quite large. I'd be curious to hear your thoughts - have you found the yearly archive file to be cumbersome?
I also love the idea of the weekly done list. My take for textnote is rather than build that functionality into the CLI, I prefer to augment it with scripts that take advantage of common commandline tooling and the plain text files. I might give your "email done list to my boss at the end of the week" workflow a try as a script on textnote files. I'll let you know how it works out.
Not sticky notes, but plain old notebooks are what works best for me. About 10 years ago, moleskines + GTD [0] or Bullet Journal [1] were all the rage, but I only started appreciating such a system in grad school. Personally, I use a very informal system, somewhat influenced by Bullet Journal:
* Write down almost everything could be relevant to your work/research
* Use spacing to separate notes and use dates as headers. (I find dates to be better than page numbers for referencing, but your mileage may vary)
* If a note is a "task", put an empty checkbox next to it. Tick the checkbox when the task is done.
* When empty checkboxes are too many and/or scattered across the journal, strike them out and rewrite them, under today's date (this is known as a "migration" in BulletJournal-speak).
Yeah, physical paper, to my endless annoyance, still wins in some cases. I suspect it's because not being on the screen isolates it against context switches.
Personally I have been managing most of my plaintext notes with the minimal tools required to do so: a text editor and a file system. For technical notes about software I add git into the mix[1], mostly as a means of synchronization between machines.
[1]: https://m-chrzan.xyz/blog/cheatsheets.html