mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-15 09:04:04 +02:00
935 lines
40 KiB
HTML
935 lines
40 KiB
HTML
<!doctype html>
|
|
<html>
|
|
|
|
<!--
|
|
|
|
!!! WARNING !!!
|
|
|
|
This file was auto-generated from readme/terminal.md and any manual change
|
|
made to it will be overwritten. To make a change to this file please modify
|
|
the source Markdown file:
|
|
|
|
https://github.com/laurent22/joplin/blob/master/readme/terminal.md
|
|
|
|
-->
|
|
|
|
<head>
|
|
<title>Terminal Application | Joplin</title>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="https://joplinapp.org/css/bootstrap.min.css">
|
|
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
|
<!-- <link rel="stylesheet" href="https://joplinapp.org/css/fontawesome-all.min.css"> -->
|
|
<link rel="stylesheet" href="https://joplinapp.org/css/fork-awesome.min.css">
|
|
<script src="https://joplinapp.org/js/jquery-3.2.1.slim.min.js"></script>
|
|
<style>
|
|
body {
|
|
background-color: #F1F1F1;
|
|
color: #333333;
|
|
}
|
|
table {
|
|
margin-bottom: 1em;
|
|
}
|
|
td, th {
|
|
padding: .8em;
|
|
border: 1px solid #ccc;
|
|
}
|
|
|
|
.page-markdown table pre,
|
|
.page-markdown table blockquote {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.page-markdown table pre,
|
|
.page-markdown table blockquote {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.page-markdown table pre {
|
|
background-color: rgba(0,0,0,0);
|
|
border: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
h1, h2 {
|
|
border-bottom: 1px solid #eaecef;
|
|
padding-bottom: 0.3em;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
font-weight: 600;
|
|
font-size: 2em;
|
|
margin-bottom: 16px;
|
|
}
|
|
h2 {
|
|
font-size: 1.6em;
|
|
}
|
|
h3 {
|
|
font-size: 1.3em;
|
|
}
|
|
code {
|
|
color: black;
|
|
background-color: #eee;
|
|
border: 1px solid #ccc;
|
|
font-size: .85em;
|
|
}
|
|
pre code {
|
|
border: none;
|
|
}
|
|
pre {
|
|
font-size: .85em;
|
|
}
|
|
blockquote {
|
|
font-size: 1em;
|
|
color: #555;
|
|
};
|
|
#toc ul {
|
|
margin-bottom: 10px;
|
|
}
|
|
#toc {
|
|
padding-bottom: 1em;
|
|
}
|
|
.title {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
.title-icon {
|
|
display: flex;
|
|
height: 1em;
|
|
}
|
|
.title-text {
|
|
display: flex;
|
|
font-weight: normal;
|
|
margin-bottom: .2em;
|
|
margin-left: .5em;
|
|
}
|
|
.sub-title {
|
|
font-weight: normal;
|
|
}
|
|
.container {
|
|
background-color: white;
|
|
padding: 0;
|
|
box-shadow: 0 10px 20px #888888;
|
|
}
|
|
table.screenshots {
|
|
margin-top: 2em;
|
|
margin-bottom: 2em;
|
|
}
|
|
table.screenshots th {
|
|
height: 3em;
|
|
text-align: center;
|
|
}
|
|
table.screenshots th,
|
|
table.screenshots td {
|
|
border: 1px solid #C2C2C2;
|
|
}
|
|
img[align="left"] {
|
|
margin-right: 10px;
|
|
margin-bottom: 10px;
|
|
}
|
|
.mobile-screenshot {
|
|
height: 40em;
|
|
padding: 1em;
|
|
}
|
|
.cli-screenshot-wrapper {
|
|
background-color: black;
|
|
vertical-align: top;
|
|
padding: 1em 2em 1em 1em;
|
|
}
|
|
.cli-screenshot {
|
|
font-family: "Monaco", "Inconsolata", "CONSOLAS", "Deja Vu Sans Mono", "Droid Sans Mono", "Andale Mono", monospace;
|
|
background-color: black;
|
|
color: white;
|
|
border: none;
|
|
}
|
|
.cli-screenshot .prompt {
|
|
color: #48C2F0;
|
|
}
|
|
.top-screenshot {
|
|
margin-top: 2em;
|
|
text-align: center;
|
|
}
|
|
.header {
|
|
position: relative;
|
|
padding-left: 2em;
|
|
padding-right: 2em;
|
|
padding-top: 1em;
|
|
padding-bottom: 1em;
|
|
color: white;
|
|
background-color: #2B2B3D;
|
|
}
|
|
.header a h1 {
|
|
color: white;
|
|
}
|
|
.header a:hover {
|
|
text-decoration: none;
|
|
}
|
|
.content {
|
|
padding-left: 2em;
|
|
padding-right: 2em;
|
|
padding-bottom: 2em;
|
|
padding-top: 2em;
|
|
}
|
|
.forkme {
|
|
position: absolute;
|
|
right: 0;
|
|
top:0;
|
|
}
|
|
.nav-wrapper {
|
|
position: relative;
|
|
width: inherit;
|
|
}
|
|
.nav {
|
|
background-color: black;
|
|
display: table;
|
|
width: inherit;
|
|
}
|
|
.nav.sticky {
|
|
position:fixed;
|
|
top: 0;
|
|
width: inherit;
|
|
box-shadow: 0 0 10px #000000;
|
|
}
|
|
.nav a {
|
|
color: white;
|
|
display: inline-block;
|
|
padding: .6em .9em .6em .9em;
|
|
}
|
|
.nav ul {
|
|
padding-left: 2em;
|
|
margin-bottom: 0;
|
|
display: table-cell;
|
|
/* min-width: 250px; */
|
|
/* For GSoC: */
|
|
min-width: 470px;
|
|
}
|
|
.nav ul li {
|
|
display: inline-block;
|
|
padding: 0;
|
|
}
|
|
.nav li.selected {
|
|
background-color: #222;
|
|
font-weight: bold;
|
|
}
|
|
.nav-right {
|
|
display: table-cell;
|
|
width: 100%;
|
|
text-align: right;
|
|
vertical-align: middle;
|
|
line-height: 0;
|
|
}
|
|
.nav-right .share-btn {
|
|
display: none;
|
|
}
|
|
.nav-right .small-share-btn {
|
|
display: none;
|
|
}
|
|
.footer {
|
|
padding-top: 1em;
|
|
border-top: 1px solid #d4d4d4;
|
|
margin-top: 2em;
|
|
color: gray;
|
|
font-size: .9em;
|
|
}
|
|
a.heading-anchor {
|
|
display: inline-block;
|
|
opacity: 0;
|
|
width: 1.3em;
|
|
font-size: 0.7em;
|
|
margin-left: 0.4em;
|
|
line-height: 1em;
|
|
text-decoration: none;
|
|
transition: opacity 0.3s;
|
|
}
|
|
a.heading-anchor:hover,
|
|
h1:hover a.heading-anchor,
|
|
h2:hover a.heading-anchor,
|
|
h3:hover a.heading-anchor,
|
|
h4:hover a.heading-anchor,
|
|
h5:hover a.heading-anchor,
|
|
h6:hover a.heading-anchor {
|
|
opacity: 1;
|
|
}
|
|
|
|
.bottom-links {
|
|
display: flex;
|
|
justify-content: center;
|
|
border-top: 1px solid #d4d4d4;
|
|
margin-top: 30px;
|
|
padding-top: 25px;
|
|
}
|
|
|
|
@media all and (min-width: 400px) {
|
|
.nav-right .share-btn {
|
|
display: inline-block;
|
|
}
|
|
.nav-right .small-share-btn {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container page-terminal">
|
|
|
|
<div class="header">
|
|
<a class="forkme" href="https://github.com/laurent22/joplin"><img src="https://joplinapp.org/images/ForkMe.png"/></a>
|
|
<a href="https://joplinapp.org"><h1 class="title"><img class="title-icon" src="https://joplinapp.org/images/Icon512.png"><span class="title-text">Joplin</span></h1></a>
|
|
<p class="sub-title">An open source note taking and to-do application with synchronisation capabilities</p>
|
|
</div>
|
|
|
|
<div class="nav-wrapper">
|
|
<div class="nav">
|
|
<ul>
|
|
<li class=""><a href="https://joplinapp.org/" title="Home"><i class="fa fa-home"></i></a></li>
|
|
<li><a href="https://discourse.joplinapp.org" title="Forum">Forum</a></li>
|
|
<li><a class="help" href="#" title="Menu">Menu</a></li>
|
|
<li><a class="gsoc" href="https://joplinapp.org/gsoc2020/" title="Google Summer of Code 2020">GSoC 2020</a></li>
|
|
</ul>
|
|
<div class="nav-right">
|
|
<!--
|
|
<iframe class="share-btn" src="https://www.facebook.com/plugins/share_button.php?href=http%3A%2F%2Fjoplinapp.org&layout=button&size=small&mobile_iframe=true&width=60&height=20&appId" width="60" height="20" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
|
|
<iframe class="share-btn" src="https://platform.twitter.com/widgets/tweet_button.html?url=http%3A%2F%2Fjoplinapp.org" width="62" height="20" title="Tweet" style="border: 0; overflow: hidden;"></iframe>
|
|
-->
|
|
<iframe class="share-btn share-btn-github" src="https://ghbtns.com/github-btn.html?user=laurent22&repo=joplin&type=star&count=true" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div id="toc"><ul>
|
|
<li>
|
|
<p>Applications</p>
|
|
<ul>
|
|
<li><a href="https://joplinapp.org/desktop/">Desktop application</a></li>
|
|
<li><a href="https://joplinapp.org/mobile/">Mobile applications</a></li>
|
|
<li><a href="https://joplinapp.org/terminal/">Terminal application</a></li>
|
|
<li><a href="https://joplinapp.org/clipper/">Web Clipper</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<p>Support</p>
|
|
<ul>
|
|
<li><a href="https://discourse.joplinapp.org">Joplin Forum</a></li>
|
|
<li><a href="https://joplinapp.org/markdown/">Markdown Guide</a></li>
|
|
<li><a href="https://joplinapp.org/e2ee/">How to enable end-to-end encryption</a></li>
|
|
<li><a href="https://joplinapp.org/spec/">End-to-end encryption spec</a></li>
|
|
<li><a href="https://joplinapp.org/debugging/">How to enable debug mode</a></li>
|
|
<li><a href="https://joplinapp.org/api/">API documentation</a></li>
|
|
<li><a href="https://joplinapp.org/faq/">FAQ</a></li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
<p>About</p>
|
|
<ul>
|
|
<li><a href="https://joplinapp.org/changelog/">Changelog (Desktop App)</a></li>
|
|
<li><a href="https://joplinapp.org/changelog_cli/">Changelog (CLI App)</a></li>
|
|
<li><a href="https://joplinapp.org/stats/">Stats</a></li>
|
|
<li><a href="https://joplinapp.org/donate/">Donate</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<p>Joplin is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are searchable, can be copied, tagged and modified with your own text editor.</p>
|
|
<p>Notes exported from Evernote via .enex files <a href="https://joplinapp.org/#importing">can be imported</a> into Joplin, including the formatted content (which is converted to Markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.). Plain Markdown files can also be imported.</p>
|
|
<p>The notes can be <a href="#synchronisation">synchronised</a> with various targets including the file system (for example with a network directory), Nextcloud, Dropbox, OneDrive or WebDAV. When synchronising the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around.</p>
|
|
<img src="https://joplinapp.org/images/ScreenshotTerminal.png" style="max-width: 60%">
|
|
<h1>Installation<a name="installation" href="#installation" class="heading-anchor">🔗</a></h1>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Operating system</th>
|
|
<th>Method</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>macOS</td>
|
|
<td><code>brew install joplin</code></td>
|
|
</tr>
|
|
<tr>
|
|
<td>Linux or Windows (via <a href="https://msdn.microsoft.com/en-us/commandline/wsl/faq?f=255&MSPPError=-2147217396">WSL</a>)</td>
|
|
<td><strong>Important:</strong> First, <a href="https://nodejs.org/en/download/package-manager/">install Node 10+</a>. <br/><br/><code>NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin</code><br/><code>sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin</code><br><br>By default, the application binary will be installed under <code>~/.joplin-bin</code>. You may change this directory if needed. Alternatively, if your npm permissions are setup as described <a href="https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory">here</a> (Option 2) then simply running <code>npm -g install joplin</code> would work.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Arch Linux</td>
|
|
<td>An Arch Linux package is available <a href="https://aur.archlinux.org/packages/joplin/">here</a>. To install it, use an AUR wrapper such as yay: <code>yay -S joplin</code>. Both the CLI tool (type <code>joplin</code>) and desktop app (type <code>joplin-desktop</code>) are packaged. For support, please go to the <a href="https://github.com/masterkorp/joplin-pkgbuild">GitHub repo</a>.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>To start it, type <code>joplin</code>.</p>
|
|
<h1>Usage<a name="usage" href="#usage" class="heading-anchor">🔗</a></h1>
|
|
<p>To start the application type <code>joplin</code>. This will open the user interface, which has three main panes: Notebooks, Notes and the text of the current note. There are also additional panels that can be toggled on and off via <a href="#shortcuts">shortcuts</a>.</p>
|
|
<img src="https://joplinapp.org/images/ScreenshotTerminalCaptions.png" height="450px">
|
|
<h2>Input modes<a name="input-modes" href="#input-modes" class="heading-anchor">🔗</a></h2>
|
|
<p>Joplin user interface is partly based on the text editor Vim and offers two different modes to interact with the notes and notebooks:</p>
|
|
<h3>Normal mode<a name="normal-mode" href="#normal-mode" class="heading-anchor">🔗</a></h3>
|
|
<p>Allows moving from one pane to another using the <code>Tab</code> and <code>Shift-Tab</code> keys, and to select/view notes using the arrow keys. Text area can be scrolled using the arrow keys too. Press <code>Enter</code> to edit a note. Various other <a href="#shortcuts">shortcuts</a> are available.</p>
|
|
<h3>Command-line mode<a name="command-line-mode" href="#command-line-mode" class="heading-anchor">🔗</a></h3>
|
|
<p>Press <code>:</code> to enter command line mode. From there, the Joplin commands such as <code>mknote</code> or <code>search</code> are available. See the <a href="#commands">full list of commands</a>.</p>
|
|
<p>It is possible to refer to a note or notebook by title or ID. However the simplest way is to refer to the currently selected item using one of these shortcuts:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Shortcut</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>$n</code></td>
|
|
<td>Refers to the currently selected note</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>$b</code></td>
|
|
<td>Refers to the currently selected notebook</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>$c</code></td>
|
|
<td>Refers to the currently selected item. For example, if the note list is current active, <code>$c</code> will refer to the currently selected note.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Examples:</strong></p>
|
|
<p>Create a new note with title "Wednesday's meeting":</p>
|
|
<pre><code>mknote "Wednesday's meeting"
|
|
</code></pre>
|
|
<p>Create a new to-do:</p>
|
|
<pre><code>mktodo "Buy bread"
|
|
</code></pre>
|
|
<p>Move the currently selected note ($n) to the notebook with title "Personal"</p>
|
|
<pre><code>mv $n "Personal"
|
|
</code></pre>
|
|
<p>Rename the currently selected notebook ($b) to "Something":</p>
|
|
<pre><code>ren $b "Something"
|
|
</code></pre>
|
|
<p>Attach a local file to the currently selected note ($n):</p>
|
|
<pre><code>attach $n /home/laurent/pictures/Vacation12.jpg
|
|
</code></pre>
|
|
<p>The configuration can also be changed from command-line mode. For example, to change the current editor to Sublime Text:</p>
|
|
<pre><code>config editor "subl -w"
|
|
</code></pre>
|
|
<h2>Editing a note<a name="editing-a-note" href="#editing-a-note" class="heading-anchor">🔗</a></h2>
|
|
<p>To edit a note, select it and press <code>ENTER</code>. Or, in command-line mode, type <code>edit $n</code> to edit the currently selected note, or <code>edit "Note title"</code> to edit a particular note.</p>
|
|
<h2>Getting help<a name="getting-help" href="#getting-help" class="heading-anchor">🔗</a></h2>
|
|
<p>The complete usage information is available from command-line mode, by typing one of these commands:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Command</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>help</code></td>
|
|
<td>General help information</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>help keymap</code></td>
|
|
<td>Lists the available shortcuts</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>help [command]</code></td>
|
|
<td>Displays information about a particular command</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>If the help is not fully visible, press <code>Tab</code> multiple times till the console is in focus and use the arrow keys or page up/down to scroll the text.</p>
|
|
<p>For general information relevant to all the applications, see also <a href="https://joplinapp.org">Joplin home page</a>.</p>
|
|
<h1>Importing notes from Evernote<a name="importing-notes-from-evernote" href="#importing-notes-from-evernote" class="heading-anchor">🔗</a></h1>
|
|
<p>To import Evernote data, follow these steps:</p>
|
|
<ul>
|
|
<li>First, export your Evernote notebooks to ENEX files as described <a href="https://help.evernote.com/hc/en-us/articles/209005557-How-to-back-up-export-and-restore-import-notes-and-notebooks">here</a>.</li>
|
|
<li>In Joplin, in <a href="#command-line-mode">command-line mode</a>, type <code>import /path/to/file.enex</code>. This will import the notes into a new notebook named after the filename.</li>
|
|
<li>Then repeat the process for each notebook that needs to be imported.</li>
|
|
</ul>
|
|
<h1>Synchronisation<a name="synchronisation" href="#synchronisation" class="heading-anchor">🔗</a></h1>
|
|
<p>One of the goals of Joplin was to avoid being tied to any particular company or service, whether it is Evernote, Google or Microsoft. As such the synchronisation is designed without any hard dependency to any particular service. Most of the synchronisation process is done at an abstract level and access to external services, such as Nextcloud or OneDrive, is done via lightweight drivers. It is easy to support new services by creating simple drivers that provide a filesystem-like interface, i.e. the ability to read, write, delete and list items. It is also simple to switch from one service to another or to even sync to multiple services at once. Each note, notebook, tags, as well as the relation between items is transmitted as plain text files during synchronisation, which means the data can also be moved to a different application, can be easily backed up, inspected, etc.</p>
|
|
<p>Currently, synchronisation is possible with Nextcloud, Dropbox (by default) and OneDrive, or the local filesystem. To setup synchronisation please follow the instructions below. After that, the application will synchronise in the background whenever it is running, or you can click on "Synchronise" to start a synchronisation manually.</p>
|
|
<h2>Nextcloud synchronisation<a name="nextcloud-synchronisation" href="#nextcloud-synchronisation" class="heading-anchor">🔗</a></h2>
|
|
<p>You will need to set the <code>sync.target</code> config variable and all the <code>sync.5.path</code>, <code>sync.5.username</code> and <code>sync.5.password</code> config variables to, respectively the Nextcloud WebDAV URL, your username and your password. This can be done from the command line mode using:</p>
|
|
<pre><code>:config sync.target 5
|
|
:config sync.5.path https://example.com/nextcloud/remote.php/webdav/Joplin
|
|
:config sync.5.username YOUR_USERNAME
|
|
:config sync.5.password YOUR_PASSWORD
|
|
</code></pre>
|
|
<p>If synchronisation does not work, please consult the logs in the app profile directory (<code>~/.config/joplin</code>)- it is often due to a misconfigured URL or password. The log should indicate what the exact issue is.</p>
|
|
<h2>WebDAV synchronisation<a name="webdav-synchronisation" href="#webdav-synchronisation" class="heading-anchor">🔗</a></h2>
|
|
<p>Select the "WebDAV" synchronisation target and follow the same instructions as for Nextcloud above.</p>
|
|
<h2>OneDrive and Dropbox synchronisation<a name="onedrive-and-dropbox-synchronisation" href="#onedrive-and-dropbox-synchronisation" class="heading-anchor">🔗</a></h2>
|
|
<p>For Dropbox, type <code>:config sync.target 7</code>. For OneDrive, type <code>:config sync.target 3</code>. Then type <code>sync</code> to login to the service and start the synchronisation process.</p>
|
|
<p>It is possible to also synchronise outside of the user interface by typing <code>joplin sync</code> from the terminal. This can be used to setup a cron script to synchronise at regular interval. For example, this would do it every 30 minutes:</p>
|
|
<pre><code>*/30 * * * * /path/to/joplin sync
|
|
</code></pre>
|
|
<h1>URLs<a name="urls" href="#urls" class="heading-anchor">🔗</a></h1>
|
|
<p>When Ctrl+Clicking a URL, most terminals will open that URL in the default browser. However, one issue, especially with long URLs, is that they can end up like this:</p>
|
|
<img src="https://joplinapp.org/images/UrlCut.png" width="300px">
|
|
<p>Not only it makes the text hard to read, but the link, being cut in two, will also not be clickable.</p>
|
|
<p>As a solution Joplin tries to start a mini-server in the background and, if successful, all the links will be converted to a much shorter URL:</p>
|
|
<img src="https://joplinapp.org/images/UrlNoCut.png" width="300px">
|
|
<p>Since this is still an actual URL, the terminal will still make it clickable. And with shorter URLs, the text is more readable and the links unlikely to be cut. Both resources (files that are attached to notes) and external links are handled in this way.</p>
|
|
<h1>Attachments / Resources<a name="attachments-resources" href="#attachments-resources" class="heading-anchor">🔗</a></h1>
|
|
<p>In Markdown, links to resources are represented as a simple ID to the resource. In order to give access to these resources, they will be, like links, converted to local URLs. Clicking this link will then open a browser, which will handle the file - i.e. display the image, open the PDF file, etc.</p>
|
|
<h1>Shell mode<a name="shell-mode" href="#shell-mode" class="heading-anchor">🔗</a></h1>
|
|
<p>Commands can also be used directly from a shell. To view the list of available commands, type <code>joplin help all</code>. To reference a note, notebook or tag you can either use the ID (type <code>joplin ls -l</code> to view the ID) or by title.</p>
|
|
<p>For example, this will create a new note "My note" in the notebook "My notebook":</p>
|
|
<pre><code>$ joplin mkbook "My notebook"
|
|
$ joplin use "My notebook"
|
|
$ joplin mknote "My note"
|
|
</code></pre>
|
|
<p>To view the newly created note:</p>
|
|
<pre><code>$ joplin ls -l
|
|
fe889 07/12/2017 17:57 My note
|
|
</code></pre>
|
|
<p>Give a new title to the note:</p>
|
|
<pre><code>$ joplin set fe889 title "New title"
|
|
</code></pre>
|
|
<h1>Shortcuts<a name="shortcuts" href="#shortcuts" class="heading-anchor">🔗</a></h1>
|
|
<p>There are two types of shortcuts: those that manipulate the user interface directly, such as <code>TAB</code> to move from one pane to another, and those that are simply shortcuts to actual commands. In a way similar to Vim, these shortcuts are generally a verb followed by an object. For example, typing <code>mn</code> ([m]ake [n]ote), is used to create a new note: it will switch the interface to command line mode and pre-fill it with <code>mknote ""</code> from where the title of the note can be entered. See below for the full list of default shortcuts:</p>
|
|
<pre><code>: enter_command_line_mode
|
|
TAB focus_next
|
|
SHIFT_TAB focus_previous
|
|
UP move_up
|
|
DOWN move_down
|
|
PAGE_UP page_up
|
|
PAGE_DOWN page_down
|
|
ENTER activate
|
|
DELETE, BACKSPACE delete
|
|
(SPACE) todo toggle $n
|
|
tc toggle_console
|
|
tm toggle_metadata
|
|
/ search ""
|
|
mn mknote ""
|
|
mt mktodo ""
|
|
mb mkbook ""
|
|
yn cp $n ""
|
|
dn mv $n ""
|
|
</code></pre>
|
|
<p>Shortcut can be configured by adding a keymap file to the profile directory in <code>~/.config/joplin/keymap.json</code>. The content of this file is a JSON array with each entry defining a command and the keys associated with it.</p>
|
|
<p>As an example, this is the default keymap, but read below for a detailed explanation of each property.</p>
|
|
<pre><code class="language-json">[
|
|
{ "keys": [":"], "type": "function", "command": "enter_command_line_mode" },
|
|
{ "keys": ["TAB"], "type": "function", "command": "focus_next" },
|
|
{ "keys": ["SHIFT_TAB"], "type": "function", "command": "focus_previous" },
|
|
{ "keys": ["UP"], "type": "function", "command": "move_up" },
|
|
{ "keys": ["DOWN"], "type": "function", "command": "move_down" },
|
|
{ "keys": ["PAGE_UP"], "type": "function", "command": "page_up" },
|
|
{ "keys": ["PAGE_DOWN"], "type": "function", "command": "page_down" },
|
|
{ "keys": ["ENTER"], "type": "function", "command": "activate" },
|
|
{ "keys": ["DELETE", "BACKSPACE"], "type": "function", "command": "delete" },
|
|
{ "keys": [" "], "command": "todo toggle $n" },
|
|
{ "keys": ["tc"], "type": "function", "command": "toggle_console" },
|
|
{ "keys": ["tm"], "type": "function", "command": "toggle_metadata" },
|
|
{ "keys": ["/"], "type": "prompt", "command": "search \"\"", "cursorPosition": -2 },
|
|
{ "keys": ["mn"], "type": "prompt", "command": "mknote \"\"", "cursorPosition": -2 },
|
|
{ "keys": ["mt"], "type": "prompt", "command": "mktodo \"\"", "cursorPosition": -2 },
|
|
{ "keys": ["mb"], "type": "prompt", "command": "mkbook \"\"", "cursorPosition": -2 },
|
|
{ "keys": ["yn"], "type": "prompt", "command": "cp $n \"\"", "cursorPosition": -2 },
|
|
{ "keys": ["dn"], "type": "prompt", "command": "mv $n \"\"", "cursorPosition": -2 }
|
|
]
|
|
</code></pre>
|
|
<p>Each entry can have the following properties:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>keys</code></td>
|
|
<td>The array of keys that will trigger the action. Special keys such as page up, down arrow, etc. needs to be specified UPPERCASE. See the <a href="https://github.com/cronvel/terminal-kit/blob/3114206a9556f518cc63abbcb3d188fe1995100d/lib/termconfig/xterm.js#L531">list of available special keys</a>. For example, <code>['DELETE', 'BACKSPACE']</code> means the command will run if the user pressed either the delete or backspace key. Key combinations can also be provided - in that case specify them lowercase. For example "tc" means that the command will be executed when the user pressed "t" then "c". Special keys can also be used in this fashion - simply write them one after the other. For instance, <code>CTRL_WCTRL_W</code> means the action would be executed if the user pressed "ctrl-w ctrl-w".</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>type</code></td>
|
|
<td>The command type. It can have the value "exec", "function" or "prompt". <strong>exec</strong>: Simply execute the provided <a href="#commands">command</a>. For example <code>edit $n</code> would edit the selected note. <strong>function</strong>: Run a special commands (see below for the list of functions). <strong>prompt</strong>: A bit similar to "exec", except that the command is not going to be executed immediately - this allows the user to provide additional data. For example <code>mknote ""</code> would fill the command line with this command and allow the user to set the title. A prompt command can also take a <code>cursorPosition</code> parameter (see below)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>command</code></td>
|
|
<td>The command that needs to be executed</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>cusorPosition</code></td>
|
|
<td>An integer. For prompt commands, tells where the cursor (caret) should start at. This is convenient for example to position the cursor between quotes. Use a negative value to set a position starting from the end. A value of "0" means positioning the caret at the first character. A value of "-1" means positioning it at the end.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>This is the list of special functions:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>enter_command_line_mode</td>
|
|
<td>Enter command line mode</td>
|
|
</tr>
|
|
<tr>
|
|
<td>focus_next</td>
|
|
<td>Focus next pane (or widget)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>focus_previous</td>
|
|
<td>Focus previous pane (or widget)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>move_up</td>
|
|
<td>Move up (in a list for example)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>move_down</td>
|
|
<td>Move down (in a list for example)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>page_up</td>
|
|
<td>Page up</td>
|
|
</tr>
|
|
<tr>
|
|
<td>page_down</td>
|
|
<td>Page down</td>
|
|
</tr>
|
|
<tr>
|
|
<td>activate</td>
|
|
<td>Activates the selected item. If the item is a note for example it will be open in the editor</td>
|
|
</tr>
|
|
<tr>
|
|
<td>delete</td>
|
|
<td>Deletes the selected item</td>
|
|
</tr>
|
|
<tr>
|
|
<td>toggle_console</td>
|
|
<td>Toggle the console</td>
|
|
</tr>
|
|
<tr>
|
|
<td>toggle_metadata</td>
|
|
<td>Toggle note metadata</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h1>Commands<a name="commands" href="#commands" class="heading-anchor">🔗</a></h1>
|
|
<p>The following commands are available in <a href="#command-line-mode">command-line mode</a>:</p>
|
|
<pre><code>attach <note> <file>
|
|
|
|
Attaches the given file to the note.
|
|
|
|
cat <note>
|
|
|
|
Displays the given note.
|
|
|
|
-v, --verbose Displays the complete information about note.
|
|
|
|
config [name] [value]
|
|
|
|
Gets or sets a config value. If [value] is not provided, it will show the
|
|
value of [name]. If neither [name] nor [value] is provided, it will list
|
|
the current configuration.
|
|
|
|
-v, --verbose Also displays unset and hidden config variables.
|
|
|
|
Possible keys/values:
|
|
|
|
locale Language.
|
|
Type: Enum.
|
|
Possible values: eu (Basque), ca (Catalan), hr_HR
|
|
(Croatian), cs_CZ (Czech), da_DK (Dansk), de_DE
|
|
(Deutsch), en_GB (English), es_ES (Español),
|
|
fr_FR (Français), gl_ES (Galician), it_IT
|
|
(Italiano), nl_NL (Nederlands), nl_BE
|
|
(Nederlands), nb_NO (Norwegian), pt_BR (Português
|
|
(Brasil)), ro (Română), sl_SI (Slovenian), sv
|
|
(Svenska), ru_RU (Русский), zh_CN (中文 (简体)),
|
|
zh_TW (中文 (繁體)), ja_JP (日本語), ko (한국말).
|
|
Default: "en_GB"
|
|
|
|
dateFormat Date format.
|
|
Type: Enum.
|
|
Possible values: DD/MM/YYYY (30/01/2017),
|
|
DD/MM/YY (30/01/17), MM/DD/YYYY (01/30/2017),
|
|
MM/DD/YY (01/30/17), YYYY-MM-DD (2017-01-30),
|
|
DD.MM.YYYY (30.01.2017), YYYY.MM.DD (2017.01.30).
|
|
Default: "DD/MM/YYYY"
|
|
|
|
timeFormat Time format.
|
|
Type: Enum.
|
|
Possible values: HH:mm (20:30), h:mm A (8:30 PM).
|
|
Default: "HH:mm"
|
|
|
|
uncompletedTodosOnTop Uncompleted to-dos on top.
|
|
Type: bool.
|
|
Default: true
|
|
|
|
showCompletedTodos Show completed to-dos.
|
|
Type: bool.
|
|
Default: true
|
|
|
|
notes.sortOrder.field Sort notes by.
|
|
Type: Enum.
|
|
Possible values: user_updated_time (Updated
|
|
date), user_created_time (Created date), title
|
|
(Title).
|
|
Default: "user_updated_time"
|
|
|
|
notes.sortOrder.reverse Reverse sort order.
|
|
Type: bool.
|
|
Default: true
|
|
|
|
trackLocation Save geo-location with notes.
|
|
Type: bool.
|
|
Default: true
|
|
|
|
sync.interval Synchronisation interval.
|
|
Type: Enum.
|
|
Possible values: 0 (Disabled), 300 (5 minutes),
|
|
600 (10 minutes), 1800 (30 minutes), 3600 (1
|
|
hour), 43200 (12 hours), 86400 (24 hours).
|
|
Default: 300
|
|
|
|
editor Text editor command.
|
|
The editor command (may include arguments) that
|
|
will be used to open a note. If none is provided
|
|
it will try to auto-detect the default editor.
|
|
Type: string.
|
|
|
|
sync.target Synchronisation target.
|
|
The target to synchronise to. Each sync target may
|
|
have additional parameters which are named as
|
|
`sync.NUM.NAME` (all documented below).
|
|
Type: Enum.
|
|
Possible values: 2 (File system), 3 (OneDrive), 4
|
|
(OneDrive Dev (For testing only)), 5 (Nextcloud),
|
|
6 (WebDAV), 7 (Dropbox).
|
|
Default: 7
|
|
|
|
sync.2.path Directory to synchronise with (absolute path).
|
|
The path to synchronise with when file system
|
|
synchronisation is enabled. See `sync.target`.
|
|
Type: string.
|
|
|
|
sync.5.path Nextcloud WebDAV URL.
|
|
Attention: If you change this location, make sure
|
|
you copy all your content to it before syncing,
|
|
otherwise all files will be removed! See the FAQ
|
|
for more details: https://joplinapp.org/faq/
|
|
Type: string.
|
|
|
|
sync.5.username Nextcloud username.
|
|
Type: string.
|
|
|
|
sync.5.password Nextcloud password.
|
|
Type: string.
|
|
|
|
sync.6.path WebDAV URL.
|
|
Attention: If you change this location, make sure
|
|
you copy all your content to it before syncing,
|
|
otherwise all files will be removed! See the FAQ
|
|
for more details: https://joplinapp.org/faq/
|
|
Type: string.
|
|
|
|
sync.6.username WebDAV username.
|
|
Type: string.
|
|
|
|
sync.6.password WebDAV password.
|
|
Type: string.
|
|
|
|
net.customCertificates Custom TLS certificates.
|
|
Comma-separated list of paths to directories to
|
|
load the certificates from, or path to individual
|
|
cert files. For example: /my/cert_dir,
|
|
/other/custom.pem. Note that if you make changes
|
|
to the TLS settings, you must save your changes
|
|
before clicking on "Check synchronisation
|
|
configuration".
|
|
Type: string.
|
|
|
|
net.ignoreTlsErrors Ignore TLS certificate errors.
|
|
Type: bool.
|
|
Default: false
|
|
|
|
cp <note> [notebook]
|
|
|
|
Duplicates the notes matching <note> to [notebook]. If no notebook is
|
|
specified the note is duplicated in the current notebook.
|
|
|
|
done <note>
|
|
|
|
Marks a to-do as done.
|
|
|
|
e2ee <command> [path]
|
|
|
|
Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`,
|
|
`status` and `target-status`.
|
|
|
|
-p, --password <password> Use this password as master password (For
|
|
security reasons, it is not recommended to use
|
|
this option).
|
|
-v, --verbose More verbose output for the `target-status`
|
|
command
|
|
|
|
edit <note>
|
|
|
|
Edit note.
|
|
|
|
export <path>
|
|
|
|
Exports Joplin data to the given path. By default, it will export the
|
|
complete database including notebooks, notes, tags and resources.
|
|
|
|
--format <format> Destination format: jex (Joplin Export File), raw
|
|
(Joplin Export Directory), md (Markdown)
|
|
--note <note> Exports only the given note.
|
|
--notebook <notebook> Exports only the given notebook.
|
|
|
|
geoloc <note>
|
|
|
|
Displays a geolocation URL for the note.
|
|
|
|
help [command]
|
|
|
|
Displays usage information.
|
|
|
|
import <path> [notebook]
|
|
|
|
Imports data into Joplin.
|
|
|
|
--format <format> Source format: auto, jex, md, raw, enex
|
|
-f, --force Do not ask for confirmation.
|
|
|
|
mkbook <new-notebook>
|
|
|
|
Creates a new notebook.
|
|
|
|
mknote <new-note>
|
|
|
|
Creates a new note.
|
|
|
|
mktodo <new-todo>
|
|
|
|
Creates a new to-do.
|
|
|
|
mv <note> [notebook]
|
|
|
|
Moves the notes matching <note> to [notebook].
|
|
|
|
ren <item> <name>
|
|
|
|
Renames the given <item> (note or notebook) to <name>.
|
|
|
|
rmbook <notebook>
|
|
|
|
Deletes the given notebook.
|
|
|
|
-f, --force Deletes the notebook without asking for confirmation.
|
|
|
|
rmnote <note-pattern>
|
|
|
|
Deletes the notes matching <note-pattern>.
|
|
|
|
-f, --force Deletes the notes without asking for confirmation.
|
|
|
|
set <note> <name> [value]
|
|
|
|
Sets the property <name> of the given <note> to the given [value].
|
|
Possible properties are:
|
|
|
|
parent_id (text), title (text), body (text), created_time (int),
|
|
updated_time (int), is_conflict (int), latitude (numeric), longitude
|
|
(numeric), altitude (numeric), author (text), source_url (text), is_todo
|
|
(int), todo_due (int), todo_completed (int), source (text),
|
|
source_application (text), application_data (text), order (int),
|
|
user_created_time (int), user_updated_time (int), encryption_cipher_text
|
|
(text), encryption_applied (int)
|
|
|
|
status
|
|
|
|
Displays summary about the notes and notebooks.
|
|
|
|
sync
|
|
|
|
Synchronises with remote storage.
|
|
|
|
--target <target> Sync to provided target (defaults to sync.target config
|
|
value)
|
|
|
|
tag <tag-command> [tag] [note]
|
|
|
|
<tag-command> can be "add", "remove" or "list" to assign or remove [tag]
|
|
from [note], or to list the notes associated with [tag]. The command `tag
|
|
list` can be used to list all the tags (use -l for long option).
|
|
|
|
-l, --long Use long list format. Format is ID, NOTE_COUNT (for notebook),
|
|
DATE, TODO_CHECKED (for to-dos), TITLE
|
|
|
|
todo <todo-command> <note-pattern>
|
|
|
|
<todo-command> can either be "toggle" or "clear". Use "toggle" to toggle
|
|
the given to-do between completed and uncompleted state (If the target is
|
|
a regular note it will be converted to a to-do). Use "clear" to convert
|
|
the to-do back to a regular note.
|
|
|
|
undone <note>
|
|
|
|
Marks a to-do as non-completed.
|
|
|
|
use <notebook>
|
|
|
|
Switches to [notebook] - all further operations will happen within this
|
|
notebook.
|
|
|
|
version
|
|
|
|
Displays version information
|
|
</code></pre>
|
|
<h1>License<a name="license" href="#license" class="heading-anchor">🔗</a></h1>
|
|
<p>Copyright (c) 2016-2019 Laurent Cozic</p>
|
|
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
|
|
<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
|
|
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
|
|
|
|
<div class="bottom-links">
|
|
<a href="https://github.com/laurent22/joplin/blob/master/readme/terminal.md">
|
|
<i class="fa fa-github"></i> Improve this doc
|
|
</a>
|
|
</div>
|
|
<script>
|
|
function stickyHeader() {
|
|
return; // Disabled
|
|
|
|
if ($(window).scrollTop() > 179) {
|
|
$('.nav').addClass('sticky');
|
|
} else {
|
|
$('.nav').removeClass('sticky');
|
|
}
|
|
}
|
|
|
|
$('#toc').hide();
|
|
|
|
$('.help').click(function(event) {
|
|
event.preventDefault();
|
|
$('#toc').show();
|
|
});
|
|
|
|
$(window).scroll(function() {
|
|
stickyHeader();
|
|
});
|
|
|
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
|
ga('create', 'UA-103586105-1', 'auto');
|
|
ga('send', 'pageview');
|
|
</script>
|
|
|
|
<div class="footer">
|
|
Copyright (c) 2016-2020 Laurent Cozic
|
|
</div>
|
|
</body>
|
|
</html>
|