
Jrnl – A simple command line journal application - kul_
http://maebert.github.io/jrnl/index.html
======
akerl_
"military-grade AES encryption"

Can we please, as an industry, agree to stop using bogus terminology like
this?

"Even the NSA won't be able to read your dirty secrets"

And can we stop using ~"Our encryption beats the NSA" as a selling point,
given that:

1\. It doesn't take into consideration the various side-channel attacks the
NSA would actually use

2\. It's unlikely to be true even discounting side-channel attacks

3\. It's a scare tactic at best, akin selling boats that are rated "kraken-
proof".

~~~
gioele
In addition,

«GPG for data at rest. TLS for data in motion. … If you're typing the letters
A-E-S into your code, you're doing it wrong.» — Thomas Ptacek

[https://web.archive.org/web/20090911032333/http://chargen.ma...](https://web.archive.org/web/20090911032333/http://chargen.matasano.com/chargen/2009/7/22/if-
youre-typing-the-letters-a-e-s-into-your-code-youre-doing.html)

~~~
rimantas
Wasn't that more of "don't implement crypto yourself" than "don't use AES"
though?

~~~
akerl_
Indeed. Which carries through to this: If you're telling your users that you
use {lower_level_crypto}, either you really mean "we're using GPG", and you
should say that, or you rolled your own and you're violating the
aforementioned suggestion.

------
Monkeyget
I keep a coding journal of all those unsettled questions and thoughts that pop
in my mind. The questions I ask myself, the things I could improve,... It
turns out to be highly valuable in my projects and I recommend anyone to try
it.

I started a comment but it became gargantuan so I turned it into a blog post :
[http://tburette.github.io/blog/2014/06/25/the-power-of-
keepi...](http://tburette.github.io/blog/2014/06/25/the-power-of-keeping-a-
coding-journal/)

------
chrisfarms
If you are relying on that encryption, just remember to clear your bash
history :)

~~~
mentat

      def make_key(self, password):
            """Creates an encryption key from the default password or prompts for a new password."""
            self.key = hashlib.sha256(password.encode("utf-8")).digest()
    

Crack unsalted sha256 of ascii space NSA...

[https://docs.python.org/2/library/hashlib.html#key-
derivatio...](https://docs.python.org/2/library/hashlib.html#key-derivation-
function) (at least)

~~~
gcr
No salt?

------
nodivbyzero
Emacs Org mode is way to go!!! [http://orgmode.org/](http://orgmode.org/)

~~~
melipone
I love orgmode mysef. I was going to ask to make an export to orgmode format

------
padraigk
Nice util. Just a suggestion for the encryption: You should consider using a
password-based key derivation function (PBKDF) rather than just hashing the
key once with SHA256. This could help deter brute-force attacks particularly
if the chosen hashing function is computationally intensive; e.g. scrypt

~~~
maebert
You're absolutely right, and honestly I have no idea why I used SHA256, I
should know better. Will fix.

------
yoanizer
I've been using vim and text files. If you want to create a journal entry for
today: $ vim $(date +%a_%d_%m_%Y.txt) type your text and you are set.

If you want to search/sort/filter, etc your journal files, Unix has already
all the tools you want. (grep, find, less, cat, sed, etc).

Don't sweat the small stuff.

------
tylerneylon
I'm a big fan of self-analytics. I also like small-but-useful command-line
tools of this nature. This is pleasantly documented and purpose-driven.

If you're looking for something more focused on short daily summaries of what
you've done, I wrote a similar tool called wj:

[http://tylerneylon.com/a/wj/](http://tylerneylon.com/a/wj/)

It's more about organization and presentation than privacy. For example, it
can generate a tex file that converts your entries into a nicely formatted pdf
file.

I also like the automated self-analytics Stephen Wolfram uses:

[http://blog.stephenwolfram.com/2012/03/the-personal-
analytic...](http://blog.stephenwolfram.com/2012/03/the-personal-analytics-of-
my-life/)

------
zrail
I've been tracking various git actions (commits and branch creates and
checkouts) in a file via git hooks for the past year or so and it's been super
valuable to go back and look at, especially to remind myself what I was doing
yesterday for standup meetings.

This is far and away a better solution, since I can have `jrnl` auto-tag those
things and filter them in/out when I want to look at regular journal entries.

~~~
phlyingpenguin
I've seen this alias floating around git recipes. It doesn't do anything for
many of your actions, but I've found it useful:

standup = log --pretty=format:'%Cred%h%Creset -%Creset %s %Cgreen(%cD) %C(bold
blue)<%an>%Creset' \--since yesterday --author <Your Name>

~~~
zrail
Yeah, this is great for commits, but I've found that I personally commit in
sort of random patterns, and I'll stash rather than commit when I'm
temporarily switching tasks that need a branch change.

That's probably a really bad habit, but journaling branch changes helps me
quite a bit.

------
arh68
I almost really like this tool. It's close to being seamless and Unixy,
offering a pretty small command-line-option-language that expresses a bunch of
journal-related commands. I like that idea, a lot. But the recipes dive right
into piping text through wc and grep, so I wonder: what exactly does this
offer over some bash functions and raw textfiles? I've already got cat, grep,
find, tail, xargs et al.

More nitpicking: the * escaping bothers me. That's a core feature, using the *
to mark things, but you have to avoid letting bash expand it. Are there any
better characters? Does 'single quoting' help anything?

The fuzzy date parsing looks great. (: I also think the no-dash (new entry) vs
dash (filters..) vs double-dash (action) convention is fairly neat as far as
calling conventions go. Tagging things with @ seems like a useful convention,
too, even if I end up using notepad.

~~~
maebert
Thanks :) In fact, jrnl started as exactly that: some bash functions over a
text file. But then I wanted encryption. And I wanted fuzzy date parsing.
There we go...

I agree that the * is not perfect. Turns out there aren't so many characters
that are accessible on most keyboards (also non-US layouts) that are NOT
already special characters on most shells. Suggestions welcome!

------
danneu
Consistently journaling has been my most valuable habit over the past 5 years.

It's the only way to relive thoughts I'll never have again because I become
jaded. It's also a great way to grasp just how much of everything I forget. I
wonder if I'd even have any personal stories to tell from the time I studied
in Prague if I hadn't written so much of it down while enamored by it all.

~~~
pqs
I'm also in the habit of journaling. But for me it is much easier to write
than to read my journal. I write almost everyday and some days I write several
entries in the journal. Now I'd like to have a good method to retrieve the
knowledge buried in the journal. For some entries I set alarms (after one
year, three months, ...) but the rest is just buried. How do you effectively
retrieve and review old entries? Do you have a consistent method?

~~~
danneu
Any sort of system I've tried to come up with for reading and writing only
ensured that I didn't do either.

I rarely read my stuff. And much of it I don't really want to read. — Once I
have the power of hindsight, reminding myself of squandered opportunities and
silly apprehensions I once had (in great cathartic unending detail, no less)
can be a hard pill to swallow.

But those couple days each year I spend a moment flipping back to a random
page in my life — however so infrequently — are rich with perspective. There
seems to be a lot of wisdom in that delta between then and now. Like reliving
how terrified I was of some impending event in my past and now, years later,
really being able to internalize the reality of "That wasn't so bad, was it?
You could've just relaxed that whole time. Next time, just relax."

I don't think it's essential to revisit your writings regularly. I reckon most
of the value in writing is the self-reflection necessary to serialize your
mind to paper in the first place. It forces you to confront yourself when it's
far easier to perpetually avoid yourself up until the very end. I think when
you're analyzing yourself from the outside, you have no choice but to grow in
some way.

As long as you're writing at all, I think you're doing fine.

~~~
pqs
Thanks, your answer is valuable. We are doing the same ... writing but not
reading our stuff ;-)

------
desipenguin
I use vimwiki diary mode, and a cronjob that pops up a vim window (with pre-
populated timestamp) every 30 minutes. Been doing that for over 18 months now.

Original article where I got this idea :
[http://www.stochasticgeometry.ie/2012/11/23/vimwiki/](http://www.stochasticgeometry.ie/2012/11/23/vimwiki/)

------
dufferzafar
Looks great! though I'd have loved it even more if there were binaries
available. I just like having all my favorite applications in one portable
folder. I'm guessing using something like py2exe to create one won't be hard.

Also, what are the chances that the jrnl[encrypted] package will work on
Windows? (without using Cygwin?)

~~~
maebert
Hi, creator of the package here. If you install the pycrypto package first,
jrnl should work fine on Windows, too. It only needs a gcc compiler to build
from source [1], but there are even pre-compiled binaries [2] (I don't have
any experience with them though - please let me know if it works) :)

I think py2exe could work well, too! Otherwise you could create a virtual
environment with virtualenv and install all the dependencies into one folder.

[1]
[https://www.dlitz.net/software/pycrypto/](https://www.dlitz.net/software/pycrypto/)
[2]
[http://www.voidspace.org.uk/python/modules.shtml#pycrypto](http://www.voidspace.org.uk/python/modules.shtml#pycrypto)

~~~
joshbaptiste
or create a Go version (which may be a nice future side project for me) hmm..

~~~
dufferzafar
Would rewriting the application just to be able to provide releases make
sense? What other benefits can one get when writing command line applications
in Go? (as compared to python)

I am asking this because I myself plan to write a small command line tool in
Python. I have never wrote (or read) a line of Go though, so would like to
know.

~~~
joshbaptiste
Creating it in Go would relieve the user of installing and/or compiling any
other libs to run the application in Python, a set of static binaries which
could be compiled to run on FreeBSD,OSX,Linux,Windows without much effort.

------
bshimmin
This looks pretty neat.

Just a small thing - the little terminal goes a bit crazy if you click the
carousel arrows forward a few times.

~~~
jonalmeida
It goes crazy if you leave the browser tab for another one, and then come back
a few minutes later. Like an automatic fast-forward.

------
pqs
This sounds great. I use Day One for my personal diary and org-mode for work
stuff. This setup was quite good but now it is much better because, if it
works as promised, Jrnl will allow me to add personal entries in Day One from
the linux computer I use at work. Thanks! :-)

------
gemlog
I just tested this with zimwiki, works perfectly, as it's all plain text
files. [http://zim-wiki.org/](http://zim-wiki.org/) I didn't try it with
encryption as zim wouldn't understand it.

------
christiangenco
Very cool! I built a command line tool to solve a similar problem a few years
ago:
[https://github.com/christiangenco/t_time_tracker](https://github.com/christiangenco/t_time_tracker)

------
ripter
I've been using [http://www.geeknote.me/](http://www.geeknote.me/) for a while
now. Jrnl looks interesting, I'll have to try it out and see how it compares.

------
schnevets
Fantastic! I made a quick and dirty BASH solution two years ago and I've been
meaning to rewrite it in python ever since. It's uncanny how similar this
design is to what I was planning, though.

------
listic
This tool writes journal entries to a local file and you have to read them
back via this tool, am I right?

Can it play with an external service, e.g. can my journal be public via Tumblr
or some static site generator?

------
thegeomaster
Oooh, great! Just something I needed! Kudos for the author.

~~~
maebert
Thanks a lot!!

------
LVB
Minor comment on the otherwise nice site: repeatedly clicking the right arrow
on the side of the demo console causes it to get confused.

~~~
phlyingpenguin
If the author sees these, I'll also note that I went to a different tab for a
while and when I came back, the homepage animation was going at warp speed to
catch up to reality.

~~~
maebert
The author does see. In fact there some other fantastic HN person already saw
this and submitted a pull request
([https://github.com/maebert/jrnl/pull/175](https://github.com/maebert/jrnl/pull/175))

------
donniezazen
What do you guys think about org-mode once you get over the initial learning
curve?

~~~
pqs
I wouldn't be able to work without it.

I use it to organize and log my work. I also use it to write documents and to
publish my own personal website
([http://pere.quintanasegui.com](http://pere.quintanasegui.com)).

Basically, I have a file, which is a tree. Each node is an "area" (work,
personal), and each area is divided in subareas (projects, internal meetings,
etc.) and each subarea is roughly divided in projects, which are divided in
subprojects and tasks (more or less). This sounds complicated but it isn't. It
allows me to find the exact place where to fill something. Tasks have an
status, a deadline, a scheduled time and tags. Then, everyday, in the agenda,
I find the tasks of the day and upcoming deadlines. I use tags to filter the
tasks. Finally, while doing the tasks, I log the process of completing it.
Tasks should be simple actionable items. If they are complex, I divide them in
simpler parts. Some tags are recurring and sometimes I also add reminders to
certain tasks or journal entries, to remember something that happened.
Everything is versioned under git. Sometimes, I delete a subtree by error and
git has allowed me to recover from these errors.

Org-mode is an extension to my brain. It is very useful. Unfortunately, I had
some problems with MobileOrg on the iPad. That would make it even more useful
when traveling.

------
bybjorn
How does the use of encryption affect/play with DayOne?

~~~
maebert
Encryption currently only works for plain text based journals; DayOne journals
can't be encrypted (since DayOne can't deal with encrypted journals either). I
hope they'll change that though, as they promised loooong time ago.

------
chid
How well does this deal with conflicts with DayOne?

~~~
maebert
You mean when DayOne has a sync conflict? That depends on the method of
syncing, I guess, which is different between DropBox and iCloud as far as I
know. If I remember correctly, in iCloud the conflicting file will be ignored,
while in Dropbox you'll have two entries. None of these is perfect I admit. If
that's important to you, I'll look into it and we can come up with a well-
defined behaviour for that, just open an issue on
[https://github.com/maebert/jrnl/issues](https://github.com/maebert/jrnl/issues)
!

------
IanCal
Awesome. Small, simple, text-file based.

