jrnl/advanced/index.html
2019-11-25 21:13:00 -08:00

294 lines
11 KiB
HTML
Executable file

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="Manuel Ebert">
<link rel="shortcut icon" href="../img/favicon.ico">
<title>Advanced Usage - jrnl</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,600" rel="stylesheet">
<link href="../assets/theme.css" rel="stylesheet">
<link href="../assets/highlight.css" rel="stylesheet">
<script>
// Current page data
var mkdocs_page_name = "Advanced Usage";
var mkdocs_page_input_path = "advanced.md";
var mkdocs_page_url = null;
</script>
<script src="../js/jquery-2.1.1.min.js" defer></script>
<script src="../js/modernizr-2.8.3.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href=".." class="icon icon-home"> jrnl</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1">
<a class="" href="../overview/">Overview</a>
</li>
<li class="toctree-l1">
<a class="" href="../installation/">Quickstart</a>
</li>
<li class="toctree-l1">
<a class="" href="../usage/">Basic Usage</a>
</li>
<li class="toctree-l1">
<a class="" href="../encryption/">Encryption</a>
</li>
<li class="toctree-l1">
<a class="" href="../export/">Import and Export</a>
</li>
<li class="toctree-l1 current">
<a class="current" href="./">Advanced Usage</a>
<ul class="subnav">
<li class="toctree-l2"><a href="#advanced-usage">Advanced Usage</a></li>
<ul>
<li><a class="toctree-l3" href="#configuration-file">Configuration File</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>
</ul>
</ul>
</li>
<li class="toctree-l1">
<a class="" href="../recipes/">Recipes</a>
</li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="..">jrnl</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="..">Docs</a> &raquo;</li>
<li>Advanced Usage</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/jrnl-org/jrnl/edit/master/docs/advanced.md"
class="icon icon-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main">
<div class="section">
<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>~/.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.yaml</code>.</p>
<div class="admonition note">
<p class="admonition-title">Note</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>
<ul>
<li><code>journals</code>
paths to your journal files</li>
<li><code>editor</code>
if set, executes this command to launch an external editor for
writing your entries, e.g. <code>vim</code>. Some editors require special
options to work properly, see <code>FAQ &lt;recipes&gt;</code> for details.</li>
<li><code>encrypt</code>
if <code>true</code>, encrypts your journal using AES.</li>
<li><code>tagsymbols</code>
Symbols to be interpreted as tags. (See note below)</li>
<li><code>default_hour</code> and <code>default_minute</code>
if you supply a date, such as <code>last thursday</code>, but no specific
time, the entry will be created at this time</li>
<li><code>timeformat</code>
how to format the timestamps in your journal, see the <a href="http://docs.python.org/library/time.html#time.strftime">python docs</a> for reference</li>
<li><code>highlight</code>
if <code>true</code>, tags will be highlighted in cyan.</li>
<li><code>linewrap</code>
controls the width of the output. Set to <code>false</code> if you don't
want to wrap long lines.</li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Although it seems intuitive to use the <code>#</code>
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>
<blockquote>
<p><code>jrnl Implemented endless scrolling on the #frontend of our website.</code></p>
</blockquote>
<p>your bash will chop off everything after the <code>#</code> before passing it to
<code>jrnl</code>. To avoid this, wrap your input into quotation marks like
this:</p>
<blockquote>
<p><code>jrnl "Implemented endless scrolling on the #frontend of our website."</code></p>
</blockquote>
</div>
<p>Or use the built-in prompt or an external editor to compose your
entries.</p>
<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.yaml</code>,
for example:</p>
<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>
Now you can access the <code>work</code> journal by using <code>jrnl work</code> instead of
<code>jrnl</code>, eg.</p>
<pre><code class="sh">jrnl work at 10am: Meeting with @Steve
jrnl work -n 3
</code></pre>
<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 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.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>
<p>Changing <code>encrypt</code> to a different value will not encrypt or decrypt your
journal file, it merely says whether or not your journal
is encrypted. Hence manually changing
this option will most likely result in your journal file being
impossible to load.</p>
</div>
<h2 id="known-issues">Known Issues</h2>
<h3 id="unicode-on-windows">Unicode on Windows</h3>
<p>The Windows shell prior to Windows 7 has issues with unicode encoding.
To use non-ascii characters, first tweak Python to recognize the encoding by adding <code>'cp65001': 'utf_8'</code>, to <code>Lib/encoding/aliases.py</code>. Then, change the codepage with <code>chcp 1252</code> before using <code>jrnl</code>.</p>
<p>(Related issue: <a href="https://github.com/jrnl-org/jrnl/issues/486">#486</a>)</p>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="../recipes/" class="btn btn-neutral float-right" title="Recipes">Next <span class="icon icon-circle-arrow-right"></span></a>
<a href="../export/" class="btn btn-neutral" title="Import and Export"><span class="icon icon-circle-arrow-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<!-- Copyright etc -->
</div>
Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" role="note" style="cursor: pointer">
<span class="rst-current-version" data-toggle="rst-current-version">
<a href="https://github.com/jrnl-org/jrnl/" class="fa fa-github" style="float: left; color: #fcfcfc"> GitHub</a>
<span><a href="../export/" style="color: #fcfcfc;">&laquo; Previous</a></span>
<span style="margin-left: 15px"><a href="../recipes/" style="color: #fcfcfc">Next &raquo;</a></span>
</span>
</div>
<script>var base_url = '..';</script>
<script src="../js/theme.js" defer></script>
<script src="../search/main.js" defer></script>
</body>
</html>