Write notes from the command line.
git clone https://github.com/sarthakgaur/notes
cd notes
cargo build --release
- The executable is located in
target/release
- Quickly save notes from the command line.
- The notes can also be written using the editor of your choice.
- Open the note files for editing or reading.
- Add current date and time to your notes.
- Option to use templates in your notes.
- Users can choose where their notes are saved.
- List all the note and template files.
USAGE:
notes [FLAGS] [OPTIONS]
FLAGS:
-d, --date The date string will be added to the note.
-e, --edit Open the note file for editing.
-h, --help Prints help information
-l, --list List all the notes files in the notes directory.
--list-templates List all the templates files in the templates directory.
-V, --version Prints version information
OPTIONS:
-f, --file <FILE> The note file to append the note to. Default notes.txt.
-n, --note <note> The note message.
-s, --save-template <FILE> Create or update a template file.
-t, --template <FILE> Use the specified template.
- In order to use your editor for notes, set the
EDITOR
environment variable. - The
-e
,-s
,-t
options will only work ifEDITOR
is set. - If the
-n
option is not provided and no conflicting options are used, the program will do the following:- If the
EDITOR
environment variable is set, it will open your editor. - If the environment variable is not set, it will take the note from
stdin
.
- If the
- The program will create a
notes
directory in yourHOME
directory by default. - You can change the
notes
directory location by changing it in the config file. - The config file's path is
~/.config/notes/config.toml
.
The config file is located at ~/.config/notes/config.toml
. It includes the following content:
# Specify the absolute path of the notes parent directory.
#
# Example usage:
# notes_parent_dir = "/home/john/Documents/"
#
# This will create the directory "/home/john/Documents/notes"
notes_parent_dir = "/home/john"
Here you can change the notes
directory location.
Command: notes -f test.txt -n "First note" -d
This command will add "First note"
to the text.txt
file. The note will also include the current date and time.