Commandline Interface

Skip to first unread message

Tavis Ormandy

Feb 20, 2023, 6:29:16 PM2/20/23
Hello, I have a bunch of notes I've been keeping in notecase over the
years, but there's no easy way to access them from the commandline.

So, I wrote a quick script to pull them anyone else interested?

It's just a shell script, it kinda grew organically as I needed it.

It looks like this:

$ ncpro help
usage: ncpro [-d database] CMD [PARAMS...]
CMD can be one of:
list - list child notes
print - print note contents
show - alias for print
edit - open editor and change note
find - find notes with matching string
markdown - set all notes without syntax to markdown

(where database is a .ncdb file)

$ ncpro list
• /Linux - 33
• /Windows - 19

And you can drill down into deeper levels:

$ ncpro list /Linux
• /Linux/apt
• /Linux/awk

And then print the article you want:

$ ncpro print /Linux/awk

Print lines between a pattern

awk '/start/,/end/'

Sort lines by length

awk '{ print length, $0 }' | sort -g


You can even edit a note with $EDITOR:

$ ncpro edit /Linux/awk

Will open it in vim.

I haven't managed to break a note yet, but it's pretty hacky, and I'm sure
Miroslav is horrified :)


_o) $ lynx
/\\ _o) _o) $ finger
_\_V _( ) _( ) @taviso

Miroslav Rajcic

Feb 21, 2023, 7:08:19 AM2/21/23
Hi Tavis,

thanks for sharing this, I'm sure it will help someone who likes using the program from command line interface, just like you.
I've quickly browsed the code, bash code looks clean, nice 🙂


From: <> on behalf of Tavis Ormandy <>
Sent: Tuesday, February 21, 2023 12:29 AM
To: <>
Subject: Commandline Interface
You received this message because you are subscribed to the Google Groups "Notecase Pro" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages