feat: add -c/--config flag to every command
This commit is contained in:
parent
570c29d9f1
commit
6f45b76579
10 changed files with 163 additions and 51 deletions
38
README.md
38
README.md
|
|
@ -1,17 +1,43 @@
|
|||
# halig
|
||||
|
||||
[(r)age](https://github.com/woodruffw/pyrage) encrypted note-taking CLI app
|
||||

|
||||

|
||||

|
||||
[](https://pdm.fming.dev)
|
||||
|
||||
## install
|
||||
[(R)age](https://github.com/woodruffw/pyrage) encrypted note-taking CLI app.
|
||||
|
||||
`halig` opens, using your favorite `$EDITOR`, an in-memory copy of a file and upon save-and-exit,
|
||||
it encrypts the new contents into an [age](https://github.com/FiloSottile/age) file that
|
||||
you can store, _relatively_ safe, anywhere.
|
||||
|
||||
## Install
|
||||
|
||||
```shell
|
||||
pip install halig
|
||||
```
|
||||
|
||||
## cli mode
|
||||
PS: I recommend using [pipx](https://pypa.github.io/pipx/) instead
|
||||
|
||||
## Setup TLDR
|
||||
|
||||
```shell
|
||||
$ halig edit some_notebook # edit today's note
|
||||
$ halig edit some_notebook/foo # edit /path/to/some_notebook/foo.age
|
||||
$ halig notebooks # list current notebooks
|
||||
set -e
|
||||
ssh-keygen -t ed25519
|
||||
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/halig"
|
||||
cat << EOF > "${XDG_CONFIG_HOME:-$HOME/.config}/halig/halig.yml"
|
||||
---
|
||||
notebooks_root_path: /home/$(id -un)/Documents/Notebooks
|
||||
identity_path: /home/$(id -un)/.ssh/id_ed25519
|
||||
recipient_path: /home/$(id -un)/.ssh/id_ed25519.pub
|
||||
EOF
|
||||
```
|
||||
|
||||
## Usage TLDR
|
||||
|
||||
```shell
|
||||
halig edit some_notebook # edit today's note relative to <notebooks_root_path>/some_notebook
|
||||
halig edit some_notebook/foo # edit <notebooks_root_path>/some_notebook/foo.age
|
||||
halig notebooks # list current notebooks
|
||||
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue