notes - manages note files.
COMMAND: notes [-s section] -a[!][e] name [file ...][-] -a[!]+[e] name [file ...][-]
-e[a] {name|pattern} -v[a] {name|pattern} -p[a] {name|pattern} -l [pattern]
-f pattern -d[a] {name|pattern} -r oldname newname -c rcfile
The notes-files are stored in a user-defined directory with optional subdirectories.
The subdirectories in the application are named sections.
Normally this directory is ~/.notes or ~/Nextcloud/Notes if there is Nextcloud.
It can be specified in the configuration file.
The files can be plain text, markdown or anything else that can configured
by the rule command in the configuration file.
If the note is - then it reads from stdin.
Running program without arguments, enters in TUI mode (ncurses interface).
The program was designed to behave as the man command:
# show page(s) of section (i.e. subdirectory) 'unix'
# whose title begins with 'sig11'
$ notes -s unix sig11
# search and show notes for a title with patterns
$ notes '*sig*'
Notes naming used in forms, a) just title, b) section/title, c) title.type, d) section/title.type. We can edit, view, move, rename, etc by using any of these forms.
Creates a new note file. If file extension is not specified then the default will be used (see notesrc 5).
If additional files are specified in the command line, their contents will be inserted into the new note.
Use it with -e to invoke the editor or - to get input from stdin.
If the name is already used in this section, then an error will be issued;
use ! option to replace the existing file,
or set the clobber variable to false in the configuration file.
# example 1: cat yyy zzz > xxx
$ notes -a xxx yyy zzz
# example 2:
$ cat ~/.notesrc | notes -a! notesrc -
Same as -a but instead of overwriting, the new note is appended to the file.
If the name does not exist, then an error will be issued;
use ! option to create it,
or set the clobber variable to false in the configuration file.
Shows the note with the default $PAGER if one is not specified in the configuration file.
$ cat -v about-groff
Same as -v but writes the contents to stdout.
Loads the note to the default $EDITOR if one is not specified in the configuration file.
Also, it can be used with --add/--append if it is next to it.
Displays the notes names that match pattern.
Same as -l but prints out the full-path filenames.
Deletes a note.
Renames and/or moves a note. A second parameter is required to specify the new
name. If file extension is specified in the new name, then it will use it.
rename can also change the section if separated by '/' before the name,
e.g., section3/new-name.
Displays all notes that were found; it works together with -v, -p, -e, and -d.
Do not use it as first option because it means --add.
Displays a short help text and exits.
Read this rcfile for setting notes options, instead of reading the default user's notesrc file.
Displays the program version, copyright and license information and exits.
Executes the command defined by onstart in the configuration file
and returns its exit code.
This option is useful when custom synchronization is needed.
Executes the command defined by onexit in the configuration file
and returns its exit code.
This option is useful when custom synchronization is needed.
The SHELL, EDITOR and PAGER environment variables are used.
The directory of notes. Usually used to pass this information to shell.
The list of selected files to process. Usually used to pass this information to shell.
If set, the default pager for notes.
If set, the default editor for notes.
If set, the default backup directory.
When --rcfile is given,
notes will read the specified file for setting its options and key bindings.
Without that option, notes will read the user's notesrc (if it exists),
either $XDG_CONFIG_HOME/notes/notesrc or ~/.config/notes/notesrc
or ~/.notesrc, whichever is encountered first.
See notesrc 5.
Copyright © 2020-2022 Nicholas Christopoulos.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Nicholas Christopoulos nereus@freemail.gr.