dnote/pkg/cli/COMMANDS.md
Sung Won Cho 23a511dbe0
Improve package structure (#207)
* Improve package structure

* Set up travis
2019-06-25 19:20:19 +10:00

107 lines
1.5 KiB
Markdown

# Commands
- [add](#dnote-add)
- [view](#dnote-view)
- [edit](#dnote-edit)
- [remove](#dnote-remove)
- [find](#dnote-find)
- [sync](#dnote-sync)
- [login](#dnote-login)
- [logout](#dnote-logout)
## dnote add
_alias: a, n, new_
Add a new note to a book.
```bash
# Launch a text editor to add a new note to the specified book.
dnote add linux
# Write a new note with a content to the specified book.
dnote add linux -c "find - recursively walk the directory"
```
## dnote view
_alias: v_
- List books or notes.
- View a note detail.
```bash
# List all books.
dnote view
# List all notes in a book.
dnote view golang
# See details of a note
dnote view 12
```
## dnote edit
_alias: e_
Edit a note.
```bash
# Launch a text editor to edit a note with the given id.
dnote edit 12
# Edit a note with the given id in the specified book with a content.
dnote edit 12 -c "New Content"
```
## dnote remove
_alias: d_
Remove either a note or a book.
```bash
# Remove the note with an id in the specified book.
dnote remove 1
# Remove the book with the `book name`.
dnote remove -b JS
```
## dnote find
_alias: f_
Find notes by keywords.
```bash
# find notes by a keyword
dnote find rpoplpush
# find notes by multiple keywords
dnote find "building a heap"
# find notes within a book
dnote find "merge sort" -b algorithm
```
## dnote sync
_Dnote Pro only_
_alias: s_
Sync notes with Dnote server. All your data is encrypted before being sent to the server.
## dnote login
_Dnote Pro only_
Start a login prompt.
## dnote logout
_Dnote Pro only_
Log out of Dnote.