This tool is going into my workflow right away. I take notes in markdown (with latex) for all my classes but they're disorganized and searching through them for a specific topic is annoying. This solves so many problems haha.
I noticed there's a way to tag bookmarks, is there a similar functionality for tagging notes?
Cool, your use case is exactly one I hope it works for. I find that the notebooks are a really good way to organize by topic or project, and should work really well for classes, too. You can even archive a project or class notebook when it ends and still easily access, revive, or drop into the content.
Tagging in `nb` is really simple and is just a matter of putting hashtags in your documents and then searching for those hashtags using `nb search` / `nb q`. `nb <url>` makes tagging a little more convenient when bookmarking by providing a `-t <tag1>,<tag2>...` / `--tags <tag1>,<tag2>...` option and saving them in a dedicated `## Tags` section in `.bookmark.md` documents.
> Everyone should use the language of their choice.
We live in a fruitful age for programming. There are many viable languages. Some have notation that is more difficult, perhaps, but humans are good at notation and there is no such thing as "easy" programming.
That said, any language that offers portability and stability that can be measured in _decades_ has a distinct advantage.
That particular function, `nb show`, is a big `if` statement checking the file type and environment for available tools. I'm more than happy for suggestions and / or pull requests for optimizing that.
Note that Bash is a weird language that doesn't provide language features found in normal languages, and this targets old Bash which doesn't even have associative arrays, so there are things that might look "wrong", but aren't necessarily in this context. That's a big part of what makes it interesting to code in.
Why did you decide to go with Bash instead of another scripting language like Python or Ruby? Portability? "Just because"?
I am not bashing Bash ;) but genuinously interested in the motivations as a programmer. You have stated that the Bash shortcomings are "interesting", so I guess it boils down to some kind of "who cares, let's do it with Bash".
I tried nb yesterday and damn if it had a native capture tool for macOS and iOS this would be the perfect Evernote replacement for me.
Portability, philosophy, style. I find that designing within constraints can lead to interesting solutions, and this project has focused on embracing and leveraging the command line interface itself.
There have been a few of these note taking systems that have passed through HN lately. I use org-mode for some notes and sometimes open-junk-file (that I discovered in in Spacemacs). What I miss is a tool that will help me keep some notes encrypted at rest but will allow me to search filenames _and_ content. nb seems to support searching, and encryption, but not the two in combination.
If you only care about encryption at rest, maybe just do filesystem encryption? Whether that's encfs or luks or ZFS encryption or whatever. (Caveat: some of these have very specific security properties that you may find inadequate (encfs is poor against an attacker who can see multiple versions of a file over time, IIRC), or efficiency issues with syncing (you're not gonna git commit a ZFS dataset))
Emacs can use GPG to encrypt files at rest pretty transparently. Just save a files with the extension `.org.gpg` and it should get encrypted automatically with Spacemacs (I personally use https://github.com/hlissner/doom-emacs/).
Note that adding an encrypted file to your agenda, .e.g.
`(setq org-agenda-files '("~/org/secret-diary.org.gpg"))` will let Emacs decrypt that file upon calling "org-agenda". Something similar should be possible for search if it doesn't work out of the box
I use this to encrypt files as well and I think Emacs handles this very well for individual files. It is however the notes management tool that doesn't support transparently search through multiple files.
I imagine what is needed is using gpg-agent to handle passwordless decryption of the files at rest.
Ah yes, I am using gpg-agent with my Yubikey - decryption would be tiresome without.
Well, org-agenda at least seems to support it through Emacs lower-level functions. Search is a bit more complicated, but should be well possible through hooks?
This looks awesome, and touches on a bunch of things that have been on my to-do list of "find a thing that can do X", even if that thing didn't let me stay in the command line, which this obviously does.
Curious to see what people come here to say does all of this better, because if it exists in a nice package like this, I haven't seen it yet.
Very cool. `pass` is awesome and I didn't realize it had the `pass edit` feature. I have written scripts that use the 1Password and Keychain command line tools, and I definitely want `nb` to use all three of these, maybe via a plugin.
It looks incredible, rich in features and the git syncing capability is neat.
My only wish would be to be able to import my bookmarks somehow. A few months back wrote my one CLI bookmark manager in Elixir (https://github.com/tefter/cli). It's impressive how much nb achieves yet being written in Bash.
Looks similar to jrnl.sh which I have been using for years. Combine with iTerm2 with it's configurable "drop down" terminal with a global shortcut and I can save anything from one word notes to full meeting minutes using the same flow.
Wow, looks great. Using git to sync is super convenient -- there's so much infrastructure available to support git so it's basically no effort to start syncing with github etc.
I use dstask to manage my todo list which also uses git, it's excellent.
Thank you for dstask. I also have to take a deeper look into this submission.
Are you aware of a currated list of git-synched solutions to note taking and todo management? I used to use emacs org which was very good in the beginning yet somehow started to overgrow to the point where I found myself more in organizing than get stuff done.
See also Logseq [1] (a roam alternative) and Cerveau/Neuron [2] (a zettelkasten implemented in Haskell) for alternative git-based note management. See also [3] for a Lobsters discussion from a few days ago.
Yeah, it's a little unusual. No big story. I just did an early version and then didn't update it for a long time, then got hooked on working on it again over the past few months.
I don't know what to say about the number of commits. My working style on this project has involved a lot of smaller commits and little feature iterations, maybe because of the single big script and single big README, or maybe something about the feedback loop of this style of development.
That's some impressive documentation - did you write (and update) it all by hand, or is it semi-automatically updated from the CLI help page?
Shameless plug for people who are just interested in the bookmarks part: I've created Static Marks [1], an open-source tool which turns plain-text YAML bookmark collections into a shareable HTML web app.
You can check out https://github.com/Uzay-G/archivy/. It's quite similar except uses a web interface. We're building it out and are working on adding a login system so people can host instances publicly with multiple users.
I prefer using Vim (or Emacs), git and grep for things like this. They're everywhere and have stood the test of time. Are there any particular advantages I'm missing here? Either way thanks for sharing; it's helpful to see how other people do notes.
FWIW, the core idea in `nb` is that it grew out of exactly that toolset and philosophy and develops it into a single, streamlined interface with a bunch of conveniences and features. It embraces that model and is intended to support it.
This looks fantastic, just from a quick download and playing around for 5 minutes I know this is going to come in handy. I don't always have a note taker open, but I almost always have a terminal open.
Did Gina had some "notes.sh" script? I can only remember her "todo.txt" for todos. This can perfectly replace it, yes, and it is very similar in spirit.
I noticed there's a way to tag bookmarks, is there a similar functionality for tagging notes?