mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 08:38:32 +02:00
217 lines
No EOL
14 KiB
HTML
217 lines
No EOL
14 KiB
HTML
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>Advanced Usage — jrnl 1.7.6 documentation</title>
|
|
|
|
<link rel="stylesheet" href="_static/css/jrnl.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: '',
|
|
VERSION: '1.7.6',
|
|
COLLAPSE_INDEX: false,
|
|
FILE_SUFFIX: '.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
<link rel="top" title="jrnl 1.7.6 documentation" href="index.html" />
|
|
<link rel="next" title="FAQ" href="recipes.html" />
|
|
<link rel="prev" title="Import and Export" href="export.html" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
|
|
<link rel="apple-touch-icon-precomposed" href="_static/img/favicon-152.png">
|
|
<link rel="shortcut icon" href="_static/img/favicon.ico">
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="advanced-usage">
|
|
<span id="advanced"></span><h1>Advanced Usage<a class="headerlink" href="#advanced-usage" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="configuration-file">
|
|
<h2>Configuration File<a class="headerlink" href="#configuration-file" title="Permalink to this headline">¶</a></h2>
|
|
<p>You can configure the way jrnl behaves in a configuration file. By default, this is <tt class="docutils literal"><span class="pre">~/.jrnl_config</span></tt>. If you have the <tt class="docutils literal"><span class="pre">XDG_CONFIG_HOME</span></tt> variable set, the configuration file will be saved under <tt class="docutils literal"><span class="pre">$XDG_CONFIG_HOME/jrnl</span></tt>.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">On Windows, The configuration file is typically found at <tt class="docutils literal"><span class="pre">C:\Users\[Your</span> <span class="pre">Username]\.jrnl_config</span></tt>.</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><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">journals</span></tt></dt>
|
|
<dd><p class="first last">paths to your journal files</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">editor</span></tt></dt>
|
|
<dd><p class="first last">if set, executes this command to launch an external editor for writing your entries, e.g. <tt class="docutils literal"><span class="pre">vim</span></tt>. Some editors require special options to work properly, see <a class="reference internal" href="recipes.html"><em>FAQ</em></a> for details.</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">encrypt</span></tt></dt>
|
|
<dd><p class="first last">if <tt class="docutils literal"><span class="pre">true</span></tt>, encrypts your journal using AES.</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">tagsymbols</span></tt></dt>
|
|
<dd><p class="first last">Symbols to be interpreted as tags. (See note below)</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">default_hour</span></tt> and <tt class="docutils literal"><span class="pre">default_minute</span></tt></dt>
|
|
<dd><p class="first last">if you supply a date, such as <tt class="docutils literal"><span class="pre">last</span> <span class="pre">thursday</span></tt>, but no specific time, the entry will be created at this time</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">timeformat</span></tt></dt>
|
|
<dd><p class="first last">how to format the timestamps in your journal, see the <a class="reference external" href="http://docs.python.org/library/time.html#time.strftime">python docs</a> for reference</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">highlight</span></tt></dt>
|
|
<dd><p class="first last">if <tt class="docutils literal"><span class="pre">true</span></tt>, tags will be highlighted in cyan.</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
<li><dl class="first docutils">
|
|
<dt><tt class="docutils literal"><span class="pre">linewrap</span></tt></dt>
|
|
<dd><p class="first last">controls the width of the output. Set to <tt class="docutils literal"><span class="pre">false</span></tt> if you don’t want to wrap long lines.</p>
|
|
</dd>
|
|
</dl>
|
|
</li>
|
|
</ul>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p>Although it seems intuitive to use the <cite>#</cite> character for tags, there’s a drawback: on most shells, this is interpreted as a meta-character starting a comment. This means that if you type</p>
|
|
<div class="highlight-note"><pre>jrnl Implemented endless scrolling on the #frontend of our website.</pre>
|
|
</div>
|
|
<p>your bash will chop off everything after the <tt class="docutils literal"><span class="pre">#</span></tt> before passing it to _jrnl_). To avoid this, wrap your input into quotation marks like this:</p>
|
|
<div class="highlight-note"><pre>jrnl "Implemented endless scrolling on the #frontend of our website."</pre>
|
|
</div>
|
|
<p class="last">Or use the built-in prompt or an external editor to compose your entries.</p>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dayone-integration">
|
|
<h2>DayOne Integration<a class="headerlink" href="#dayone-integration" title="Permalink to this headline">¶</a></h2>
|
|
<p>Using your DayOne journal instead of a flat text file is dead simple – instead of pointing to a text file, change your <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt> to point to your DayOne journal. This is a folder ending with <tt class="docutils literal"><span class="pre">.dayone</span></tt>, and it’s located at</p>
|
|
<ul class="simple">
|
|
<li><tt class="docutils literal"><span class="pre">~/Library/Application</span> <span class="pre">Support/Day</span> <span class="pre">One/</span></tt> by default</li>
|
|
<li><tt class="docutils literal"><span class="pre">~/Dropbox/Apps/Day</span> <span class="pre">One/</span></tt> if you’re syncing with Dropbox and</li>
|
|
<li><tt class="docutils literal"><span class="pre">~/Library/Mobile</span> <span class="pre">Documents/5U8NS4GX82~com~dayoneapp~dayone/Documents/</span></tt> 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 <cite>plist</cite> file.</p>
|
|
</div>
|
|
<div class="section" id="multiple-journal-files">
|
|
<h2>Multiple journal files<a class="headerlink" href="#multiple-journal-files" title="Permalink to this headline">¶</a></h2>
|
|
<p>You can configure _jrnl_ to use with multiple journals (eg. <tt class="docutils literal"><span class="pre">private</span></tt> and <tt class="docutils literal"><span class="pre">work</span></tt>) by defining more journals in your <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt>, for example:</p>
|
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
|
|
<span class="p">...</span>
|
|
<span class="s2">"journals"</span><span class="o">:</span> <span class="p">{</span>
|
|
<span class="s2">"default"</span><span class="o">:</span> <span class="s2">"~/journal.txt"</span><span class="p">,</span>
|
|
<span class="s2">"work"</span><span class="o">:</span> <span class="s2">"~/work.txt"</span>
|
|
<span class="p">}</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>The <tt class="docutils literal"><span class="pre">default</span></tt> journal gets created the first time you start _jrnl_. Now you can access the <tt class="docutils literal"><span class="pre">work</span></tt> journal by using <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">work</span></tt> instead of <tt class="docutils literal"><span class="pre">jrnl</span></tt>, eg.</p>
|
|
<div class="highlight-python"><pre>jrnl work at 10am: Meeting with @Steve</pre>
|
|
</div>
|
|
<div class="highlight-python"><pre>jrnl work -n 3</pre>
|
|
</div>
|
|
<p>will both use <tt class="docutils literal"><span class="pre">~/work.txt</span></tt>, while <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">-n</span> <span class="pre">3</span></tt> will display the last three entries from <tt class="docutils literal"><span class="pre">~/journal.txt</span></tt> (and so does <tt class="docutils literal"><span class="pre">jrnl</span> <span class="pre">default</span> <span class="pre">-n</span> <span class="pre">3</span></tt>).</p>
|
|
<p>You can also override the default options for each individual journal. If you <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt> looks like this:</p>
|
|
<div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
|
|
<span class="p">...</span>
|
|
<span class="s2">"encrypt"</span><span class="o">:</span> <span class="kc">false</span>
|
|
<span class="s2">"journals"</span><span class="o">:</span> <span class="p">{</span>
|
|
<span class="s2">"default"</span><span class="o">:</span> <span class="s2">"~/journal.txt"</span><span class="p">,</span>
|
|
<span class="s2">"work"</span><span class="o">:</span> <span class="p">{</span>
|
|
<span class="s2">"journal"</span><span class="o">:</span> <span class="s2">"~/work.txt"</span><span class="p">,</span>
|
|
<span class="s2">"encrypt"</span><span class="o">:</span> <span class="kc">true</span>
|
|
<span class="p">},</span>
|
|
<span class="s2">"food"</span><span class="o">:</span> <span class="s2">"~/my_recipes.txt"</span><span class="p">,</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<p>Your <tt class="docutils literal"><span class="pre">default</span></tt> and your <tt class="docutils literal"><span class="pre">food</span></tt> journals won’t be encrypted, however your <tt class="docutils literal"><span class="pre">work</span></tt> journal will! You can override all options that are present at the top level of <tt class="docutils literal"><span class="pre">.jrnl_config</span></tt>, just make sure that at the very least you specify a <tt class="docutils literal"><span class="pre">"journal":</span> <span class="pre">...</span></tt> key that points to the journal file of that journal.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">Changing <tt class="docutils literal"><span class="pre">encrypt</span></tt> to a different value will not encrypt or decrypt your journal file, it merely says whether or not your journal <cite>is</cite> encrypted. Hence manually changing this option will most likely result in your journal file being impossible to load.</p>
|
|
</div>
|
|
<div class="section" id="known-issues">
|
|
<h3>Known Issues<a class="headerlink" href="#known-issues" title="Permalink to this headline">¶</a></h3>
|
|
<ul class="simple">
|
|
<li>The Windows shell prior to Windows 7 has issues with unicode encoding. If you want to use non-ascii characters, change the codepage with <tt class="docutils literal"><span class="pre">chcp</span> <span class="pre">1252</span></tt> before using <cite>jrnl</cite> (Thanks to Yves Pouplard for solving this!)</li>
|
|
<li>_jrnl_ relies on the <cite>PyCrypto</cite> package to encrypt journals, which has some known problems with installing on Windows and within virtual environments.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<aside>
|
|
<a href="index.html" id="logolink" title="jrnl"><img class="logo" src="_static/img/logo.png" width="90px" height="98px" title="jrnl"/></a>
|
|
<h2>Documentation</h2>
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="installation.html">Getting started</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="usage.html">Basic Usage</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="encryption.html">Encryption</a></li>
|
|
<li class="toctree-l1"><a class="reference internal" href="export.html">Import and Export</a></li>
|
|
<li class="toctree-l1 current"><a class="current reference internal" href="">Advanced Usage</a><ul>
|
|
<li class="toctree-l2"><a class="reference internal" href="#configuration-file">Configuration File</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#dayone-integration">DayOne Integration</a></li>
|
|
<li class="toctree-l2"><a class="reference internal" href="#multiple-journal-files">Multiple journal files</a><ul>
|
|
<li class="toctree-l3"><a class="reference internal" href="#known-issues">Known Issues</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="recipes.html">FAQ</a></li>
|
|
</ul>
|
|
|
|
<div id="searchbox" style="display: none">
|
|
<h3>Quick search</h3>
|
|
<form class="search" action="search.html" method="get">
|
|
<input type="text" name="q" />
|
|
<input type="submit" value="Go" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
<p class="searchtip" style="font-size: 90%">
|
|
Enter search terms or a module, class or function name.
|
|
</p>
|
|
</div>
|
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
|
</aside>
|
|
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="footer">
|
|
Journal is made with love by <a href="http://www.1450.me">Manuel Ebert</a> and <a href="https://github.com/maebert/jrnl/graphs/contributors" title="Contributtors">other fabulous people</a>. If you need help, tweet to <a href="https://twitter.com/maebert" title="Follow @maebert on twitter">@maebert</a> or <a href="https://github.com/maebert/jrnl/issues/new" title="Open a new issue on Github">submit an issue</a> on Github.
|
|
</div>
|
|
</body>
|
|
</html> |