SNS suceeded by VNS

This commit is contained in:
Jon-William Lewis
2017-08-24 16:10:42 -05:00
parent f63bc4c908
commit e4e4718128
3 changed files with 242 additions and 292 deletions

View File

@@ -1,24 +1,25 @@
Simple Note System
Vim Note System
==================
## About
The Simple Note System is a shell script partially inspired by [pass], in that
The Vim Note System is a shell script partially inspired by [pass], in that
it stores notes as normal, plaintext, files in normal folders. It uses the
environment-specified editor, and can be configured to use GPG encryption.
vim-gnupg plugin, and asymmetric GPG encryption.
SNS was originally conceived one morning during an update to a popular note-taking
app. The thought occurred that a note system need not reinvent the wheel with
its own GUI editor and proprietary file format, but instead could use the tools
already provided by the operating system.
VNS, originally SNS, was originally conceived one morning during an update
to a popular note-taking app. The thought occurred that a note system need
not reinvent the wheel with its own GUI editor and proprietary file format,
but instead could use the tools already provided by the operating system.
As it developed, OpenSSL encryption was dropped in favor of GPG, and the script
was almost entirely rewritten as SNSv2, and rewritten again as SNS v2a.
was almost entirely rewritten as SNSv2, rewritten again as SNS v2a, and forked
as VNS 1.0.
simple note system
vim note system
==================
usage: sns [-cedlp] <notebook/section/name>
sns [-hi]
usage: vns [-cedlp] <notebook/section/name>
vns [-hi]
-c | --create : Create note
-d | --delete : Delete note
-e | --edit : Open note for editing
@@ -28,51 +29,38 @@ was almost entirely rewritten as SNSv2, and rewritten again as SNS v2a.
-p | --print : Print note to console
## Installing
### Notice:
If you are upgrading to SNS v2a from an earlier version, please move
$HOME/.config/sns to $HOME/.local/sns
To migrate from SNS, simply move
$HOME/.local/sns to $HOME/.local/vns,
then append ".gpg" to each note name, for example
`find "$HOME/.local/vns" -type f -exec mv {} {}.gpg \;`
To install, place `sns.sh` in your path,
To install, place `vns` in your path,
To uninstall, remove the files you copied. Notes will still exist in $HOME/.local/sns
To uninstall, remove the files you copied. Notes will still exist in $HOME/.local/vns
Once installed, SNS will require you to run `sns -i [gpgkey]`, to indicate you would like
Once installed, VNS will require you to run `sns -i [gpgkey]`, to indicate you would like
to create its note store and write its default configuration.
By default, SNS will set itself up in `~/.local/sns`
**A word about encryption:**
When editing an encrypted note, SNS will decrypt
the note to a temporary file inside its store. The temporary file will have a
random name, but a predictable location. It can only be read by the user and
root, and is deleted after editing, but can be recovered by forensic utilities.
SNS's encryption is mainly useful when the store is being _transferred over a
network_.
## Vim Encryption
As of SNS v2b, SNS will look for a file named .vim in its store. If found, SNS will start in Vim mode, calling Vim directly instead of the environment's $EDITOR, and using Vim's native functionality for in-place encryption.
At this time, SNS does not provide a way to convert between store formats. Additionally, SNS v2b does not support printing Vim-encrypted notes to stdout; you will need to open the note for editing and copy/paste out of Vim for the time being.
Finally, when using Vim mode, treat -c and -e separately.
Encryption is handled by the vim-gnupg plugin. By default, the plugin creates temporary files on disk to
edit GPG-encrypted files. Setting `let g:GPGUsePipes=1` in .vimrc will bypass the creation of these files,
but the plugin author warns doing so may break certain CLI-based GPG agents.
## Tips and Tricks
* To list all notes in all notebooks, use `sns -l .`
## Credits
The code here is my own, however much of SNS v2a's design and behavior was
The code here is my own, however much of VNS's design and behavior was
influenced by [pass].
## License
Simple Note System is licensed under the terms of the GNU General Public License
Vim Note System is licensed under the terms of the GNU General Public License
Version 2, as detailed in `LICENSE`.
## To Do
* Switch back to calling $EDITOR instead of vim
* implement in-place encryption (vim only)
## Bugs and Feature Requests
If something seems off, or just doesn't work, please open an issue and I'll look
into it.