mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-26 18:58:21 +02:00
Doc: Update CLI doc
This commit is contained in:
parent
b44a2075a8
commit
52d9807648
@ -15,6 +15,10 @@ class Command extends BaseCommand {
|
|||||||
return 'Build the API doc';
|
return 'Build the API doc';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enabled() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
createPropertiesTable(tableFields) {
|
createPropertiesTable(tableFields) {
|
||||||
const headers = [
|
const headers = [
|
||||||
{ name: 'name', label: 'Name' },
|
{ name: 'name', label: 'Name' },
|
||||||
|
@ -19,11 +19,18 @@ class Command extends BaseCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enabled() {
|
enabled() {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
options() {
|
options() {
|
||||||
return [['-n, --limit <num>', _('Displays only the first top <num> notes.')], ['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')], ['-r, --reverse', _('Reverses the sorting order.')], ['-t, --type <type>', _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')], ['-f, --format <format>', _('Either "text" or "json"')], ['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')]];
|
return [
|
||||||
|
['-n, --limit <num>', _('Displays only the first top <num> notes.')],
|
||||||
|
['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')],
|
||||||
|
['-r, --reverse', _('Reverses the sorting order.')],
|
||||||
|
['-t, --type <type>', _('Displays only the items of the specific type(s). Can be `n` for notes, `t` for to-dos, or `nt` for notes and to-dos (eg. `-tt` would display only the to-dos, while `-ttd` would display notes and to-dos.')],
|
||||||
|
['-f, --format <format>', _('Either "text" or "json"')],
|
||||||
|
['-l, --long', _('Use long list format. Format is ID, NOTE_COUNT (for notebook), DATE, TODO_CHECKED (for to-dos), TITLE')],
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async action(args) {
|
async action(args) {
|
||||||
|
@ -257,126 +257,185 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
value of [name]. If neither [name] nor [value] is provided, it will list
|
value of [name]. If neither [name] nor [value] is provided, it will list
|
||||||
the current configuration.
|
the current configuration.
|
||||||
|
|
||||||
-v, --verbose Also displays unset and hidden config variables.
|
-v, --verbose Also displays unset and hidden config variables.
|
||||||
|
--export Writes all settings to STDOUT as JSON including
|
||||||
|
secure variables.
|
||||||
|
--import Reads in JSON formatted settings from STDIN.
|
||||||
|
--import-file <file> Reads in settings from <file>. <file> must contain
|
||||||
|
valid JSON.
|
||||||
|
|
||||||
Possible keys/values:
|
Possible keys/values:
|
||||||
|
|
||||||
locale Language.
|
sync.target Synchronisation target.
|
||||||
Type: Enum.
|
The target to synchonise to. Each sync
|
||||||
Possible values: eu (Basque), ca (Catalan), hr_HR
|
target may have additional parameters which
|
||||||
(Croatian), cs_CZ (Czech), da_DK (Dansk), de_DE
|
are named as `sync.NUM.NAME` (all
|
||||||
(Deutsch), en_GB (English), es_ES (Español),
|
documented below).
|
||||||
fr_FR (Français), gl_ES (Galician), it_IT
|
Type: Enum.
|
||||||
(Italiano), nl_NL (Nederlands), nl_BE
|
Possible values: 2 (File system), 3
|
||||||
(Nederlands), nb_NO (Norwegian), pt_BR (Português
|
(OneDrive), 4 (OneDrive Dev (For testing
|
||||||
(Brasil)), ro (Română), sl_SI (Slovenian), sv
|
only)), 5 (Nextcloud), 6 (WebDAV), 7
|
||||||
(Svenska), ru_RU (Русский), zh_CN (中文 (简体)),
|
(Dropbox).
|
||||||
zh_TW (中文 (繁體)), ja_JP (日本語), ko (한국말).
|
Default: 7
|
||||||
Default: "en_GB"
|
|
||||||
|
sync.2.path Directory to synchronise with (absolute
|
||||||
dateFormat Date format.
|
path).
|
||||||
Type: Enum.
|
Attention: If you change this location,
|
||||||
Possible values: DD/MM/YYYY (30/01/2017),
|
make sure you copy all your content to it
|
||||||
DD/MM/YY (30/01/17), MM/DD/YYYY (01/30/2017),
|
before syncing, otherwise all files will be
|
||||||
MM/DD/YY (01/30/17), YYYY-MM-DD (2017-01-30),
|
removed! See the FAQ for more details:
|
||||||
DD.MM.YYYY (30.01.2017), YYYY.MM.DD (2017.01.30).
|
https://joplinapp.org/faq/
|
||||||
Default: "DD/MM/YYYY"
|
Type: string.
|
||||||
|
|
||||||
timeFormat Time format.
|
sync.5.path Nextcloud WebDAV URL.
|
||||||
Type: Enum.
|
Attention: If you change this location,
|
||||||
Possible values: HH:mm (20:30), h:mm A (8:30 PM).
|
make sure you copy all your content to it
|
||||||
Default: "HH:mm"
|
before syncing, otherwise all files will be
|
||||||
|
removed! See the FAQ for more details:
|
||||||
uncompletedTodosOnTop Uncompleted to-dos on top.
|
https://joplinapp.org/faq/
|
||||||
Type: bool.
|
Type: string.
|
||||||
Default: true
|
|
||||||
|
sync.5.username Nextcloud username.
|
||||||
showCompletedTodos Show completed to-dos.
|
Type: string.
|
||||||
Type: bool.
|
|
||||||
Default: true
|
sync.5.password Nextcloud password.
|
||||||
|
Type: string.
|
||||||
notes.sortOrder.field Sort notes by.
|
|
||||||
Type: Enum.
|
sync.6.path WebDAV URL.
|
||||||
Possible values: user_updated_time (Updated
|
Attention: If you change this location,
|
||||||
date), user_created_time (Created date), title
|
make sure you copy all your content to it
|
||||||
(Title).
|
before syncing, otherwise all files will be
|
||||||
Default: "user_updated_time"
|
removed! See the FAQ for more details:
|
||||||
|
https://joplinapp.org/faq/
|
||||||
notes.sortOrder.reverse Reverse sort order.
|
Type: string.
|
||||||
Type: bool.
|
|
||||||
Default: true
|
sync.6.username WebDAV username.
|
||||||
|
Type: string.
|
||||||
trackLocation Save geo-location with notes.
|
|
||||||
Type: bool.
|
sync.6.password WebDAV password.
|
||||||
Default: true
|
Type: string.
|
||||||
|
|
||||||
sync.interval Synchronisation interval.
|
sync.maxConcurrentConnections Max concurrent connections.
|
||||||
Type: Enum.
|
Type: int.
|
||||||
Possible values: 0 (Disabled), 300 (5 minutes),
|
Default: 5
|
||||||
600 (10 minutes), 1800 (30 minutes), 3600 (1
|
|
||||||
hour), 43200 (12 hours), 86400 (24 hours).
|
locale Language.
|
||||||
Default: 300
|
Type: Enum.
|
||||||
|
Possible values: ar (Arabic (92%)), eu
|
||||||
editor Text editor command.
|
(Basque (39%)), bs_BA (Bosnian (85%)),
|
||||||
The editor command (may include arguments) that
|
bg_BG (Bulgarian (77%)), ca (Catalan
|
||||||
will be used to open a note. If none is provided
|
(61%)), hr_HR (Croatian (32%)), cs_CZ
|
||||||
it will try to auto-detect the default editor.
|
(Czech (94%)), da_DK (Dansk (85%)), de_DE
|
||||||
Type: string.
|
(Deutsch (100%)), et_EE (Eesti Keel (76%)),
|
||||||
|
en_GB (English (UK) (100%)), en_US (English
|
||||||
sync.target Synchronisation target.
|
(US) (100%)), es_ES (Español (95%)), eo
|
||||||
The target to synchronise to. Each sync target may
|
(Esperanto (44%)), fr_FR (Français (95%)),
|
||||||
have additional parameters which are named as
|
gl_ES (Galician (50%)), it_IT (Italiano
|
||||||
`sync.NUM.NAME` (all documented below).
|
(97%)), nl_BE (Nederlands (39%)), nl_NL
|
||||||
Type: Enum.
|
(Nederlands (97%)), nb_NO (Norwegian
|
||||||
Possible values: 2 (File system), 3 (OneDrive), 4
|
(89%)), fa (Persian (38%)), pl_PL (Polski
|
||||||
(OneDrive Dev (For testing only)), 5 (Nextcloud),
|
(75%)), pt_PT (Português (91%)), pt_BR
|
||||||
6 (WebDAV), 7 (Dropbox).
|
(Português (Brasil) (88%)), ro (Română
|
||||||
Default: 7
|
(39%)), sl_SI (Slovenian (49%)), sv
|
||||||
|
(Svenska (68%)), tr_TR (Türkçe (92%)),
|
||||||
sync.2.path Directory to synchronise with (absolute path).
|
el_GR (Ελληνικά (93%)), ru_RU (Русский
|
||||||
The path to synchronise with when file system
|
(95%)), sr_RS (српски језик (75%)), zh_CN
|
||||||
synchronisation is enabled. See `sync.target`.
|
(中文 (简体) (97%)), zh_TW (中文 (繁體) (91%)),
|
||||||
Type: string.
|
ja_JP (日本語 (97%)), ko (한국말 (97%)).
|
||||||
|
Default: "en_GB"
|
||||||
sync.5.path Nextcloud WebDAV URL.
|
|
||||||
Attention: If you change this location, make sure
|
dateFormat Date format.
|
||||||
you copy all your content to it before syncing,
|
Type: Enum.
|
||||||
otherwise all files will be removed! See the FAQ
|
Possible values: DD/MM/YYYY (30/01/2017),
|
||||||
for more details: https://joplinapp.org/faq/
|
DD/MM/YY (30/01/17), MM/DD/YYYY
|
||||||
Type: string.
|
(01/30/2017), MM/DD/YY (01/30/17),
|
||||||
|
YYYY-MM-DD (2017-01-30), DD.MM.YYYY
|
||||||
sync.5.username Nextcloud username.
|
(30.01.2017), YYYY.MM.DD (2017.01.30).
|
||||||
Type: string.
|
Default: "DD/MM/YYYY"
|
||||||
|
|
||||||
sync.5.password Nextcloud password.
|
timeFormat Time format.
|
||||||
Type: string.
|
Type: Enum.
|
||||||
|
Possible values: HH:mm (20:30), h:mm A
|
||||||
sync.6.path WebDAV URL.
|
(8:30 PM).
|
||||||
Attention: If you change this location, make sure
|
Default: "HH:mm"
|
||||||
you copy all your content to it before syncing,
|
|
||||||
otherwise all files will be removed! See the FAQ
|
uncompletedTodosOnTop Uncompleted to-dos on top.
|
||||||
for more details: https://joplinapp.org/faq/
|
Type: bool.
|
||||||
Type: string.
|
Default: true
|
||||||
|
|
||||||
sync.6.username WebDAV username.
|
showCompletedTodos Show completed to-dos.
|
||||||
Type: string.
|
Type: bool.
|
||||||
|
Default: true
|
||||||
sync.6.password WebDAV password.
|
|
||||||
Type: string.
|
notes.sortOrder.field Sort notes by.
|
||||||
|
Type: Enum.
|
||||||
net.customCertificates Custom TLS certificates.
|
Possible values: user_updated_time (Updated
|
||||||
Comma-separated list of paths to directories to
|
date), user_created_time (Created date),
|
||||||
load the certificates from, or path to individual
|
title (Title).
|
||||||
cert files. For example: /my/cert_dir,
|
Default: "user_updated_time"
|
||||||
/other/custom.pem. Note that if you make changes
|
|
||||||
to the TLS settings, you must save your changes
|
notes.sortOrder.reverse Reverse sort order.
|
||||||
before clicking on "Check synchronisation
|
Type: bool.
|
||||||
configuration".
|
Default: true
|
||||||
Type: string.
|
|
||||||
|
folders.sortOrder.field Sort notebooks by.
|
||||||
net.ignoreTlsErrors Ignore TLS certificate errors.
|
Type: Enum.
|
||||||
Type: bool.
|
Possible values: title (Title),
|
||||||
Default: false
|
last_note_user_updated_time (Updated date).
|
||||||
|
Default: "title"
|
||||||
|
|
||||||
|
folders.sortOrder.reverse Reverse sort order.
|
||||||
|
Type: bool.
|
||||||
|
Default: false
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
sync.wipeOutFailSafe Fail-safe: Do not wipe out local data when
|
||||||
|
sync target is empty (often the result of a
|
||||||
|
misconfiguration or bug).
|
||||||
|
Type: bool.
|
||||||
|
Default: true
|
||||||
|
|
||||||
|
|
||||||
|
revisionService.enabled Enable note history.
|
||||||
|
Type: bool.
|
||||||
|
Default: true
|
||||||
|
|
||||||
|
revisionService.ttlDays Keep note history for.
|
||||||
|
Type: int.
|
||||||
|
Default: 90
|
||||||
|
|
||||||
cp <note> [notebook]
|
cp <note> [notebook]
|
||||||
|
|
||||||
@ -390,13 +449,14 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
e2ee <command> [path]
|
e2ee <command> [path]
|
||||||
|
|
||||||
Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`,
|
Manages E2EE configuration. Commands are `enable`, `disable`, `decrypt`,
|
||||||
`status` and `target-status`.
|
`status`, `decrypt-file` and `target-status`.
|
||||||
|
|
||||||
-p, --password <password> Use this password as master password (For
|
-p, --password <password> Use this password as master password (For
|
||||||
security reasons, it is not recommended to use
|
security reasons, it is not recommended to use
|
||||||
this option).
|
this option).
|
||||||
-v, --verbose More verbose output for the `target-status`
|
-v, --verbose More verbose output for the `target-status`
|
||||||
command
|
command
|
||||||
|
-o, --output <directory> Output directory
|
||||||
|
|
||||||
edit <note>
|
edit <note>
|
||||||
|
|
||||||
@ -408,7 +468,9 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
complete database including notebooks, notes, tags and resources.
|
complete database including notebooks, notes, tags and resources.
|
||||||
|
|
||||||
--format <format> Destination format: jex (Joplin Export File), raw
|
--format <format> Destination format: jex (Joplin Export File), raw
|
||||||
(Joplin Export Directory), md (Markdown)
|
(Joplin Export Directory), json (Json Export
|
||||||
|
Directory), md (Markdown), html (HTML File), html
|
||||||
|
(HTML Directory)
|
||||||
--note <note> Exports only the given note.
|
--note <note> Exports only the given note.
|
||||||
--notebook <notebook> Exports only the given notebook.
|
--notebook <notebook> Exports only the given notebook.
|
||||||
|
|
||||||
@ -424,9 +486,27 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
|
|
||||||
Imports data into Joplin.
|
Imports data into Joplin.
|
||||||
|
|
||||||
--format <format> Source format: auto, jex, md, raw, enex
|
--format <format> Source format: auto, jex, md, raw, enex, enex
|
||||||
-f, --force Do not ask for confirmation.
|
-f, --force Do not ask for confirmation.
|
||||||
|
|
||||||
|
ls [note-pattern]
|
||||||
|
|
||||||
|
Displays the notes in the current notebook. Use `ls /` to display the list
|
||||||
|
of notebooks.
|
||||||
|
|
||||||
|
-n, --limit <num> Displays only the first top <num> notes.
|
||||||
|
-s, --sort <field> Sorts the item by <field> (eg. title, updated_time,
|
||||||
|
created_time).
|
||||||
|
-r, --reverse Reverses the sorting order.
|
||||||
|
-t, --type <type> Displays only the items of the specific type(s).
|
||||||
|
Can be `n` for notes, `t` for to-dos, or `nt` for
|
||||||
|
notes and to-dos (eg. `-tt` would display only the
|
||||||
|
to-dos, while `-ttd` would display notes and
|
||||||
|
to-dos.
|
||||||
|
-f, --format <format> Either "text" or "json"
|
||||||
|
-l, --long Use long list format. Format is ID, NOTE_COUNT (for
|
||||||
|
notebook), DATE, TODO_CHECKED (for to-dos), TITLE
|
||||||
|
|
||||||
mkbook <new-notebook>
|
mkbook <new-notebook>
|
||||||
|
|
||||||
Creates a new notebook.
|
Creates a new notebook.
|
||||||
@ -459,6 +539,15 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
|
|
||||||
-f, --force Deletes the notes without asking for confirmation.
|
-f, --force Deletes the notes without asking for confirmation.
|
||||||
|
|
||||||
|
server <command>
|
||||||
|
|
||||||
|
Start, stop or check the API server. To specify on which port it should
|
||||||
|
run, set the api.port config variable. Commands are (start|stop|status).
|
||||||
|
This is an experimental feature - use at your own risks! It is recommended
|
||||||
|
that the server runs off its own separate profile so that no two CLI
|
||||||
|
instances access that profile at the same time. Use --profile to specify
|
||||||
|
the profile path.
|
||||||
|
|
||||||
set <note> <name> [value]
|
set <note> <name> [value]
|
||||||
|
|
||||||
Sets the property <name> of the given <note> to the given [value].
|
Sets the property <name> of the given <note> to the given [value].
|
||||||
@ -470,7 +559,7 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
(int), todo_due (int), todo_completed (int), source (text),
|
(int), todo_due (int), todo_completed (int), source (text),
|
||||||
source_application (text), application_data (text), order (int),
|
source_application (text), application_data (text), order (int),
|
||||||
user_created_time (int), user_updated_time (int), encryption_cipher_text
|
user_created_time (int), user_updated_time (int), encryption_cipher_text
|
||||||
(text), encryption_applied (int)
|
(text), encryption_applied (int), markup_language (int), is_shared (int)
|
||||||
|
|
||||||
status
|
status
|
||||||
|
|
||||||
@ -485,9 +574,10 @@ The following commands are available in [command-line mode](#command-line-mode):
|
|||||||
|
|
||||||
tag <tag-command> [tag] [note]
|
tag <tag-command> [tag] [note]
|
||||||
|
|
||||||
<tag-command> can be "add", "remove" or "list" to assign or remove [tag]
|
<tag-command> can be "add", "remove", "list", or "notetags" to assign or
|
||||||
from [note], or to list the notes associated with [tag]. The command `tag
|
remove [tag] from [note], to list notes associated with [tag], or to list
|
||||||
list` can be used to list all the tags (use -l for long option).
|
tags associated with [note]. 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),
|
-l, --long Use long list format. Format is ID, NOTE_COUNT (for notebook),
|
||||||
DATE, TODO_CHECKED (for to-dos), TITLE
|
DATE, TODO_CHECKED (for to-dos), TITLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user