mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
- Add Japanese translations for documentation - Implement I18N framework - Update mkdocs.yml for multi-language support This commit significantly enhances the project's internationalization.
322 lines
15 KiB
HTML
322 lines
15 KiB
HTML
<!--
|
|
Copyright © 2012-2023 jrnl contributors
|
|
License: https://www.gnu.org/licenses/gpl-3.0.html
|
|
-->
|
|
|
|
<!DOCTYPE html>
|
|
<html class="writer-html5" lang="en" >
|
|
<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="jrnl contributors" /><link rel="canonical" href="https://jrnl.sh/advanced/" />
|
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
|
<title>Advanced Usage - jrnl</title>
|
|
<link rel="stylesheet" href="../css/theme.css" />
|
|
<link rel="stylesheet" href="../css/theme_extra.css" />
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github.min.css" />
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,600" rel="stylesheet" />
|
|
<link href="../assets/colors.css" 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 = "/advanced/";
|
|
</script>
|
|
|
|
<!--[if lt IE 9]>
|
|
<script src="../js/html5shiv.min.js"></script>
|
|
<![endif]-->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
|
|
<script>hljs.highlightAll();</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-scroll">
|
|
<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 mkdocs-search" action="../search.html" method="get">
|
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
|
<button class="icon icon-search" aria-label="submit"></button>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../overview/">Overview</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">User Guide</span></p>
|
|
<ul class="current">
|
|
<li class="toctree-l1"><a class="reference internal" href="../installation/">Quickstart</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../usage/">Basic Usage</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../encryption/">Encryption</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../journal-types/">Journal Types</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../privacy-and-security/">Privacy and Security</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../formats/">Formats</a>
|
|
</li>
|
|
<li class="toctree-l1 current"><a class="reference internal current" href="#">Advanced Usage</a>
|
|
<ul class="current">
|
|
<li class="toctree-l2"><a class="reference internal" href="#configuration-file">Configuration File</a>
|
|
<ul>
|
|
<li class="toctree-l3"><a class="reference internal" href="#multiple-journal-files">Multiple journal files</a>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#modifying-configurations-from-the-command-line">Modifying Configurations from the Command line</a>
|
|
<ul>
|
|
<li class="toctree-l4"><a class="reference internal" href="#examples">Examples:</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l3"><a class="reference internal" href="#using-an-alternate-config">Using an alternate config</a>
|
|
<ul>
|
|
<li class="toctree-l4"><a class="reference internal" href="#examples_1">Examples:</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../external-editors/">External Editors</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../tips-and-tricks/">Tips and Tricks</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Reference</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../reference-command-line/">Command Line</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" href="../reference-config-file/">Configuration File</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">Contributing</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../contributing/">Contributing to jrnl</a>
|
|
</li>
|
|
</ul>
|
|
<p class="caption"><span class="caption-text">ja</span></p>
|
|
<ul>
|
|
<li class="toctree-l1"><a class="reference internal" href="../ja/overview/">概要</a>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" >ユーザーガイド</a>
|
|
<ul>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/installation/">クイックスタート</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/usage/">基本的な使い方</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/encryption/">暗号化</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/journal-types/">ジャーナルの種類</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/privacy-and-security/">プライバシーとセキュリティ</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/formats/">フォーマット</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/advanced/">高度な使い方</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/external-editors/">外部エディタ</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/tips-and-tricks/">ヒントとコツ</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" >リファレンス</a>
|
|
<ul>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/reference-command-line/">コマンドライン</a>
|
|
</li>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/reference-config-file/">設定ファイル</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="toctree-l1"><a class="reference internal" >貢献</a>
|
|
<ul>
|
|
<li class="toctree-l2"><a class="reference internal" href="../ja/contributing/">jrnlへの貢献</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
|
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
|
<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"><!--
|
|
Copied from https://github.com/mkdocs/mkdocs/blob/master/mkdocs/themes/readthedocs/breadcrumbs.html
|
|
Then lightly modified for accessibility
|
|
-->
|
|
|
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
|
<ul class="wy-breadcrumbs">
|
|
<li><a href=".." class="icon icon-home" aria-label="Docs"></a> »</li>
|
|
<li>User Guide »</li>
|
|
<li>Advanced Usage</li>
|
|
<li class="wy-breadcrumbs-aside">
|
|
<a href="https://github.com/jrnl-org/jrnl/edit/develop/docs/advanced.md" class="icon icon-github"> Edit on GitHub</a>
|
|
</li>
|
|
</ul>
|
|
<hr/>
|
|
</div>
|
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
|
<div class="section" itemprop="articleBody">
|
|
|
|
<!--
|
|
Copyright © 2012-2023 jrnl contributors
|
|
License: https://www.gnu.org/licenses/gpl-3.0.html
|
|
-->
|
|
|
|
<h1 id="advanced-usage">Advanced Usage</h1>
|
|
<h2 id="configuration-file">Configuration File</h2>
|
|
<p><code>jrnl</code> has a wide variety of options that can be customized through the config file,
|
|
including templates, formats, multiple journals, and more. See
|
|
the <a href="../reference-config-file/">configuration file reference</a> for details
|
|
or read on for some common use cases.</p>
|
|
<h3 id="multiple-journal-files">Multiple journal files</h3>
|
|
<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 <a href="../reference-config-file/">config file</a>,
|
|
for example:</p>
|
|
<pre><code class="language-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="language-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="language-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!</p>
|
|
<p>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>
|
|
<p>Consider the following example configuration</p>
|
|
<pre><code class="language-yaml">editor: vi -c startinsert
|
|
journals:
|
|
default: ~/journal.txt
|
|
work:
|
|
journal: ~/work.txt
|
|
encrypt: true
|
|
display_format: json
|
|
editor: code -rw
|
|
food:
|
|
display_format: markdown
|
|
journal: ~/recipes.txt
|
|
</code></pre>
|
|
<p>The <code>work</code> journal is encrypted, prints to <code>json</code> by default, and is edited using an existing window of VSCode. Similarly, the <code>food</code> journal prints to markdown by default, but uses all the other defaults.</p>
|
|
<h3 id="modifying-configurations-from-the-command-line">Modifying Configurations from the Command line</h3>
|
|
<p>You can override a configuration field for the current instance of <code>jrnl</code> using <code>--config-override CONFIG_KEY CONFIG_VALUE</code> where <code>CONFIG_KEY</code> is a valid configuration field, specified in dot notation and <code>CONFIG_VALUE</code> is the (valid) desired override value. The dot notation can be used to change config keys within other keys, such as <code>colors.title</code> for the <code>title</code> key within the <code>colors</code> key.</p>
|
|
<p>You can specify multiple overrides as multiple calls to <code>--config-override</code>.</p>
|
|
<div class="admonition note">
|
|
<p class="admonition-title">Note</p>
|
|
<p>These overrides allow you to modify <strong><em>any</em></strong> field of your jrnl configuration. We trust that you know what you are doing. </p>
|
|
</div>
|
|
<h4 id="examples">Examples:</h4>
|
|
<pre><code class="language-sh"># Create an entry using the `stdin` prompt, for rapid logging
|
|
jrnl --config-override editor ""
|
|
|
|
# Populate a project's log
|
|
jrnl --config-override journals.todo "$(git rev-parse --show-toplevel)/todo.txt" todo find my towel
|
|
|
|
# Pass multiple overrides
|
|
jrnl --config-override display_format fancy --config-override linewrap 20 \
|
|
--config-override colors.title green
|
|
</code></pre>
|
|
<h3 id="using-an-alternate-config">Using an alternate config</h3>
|
|
<p>You can specify an alternate configuration file for the current instance of <code>jrnl</code> using <code>--config-file CONFIG_FILE_PATH</code> where
|
|
<code>CONFIG_FILE_PATH</code> is a path to an alternate <code>jrnl</code> configuration file. </p>
|
|
<h4 id="examples_1">Examples:</h4>
|
|
<pre><code class="language-sh"># Use personalised configuration file for personal journal entries
|
|
jrnl --config-file ~/foo/jrnl/personal-config.yaml
|
|
|
|
# Use alternate configuration file for work-related entries
|
|
jrnl --config-file ~/foo/jrnl/work-config.yaml
|
|
|
|
# Use default configuration file (created on first run)
|
|
jrnl
|
|
</code></pre>
|
|
|
|
</div>
|
|
</div><footer>
|
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
|
<a href="../formats/" class="btn btn-neutral float-left" title="Formats"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
|
<a href="../external-editors/" class="btn btn-neutral float-right" title="External Editors">Next <span class="icon icon-circle-arrow-right"></span></a>
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<div role="contentinfo">
|
|
<!-- Copyright etc -->
|
|
</div>
|
|
|
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/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" aria-label="Versions">
|
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
|
|
|
<span>
|
|
<a href="https://github.com/jrnl-org/jrnl/" class="fa fa-github" style="color: #fcfcfc"> GitHub</a>
|
|
</span>
|
|
|
|
|
|
<span><a href="../formats/" style="color: #fcfcfc">« Previous</a></span>
|
|
|
|
|
|
<span><a href="../external-editors/" style="color: #fcfcfc">Next »</a></span>
|
|
|
|
</span>
|
|
</div>
|
|
<script src="../js/jquery-3.6.0.min.js"></script>
|
|
<script>var base_url = "..";</script>
|
|
<script src="../js/theme_extra.js"></script>
|
|
<script src="../js/theme.js"></script>
|
|
<script src="../search/main.js"></script>
|
|
<script>
|
|
jQuery(function () {
|
|
SphinxRtdTheme.Navigation.enable(true);
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|