Deployed 4ecaf19 with MkDocs version: 1.0.4

This commit is contained in:
Micah Ellison 2019-11-25 21:13:00 -08:00
parent f0f26a18eb
commit 6786e485b1
11 changed files with 82 additions and 151 deletions

View file

@ -87,8 +87,6 @@
<li><a class="toctree-l3" href="#configuration-file">Configuration File</a></li>
<li><a class="toctree-l3" href="#dayone-integration">DayOne Integration</a></li>
<li><a class="toctree-l3" href="#multiple-journal-files">Multiple journal files</a></li>
<li><a class="toctree-l3" href="#known-issues">Known Issues</a></li>
@ -142,15 +140,20 @@
<h1 id="advanced-usage">Advanced Usage</h1>
<h2 id="configuration-file">Configuration File</h2>
<p>You can configure the way jrnl behaves in a configuration file. By
default, this is <code>~/.jrnl_config</code>. If you have the <code>XDG_CONFIG_HOME</code>
default, this is <code>~/.config/jrnl/jrnl.yaml</code>. If you have the <code>XDG_CONFIG_HOME</code>
variable set, the configuration file will be saved as
<code>$XDG_CONFIG_HOME/jrnl/.jrnl_config</code>.</p>
<code>$XDG_CONFIG_HOME/jrnl/jrnl.yaml</code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>On Windows, The configuration file is typically found at <code>C:\Users\[Your Username]\.jrnl_config</code>.</p>
<p>On Windows, the configuration file is typically found at <code>%USERPROFILE%\.config\jrnl\jrnl.yaml</code>.</p>
</div>
<p>The configuration file is a YAML file with the following options
and can be edited with a plain text editor.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Backup your config file before editing. Changes to the config file
have destructive effects on your journal!</p>
</div>
<p>The configuration file is a simple JSON file with the following options
and can be edited with any plain text editor.</p>
<ul>
<li><code>journals</code>
paths to your journal files</li>
@ -191,40 +194,13 @@ you type</p>
</div>
<p>Or use the built-in prompt or an external editor to compose your
entries.</p>
<h2 id="dayone-integration">DayOne Integration</h2>
<p>Using your DayOne journal instead of a flat text file is dead simple --
instead of pointing to a text file, change your <code>.jrnl_config</code> to point
to your DayOne journal. This is a folder named something like
<code>Journal_dayone</code> or <code>Journal.dayone</code>, and it's located at</p>
<ul>
<li><code>~/Library/Application Support/Day One/</code> by default</li>
<li><code>~/Dropbox/Apps/Day One/</code> if you're syncing with Dropbox and</li>
<li><code>~/Library/Mobile
Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/</code> if you're
syncing with iCloud.</li>
</ul>
<p>Instead of all entries being in a single file, each entry will live in a
separate <code>plist</code> file. So your <code>.jrnl_config</code> should look like this:</p>
<pre><code class="javascript">{
...
&quot;journals&quot;: {
&quot;default&quot;: &quot;~/journal.txt&quot;,
&quot;dayone&quot;: &quot;~/Library/Mobile Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/Journal_dayone&quot;
}
}
</code></pre>
<h2 id="multiple-journal-files">Multiple journal files</h2>
<p>You can configure <code>jrnl</code>to use with multiple journals (eg.
<code>private</code> and <code>work</code>) by defining more journals in your <code>.jrnl_config</code>,
<code>private</code> and <code>work</code>) by defining more journals in your <code>jrnl.yaml</code>,
for example:</p>
<pre><code class="javascript">{
...
&quot;journals&quot;: {
&quot;default&quot;: &quot;~/journal.txt&quot;,
&quot;work&quot;: &quot;~/work.txt&quot;
}
}
<pre><code class="yaml">journals:
default: ~\journal.txt
work: ~\work.txt
</code></pre>
<p>The <code>default</code> journal gets created the first time you start <code>jrnl</code>
@ -237,24 +213,20 @@ jrnl work -n 3
<p>will both use <code>~/work.txt</code>, while <code>jrnl -n 3</code> will display the last
three entries from <code>~/journal.txt</code> (and so does <code>jrnl default -n 3</code>).</p>
<p>You can also override the default options for each individual journal.
If you <code>.jrnl_config</code> looks like this:</p>
<pre><code class="javascript">{
...
&quot;encrypt&quot;: false
&quot;journals&quot;: {
&quot;default&quot;: &quot;~/journal.txt&quot;,
&quot;work&quot;: {
&quot;journal&quot;: &quot;~/work.txt&quot;,
&quot;encrypt&quot;: true
},
&quot;food&quot;: &quot;~/my_recipes.txt&quot;,
}
If your <code>jrnl.yaml</code> looks like this:</p>
<pre><code class="yaml">encrypt: false
journals:
default: ~/journal.txt
work:
journal: ~/work.txt
encrypt: true
food: ~/my_recipes.txt
</code></pre>
<p>Your <code>default</code> and your <code>food</code> journals won't be encrypted, however your
<code>work</code> journal will! You can override all options that are present at
the top level of <code>.jrnl_config</code>, just make sure that at the very least
you specify a <code>"journal": ...</code> key that points to the journal file of
the top level of <code>jrnl.yaml</code>, just make sure that at the very least
you specify a <code>journal: ...</code> key that points to the journal file of
that journal.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>

View file

@ -141,9 +141,9 @@
<h1 id="encryption">Encryption</h1>
<h2 id="encrypting-and-decrypting">Encrypting and decrypting</h2>
<p>If you don't choose to encrypt your file when you run
<p>If you dont choose to encrypt your file when you run
<code>jrnl</code> for the first time, you can encrypt
your existing journal file or change its password using</p>
your existing journal file or change its password using this:</p>
<pre><code class="sh">jrnl --encrypt
</code></pre>
@ -153,43 +153,48 @@ replaced by the encrypted file. Conversely,</p>
<pre><code class="sh">jrnl --decrypt
</code></pre>
<p>will replace your encrypted journal file by a Journal in plain text. You
can also specify a filename, ie. <code>jrnl --decrypt plain_text_copy.txt</code>,
<p>will replace your encrypted journal file with a journal in plain text. You
can also specify a filename, i.e. <code>jrnl --decrypt plain_text_copy.txt</code>,
to leave your original file untouched.</p>
<h2 id="storing-passwords-in-your-keychain">Storing passwords in your keychain</h2>
<p>Whenever you encrypt your journal, you are asked whether you want to
store the encryption password in your keychain. If you do this, you
won't have to enter your password every time you want to write or read
wont have to enter your password every time you want to write or read
your journal.</p>
<p>If you don't initially store the password in the keychain but decide to
do so at a later point -- or maybe want to store it on one computer but
not on another -- you can simply run <code>jrnl --encrypt</code> on an encrypted
<p>If you dont initially store the password in the keychain but decide to
do so at a later point or maybe want to store it on one computer but
not on another you can simply run <code>jrnl --encrypt</code> on an encrypted
journal and use the same password again.</p>
<h2 id="a-note-on-security">A note on security</h2>
<p>While jrnl follows best practises, true security is an illusion.
Specifically, jrnl will leave traces in your memory and your shell
history -- it's meant to keep journals secure in transit, for example
history its meant to keep journals secure in transit, for example
when storing it on an
<a href="http://techcrunch.com/2014/04/09/condoleezza-rice-joins-dropboxs-board/">untrusted</a>
services such as Dropbox. If you're concerned about security, disable
history logging for journal in your <code>.bashrc</code></p>
services such as Dropbox. If youre concerned about security, disable
history logging for journal in your <code>.bashrc</code>:</p>
<pre><code class="sh">HISTIGNORE=&quot;$HISTIGNORE:jrnl *&quot;
</code></pre>
<p>If you are using zsh instead of bash, you can get the same behaviour
adding this to your <code>zshrc</code></p>
<p>If you are using zsh instead of bash, you can get the same behaviour by
adding this to your <code>zshrc</code>:</p>
<pre><code class="sh">setopt HIST_IGNORE_SPACE
alias jrnl=&quot; jrnl&quot;
</code></pre>
<p>The fish shell does not support automatically preventing logging like
this. To prevent <code>jrnl</code> commands being logged by fish, you must make
sure to type a space before every <code>jrnl</code> command you enter. To delete
existing <code>jrnl</code> commands from fishs history, run
<code>history delete --prefix 'jrnl '</code>.</p>
<h2 id="manual-decryption">Manual decryption</h2>
<p>Should you ever want to decrypt your journal manually, you can do so
with any program that supports the AES algorithm in CBC. The key used
for encryption is the SHA-256-hash of your password, the IV
(initialisation vector) is stored in the first 16 bytes of the encrypted
file. The plain text is encoded in UTF-8 and padded according to PKCS#7
before being encrypted. Here's a Python script that you can use to
decrypt your journal</p>
before being encrypted. Heres a Python script that you can use to
decrypt your journal:</p>
<pre><code class="python">#!/usr/bin/env python3
import argparse

View file

@ -82,11 +82,6 @@
<h3>Accessible anywhere.</h3>
<p>Sync your journals with Dropbox and capture your thoughts where ever you are</p>
</section>
<section>
<i class="icon dayone"></i>
<h3>DayOne compatible.</h3>
<p>Read, write and search your DayOne journal from the command line.</p>
</section>
<section>
<i class="icon github"></i>
<h3>Free &amp; Open Source.</h3>

View file

@ -146,22 +146,10 @@
<pre><code class="sh">pip install jrnl
</code></pre>
<p>Or, if you want the option to encrypt your journal,</p>
<pre><code class="sh">pip install jrnl[encrypted]
</code></pre>
<p>to install the dependencies for encrypting journals as well.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Installing the encryption library, <code>pycrypto</code>, requires a <code>gcc</code> compiler. For this reason, jrnl will
not install <code>pycrypto</code> unless explicitly told so like this. You can <a href="https://www.dlitz.net/software/pycrypto/">install PyCrypto manually</a>
first or install it with <code>pip install pycrypto</code> if you have a <code>gcc</code> compiler.
Also note that when using zsh, the correct syntax is <code>pip install "jrnl[encrypted]"</code> (note the quotes).</p>
</div>
<p>The first time you run <code>jrnl</code> you will be asked where your journal file
should be created and whether you wish to encrypt it.</p>
<h2 id="quickstart">Quickstart</h2>
<p>to make a new entry, just type</p>
<p>To make a new entry, just type</p>
<pre><code class="sh">jrnl yesterday: Called in sick. Used the time to clean the house and spent 4h on writing my book.
</code></pre>

View file

@ -142,9 +142,6 @@ your command line. Journals are stored as human readable plain text
files - you can put them into a Dropbox folder for instant syncing and
you can be assured that your journal will still be readable in 2050,
when all your fancy iPad journal applications will long be forgotten.</p>
<p><code>jrnl</code> also plays nice with the fabulous
<a href="http://dayoneapp.com">DayOne</a> and can read and write directly from and
to DayOne Journals.</p>
<p>Optionally, your journal can be encrypted using the <a href="http://en.wikipedia.org/wiki/Advanced_Encryption_Standard">256-bit
AES</a>.</p>
<h2 id="why-keep-a-journal">Why keep a journal?</h2>

View file

@ -170,8 +170,7 @@ average entry?</p>
it by the number of entries (this works because <code>jrnl --short</code> will
print exactly one line per entry).</p>
<h3 id="importing-older-files">Importing older files</h3>
<p>If you want to import a file as an entry to jrnl, you can just do <code>jrnl
&lt; entry.ext</code>. But what if you want the modification date of the file to
<p>If you want to import a file as an entry to jrnl, you can just do <code>jrnl &lt; entry.ext</code>. But what if you want the modification date of the file to
be the date of the entry in jrnl? Try this</p>
<pre><code class="sh">echo `stat -f %Sm -t '%d %b %Y at %H:%M: ' entry.txt` `cat entry.txt` | jrnl
</code></pre>
@ -205,17 +204,24 @@ log_question 'What did I achieve today?'
log_question 'What did I make progress with?'
</code></pre>
<h3 id="display-random-entry">Display random entry</h3>
<p>You can use this to select one title at random and then display the whole
entry. The invocation of <code>cut</code> needs to match the format of the timestamp.
For timestamps that have a space between data and time components, select
fields 1 and 2 as shown. For timestamps that have no whitespace, select
only field 1.</p>
<pre><code class="sh">jrnl -on &quot;$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)&quot;
</code></pre>
<h2 id="external-editors">External editors</h2>
<p>To use external editors for writing and editing journal entries, set
them up in your <code>.jrnl_config</code> (see <code>advanced usage &lt;advanced&gt;</code> for
them up in your <code>jrnl.yaml</code> (see <code>advanced usage &lt;advanced&gt;</code> for
details). Generally, after writing an entry, you will have to save and
close the file to save the changes to jrnl.</p>
<h3 id="sublime-text">Sublime Text</h3>
<p>To use Sublime Text, install the command line tools for Sublime Text and
configure your <code>.jrnl_config</code> like this:</p>
<pre><code class="json">{
&quot;editor&quot;: &quot;subl -w&quot;
}
configure your <code>jrnl.yaml</code> like this:</p>
<pre><code class="yaml">editor: &quot;subl -w&quot;
</code></pre>
<p>Note the <code>-w</code> flag to make sure jrnl waits for Sublime Text to close the
@ -224,18 +230,15 @@ file before writing into the journal.</p>
<p>Similar to Sublime Text, MacVim must be started with a flag that tells
the the process to wait until the file is closed before passing control
back to journal. In the case of MacVim, this is <code>-f</code>:</p>
<pre><code class="json">{
&quot;editor&quot;: &quot;mvim -f&quot;
}
<p>&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD</p>
<pre><code class="yaml">editor: &quot;mvim -f&quot;
</code></pre>
<h3 id="ia-writer">iA Writer</h3>
<p>On OS X, you can use the fabulous <a href="http://www.iawriter.com/mac">iA
Writer</a> to write entries. Configure your
<code>.jrnl_config</code> like this:</p>
<pre><code class="json">{
&quot;editor&quot;: &quot;open -b pro.writer.mac -Wn&quot;
}
<code>jrnl.yaml</code> like this:</p>
<pre><code class="yaml">editor: &quot;open -b pro.writer.mac -Wn&quot;
</code></pre>
<p>What does this do? <code>open -b ...</code> opens a file using the application
@ -250,20 +253,16 @@ you can find the right string to use by inspecting iA Writer's
<h3 id="notepad-on-windows">Notepad++ on Windows</h3>
<p>To set <a href="http://notepad-plus-plus.org/">Notepad++</a> as your editor, edit
the jrnl config file (<code>.jrnl_config</code>) like this:</p>
<pre><code class="json">{
&quot;editor&quot;: &quot;C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession&quot;,
}
the jrnl config file (<code>jrnl.yaml</code>) like this:</p>
<pre><code class="yaml">editor: &quot;C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession&quot;
</code></pre>
<p>The double backslashes are needed so jrnl can read the file path
correctly. The <code>-multiInst -nosession</code> options will cause jrnl to open
its own Notepad++ window.</p>
<h3 id="visual-studio-code">Visual Studio Code</h3>
<p>To set <a href="https://code.visualstudio.com">Visual Studo Code</a> as your editor on Linux, edit <code>.jrnl_config</code> like this:</p>
<pre><code class="json">{
&quot;editor&quot;: &quot;/usr/bin/code --wait&quot;,
}
<p>To set <a href="https://code.visualstudio.com">Visual Studo Code</a> as your editor on Linux, edit <code>jrnl.yaml</code> like this:</p>
<pre><code class="yaml">editor: &quot;/usr/bin/code --wait&quot;
</code></pre>
<p>The <code>--wait</code> argument tells VS Code to wait for files to be written out before handing back control to jrnl.</p>
@ -273,12 +272,10 @@ its own Notepad++ window.</p>
<p>to your <code>.bash_profile</code>, or by running the <strong>Install 'code' command in PATH</strong> command from the command pallet in VS Code.</p>
<p>Then you can add:</p>
<pre><code class="javascript">{
&quot;editor&quot;: &quot;code --wait&quot;,
}
<pre><code class="yaml">editor: &quot;code --wait&quot;
</code></pre>
<p>to <code>.jrnl_config</code>. See also the <a href="https://code.visualstudio.com/docs/setup/mac">Visual Studio Code documentation</a></p>
<p>to <code>jrnl.yaml</code>. See also the <a href="https://code.visualstudio.com/docs/setup/mac">Visual Studio Code documentation</a></p>
</div>
</div>

File diff suppressed because one or more lines are too long

View file

@ -2,37 +2,37 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>None</loc>
<lastmod>2019-10-19</lastmod>
<lastmod>2019-11-25</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-10-19</lastmod>
<lastmod>2019-11-25</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-10-19</lastmod>
<lastmod>2019-11-25</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-10-19</lastmod>
<lastmod>2019-11-25</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-10-19</lastmod>
<lastmod>2019-11-25</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-10-19</lastmod>
<lastmod>2019-11-25</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>None</loc>
<lastmod>2019-10-19</lastmod>
<lastmod>2019-11-25</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>

Binary file not shown.

View file

@ -82,11 +82,6 @@
<h3>Accessible anywhere.</h3>
<p>Sync your journals with Dropbox and capture your thoughts where ever you are</p>
</section>
<section>
<i class="icon dayone"></i>
<h3>DayOne compatible.</h3>
<p>Read, write and search your DayOne journal from the command line.</p>
</section>
<section>
<i class="icon github"></i>
<h3>Free &amp; Open Source.</h3>

View file

@ -169,13 +169,13 @@ editor -- or by just writing an entry on the prompt, such as</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
</div>
<p>Most shell contains a certain number of reserved characters, such as <code>#</code>
and <code>*</code>. Unbalanced quotes, parenthesis, and so on will also get into
the way of your editing.
For writing longer entries, just enter <code>jrnl</code>
and hit <code>return</code>. Only then enter the text of your journal entry.
Alternatively, <code>use an external editor &lt;advanced&gt;</code>).</p>
</div>
<p>You can also import an entry directly from a file</p>
<pre><code class="sh">jrnl &lt; my_entry.txt
</code></pre>
@ -205,10 +205,10 @@ The following options are equivalent:</p>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
</div>
<p>Just make sure that the asterisk sign is <strong>not</strong> surrounded by
whitespaces, e.g. <code>jrnl Best day of my life! *</code> will <strong>not</strong> work (the
reason being that the <code>*</code> sign has a special meaning on most shells).</p>
</div>
<h2 id="viewing">Viewing</h2>
<pre><code class="sh">jrnl -n 10
</code></pre>
@ -243,15 +243,15 @@ You can change which symbols you'd like to use for tagging in the
configuration.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
</div>
<p><code>jrnl @pinkie @WorldDomination</code> will switch to viewing mode because
although <strong>no</strong> command line arguments are given, all the input strings
look like tags - <em>jrnl</em> will assume you want to filter by tag.</p>
</div>
<h2 id="editing-older-entries">Editing older entries</h2>
<p>You can edit selected entries after you wrote them. This is particularly
useful when your journal file is encrypted or if you're using a DayOne
journal. To use this feature, you need to have an editor configured in
your journal configuration file (see <code>advanced usage &lt;advanced&gt;</code>)</p>
useful when your journal file is encrypted. To use this feature, you need
to have an editor configured in your journal configuration file (see
<code>advanced usage &lt;advanced&gt;</code>)</p>
<pre><code class="sh">jrnl -until 1950 @texas -and @history --edit
</code></pre>
@ -267,24 +267,6 @@ encrypt) your edited journal after you save and exit the editor.</p>
</code></pre>
<p>Just select all text, press delete, and everything is gone...</p>
<h3 id="editing-dayone-journals">Editing DayOne Journals</h3>
<p>DayOne journals can be edited exactly the same way, however the output
looks a little bit different because of the way DayOne stores its
entries:</p>
<pre><code class="md"># af8dbd0d43fb55458f11aad586ea2abf
2013-05-02 15:30 I told everyone I built my @robot wife for sex.
But late at night when we're alone we mostly play Battleship.
# 2391048fe24111e1983ed49a20be6f9e
2013-08-10 03:22 I had all kinds of plans in case of a @zombie attack.
I just figured I'd be on the other side.
</code></pre>
<p>The long strings starting with hash symbol are the so-called UUIDs,
unique identifiers for each entry. Don't touch them. If you do, then the
old entry would get deleted and a new one written, which means that you
could lose DayOne data that jrnl can't handle (such as as the entry's
geolocation).</p>
</div>
</div>