mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-06 16:26:13 +02:00
Deployed 4ecaf19
with MkDocs version: 1.0.4
This commit is contained in:
parent
f0f26a18eb
commit
6786e485b1
11 changed files with 82 additions and 151 deletions
|
@ -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
|
||||
< 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 < 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 "$(jrnl --short | shuf -n 1 | cut -d' ' -f1,2)"
|
||||
</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 <advanced></code> for
|
||||
them up in your <code>jrnl.yaml</code> (see <code>advanced usage <advanced></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">{
|
||||
"editor": "subl -w"
|
||||
}
|
||||
configure your <code>jrnl.yaml</code> like this:</p>
|
||||
<pre><code class="yaml">editor: "subl -w"
|
||||
</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">{
|
||||
"editor": "mvim -f"
|
||||
}
|
||||
<p><<<<<<< HEAD</p>
|
||||
<pre><code class="yaml">editor: "mvim -f"
|
||||
</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">{
|
||||
"editor": "open -b pro.writer.mac -Wn"
|
||||
}
|
||||
<code>jrnl.yaml</code> like this:</p>
|
||||
<pre><code class="yaml">editor: "open -b pro.writer.mac -Wn"
|
||||
</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">{
|
||||
"editor": "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession",
|
||||
}
|
||||
the jrnl config file (<code>jrnl.yaml</code>) like this:</p>
|
||||
<pre><code class="yaml">editor: "C:\\Program Files (x86)\\Notepad++\\notepad++.exe -multiInst -nosession"
|
||||
</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">{
|
||||
"editor": "/usr/bin/code --wait",
|
||||
}
|
||||
<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: "/usr/bin/code --wait"
|
||||
</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">{
|
||||
"editor": "code --wait",
|
||||
}
|
||||
<pre><code class="yaml">editor: "code --wait"
|
||||
</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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue