https://github.com/synox/diary
simple gpg-encrypted diary
https://github.com/synox/diary
Last synced: about 1 year ago
JSON representation
simple gpg-encrypted diary
- Host: GitHub
- URL: https://github.com/synox/diary
- Owner: synox
- License: unlicense
- Created: 2015-02-12T17:08:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-01-17T07:29:15.000Z (over 9 years ago)
- Last Synced: 2025-04-06T16:39:53.281Z (about 1 year ago)
- Language: Shell
- Size: 10.7 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# encrypted diary
This collection of simple bash scripts provide an easy way to write confidential notes with strong encryption. It uses asymetric GnuPG for encryption, therefore you can write entries without entering the gpg password. You only have to decrypt (and enter your key-password) when you actually want to read something.
Hint: Can be combined mit https://github.com/synox/secret-letterbox
# setup (on osx)
* brew install fswatch
* install GnuPG (https://gpgtools.org/)
* create a new GPG key only for this purpose (choose a strong passphrase!)
* add the scripts to your `PATH`.
# configuration
You have to configure some variables with your ``.bash_profile`` (or edit the source files). bash example:
```bash
export DIARY_KEYID=1234567
export DIARY_EDITOR=/Applications/Mou.app/Contents/MacOS/Mou
export DIARY_DIRECTORY=/home/joe/diary
export DIARY_READER=subl
```
fishshell example:
```bash
set -x DIARY_KEYID 1234567
set -x DIARY_EDITOR /Applications/Mou.app/Contents/MacOS/Mou
set -x DIARY_DIRECTORY /home/joe/diary
set -x DIARY_READER subl
```
# usage
## write an entry (add)
use ``diary-add`` which reads stdin:
```bash
echo my first entry | diary-add
diary-add < notes.html
diary-add
my first entry
```
`diary-add-hidden` is just like `diary-add`, but without echoing what you type.
or you can attach a file
```bash
diary-add /home/john/photo.jpg
```
## edit encrypted entry
use ``diary-edit`` to open gpg-file in a fancy text/markdown editor. When saving, the content is automatically encrypted again.
```bash
diary-edit path/to/file.txt.gpg
```
or use the vim gpg plugin: https://github.com/jamessan/vim-gnupg
```bash
vi path/to/file.txt.gpg
```
## decrypt one entry console
``diary-print`` simply prints an entry to stdout.
```bash
diary-print path/to/file.txt.gpg
```
## read all entries
``diary-read-all`` decrypts all entries and prints in $DIARY_READER. It used `gpg2` for to use the gpg-agent on OSX. The implementation can be changed with the environment variable `GPG_CMD`.
```bash
diary-read-all
```
----
### similar projects
There are a few similar projects. I didn't use them because I want the scripts to be short and validatable.
* https://github.com/matthiasbeyer/diary.sh/
* https://github.com/colinux/GPG-Editor/blob/master/GPG-Editor.sh
* https://github.com/almien1/NoPeeking
Articles:
* http://abesto.net/journaling-for-geeks/