Preparations for GitHub
This commit is contained in:
36
README.md
36
README.md
@@ -1,6 +1,7 @@
|
||||
Simple Note System
|
||||
==================
|
||||
|
||||
## About
|
||||
The Simple 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.
|
||||
@@ -27,5 +28,40 @@ was almost entirely rewritten as SNSv2.
|
||||
-l | --list : List all notes in NOTEBOOK
|
||||
-i | --init : Write default config and initalize SNS store"
|
||||
|
||||
## Installing
|
||||
To install, place `sns.sh` in your path, and copy `src/bash-completion/sns`
|
||||
to `/usr/share/bash-completion/completions/sns`.
|
||||
|
||||
Or simply run `./install.sh`.
|
||||
|
||||
To uninstall, remove the files you copied, or run `./install.sh --uninstall`
|
||||
|
||||
Once installed, SNS will require you to run `sns -i`, to indicate you would like
|
||||
to create its note store and write its default configuration.
|
||||
|
||||
By default, SNS will set itself up in `~/.config/sns`, with `~/.config/sns/sns.conf`
|
||||
as its configuration file.
|
||||
|
||||
## Configuration
|
||||
In SNS's configuration file, you can change the editor SNS uses, along with
|
||||
the date format used in notes, and whether or not to use GPG encryption.
|
||||
|
||||
**A word about encryption**: Enabling encryption will cause problems if
|
||||
previously un-encrypted notes exist. In the future, I'd like to resolve these,
|
||||
however for the time being it's best to decide when you install SNS if you'd
|
||||
like to enable encryption or not.
|
||||
|
||||
## Credits
|
||||
The majority of the code here is my own, however the bash completion
|
||||
code comes from [pass], the standard UNIX package manager, along with some
|
||||
design and feature ideas.
|
||||
|
||||
## License
|
||||
Simple Note System is licensed under the terms of the GNU General Public License
|
||||
Version 2, as detailed in `LICENSE`.
|
||||
|
||||
## Bugs
|
||||
If something seems off, or just doesn't work, please open an issue and I'll look
|
||||
into it.
|
||||
|
||||
[pass]: http://passwordstore.org
|
||||
|
||||
27
build.sh
27
build.sh
@@ -1,27 +0,0 @@
|
||||
#!/bin/bash
|
||||
#==========================================================
|
||||
# Simple Note System - Build Script
|
||||
# Copyright 2016, Xenese Labs/Sicron-Perion XNF
|
||||
#==========================================================
|
||||
|
||||
S=sns.sh
|
||||
|
||||
bash header.sh > "$S"
|
||||
echo -e "\n# Section: Functions" >> "$S"
|
||||
cat ./src/includes/init_store.sns.sh >> "$S"
|
||||
cat ./src/includes/verify_store.sns.sh >> "$S"
|
||||
cat ./src/includes/help.sns.sh >> "$S"
|
||||
cat ./src/includes/p_header.sh >> "$S"
|
||||
cat ./src/includes/libencryption.sns.sh >> "$S"
|
||||
cat ./src/includes/create.sns.sh >> "$S"
|
||||
cat ./src/includes/delete.sns.sh >> "$S"
|
||||
cat ./src/includes/edit.sns.sh >> "$S"
|
||||
cat ./src/includes/print.sns.sh >> "$S"
|
||||
cat ./src/includes/list.sns.sh >> "$S"
|
||||
printf "%s\n" "# End Section: Functions" >> "$S"
|
||||
cat ./src/main/stage1.sns.sh >> "$S"
|
||||
cat ./src/main/stage2.sns.sh >> "$S"
|
||||
cat ./src/main/stage3.sns.sh >> "$S"
|
||||
|
||||
chmod u+x "$S"
|
||||
exit
|
||||
57
install.sh
Executable file
57
install.sh
Executable file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
# Simple Note System - Install Script
|
||||
# Copyright (C) 2016, Jon Lewis
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
if [ "$1" == "--uninstall" ]; then
|
||||
rm /bin/sns
|
||||
rm /usr/share/bash-completion/completions/sns
|
||||
exit
|
||||
fi
|
||||
|
||||
mkdir build
|
||||
|
||||
S=build/sns.sh
|
||||
|
||||
bash header.sh > "$S"
|
||||
echo -e "\n# Section: Functions" >> "$S"
|
||||
cat ./src/includes/init_store.sns.sh >> "$S"
|
||||
cat ./src/includes/verify_store.sns.sh >> "$S"
|
||||
cat ./src/includes/help.sns.sh >> "$S"
|
||||
cat ./src/includes/p_header.sh >> "$S"
|
||||
cat ./src/includes/libencryption.sns.sh >> "$S"
|
||||
cat ./src/includes/create.sns.sh >> "$S"
|
||||
cat ./src/includes/delete.sns.sh >> "$S"
|
||||
cat ./src/includes/edit.sns.sh >> "$S"
|
||||
cat ./src/includes/print.sns.sh >> "$S"
|
||||
cat ./src/includes/list.sns.sh >> "$S"
|
||||
printf "%s\n" "# End Section: Functions" >> "$S"
|
||||
cat ./src/main/stage1.sns.sh >> "$S"
|
||||
cat ./src/main/stage2.sns.sh >> "$S"
|
||||
cat ./src/main/stage3.sns.sh >> "$S"
|
||||
|
||||
chmod u+x "$S"
|
||||
# Install SNS
|
||||
if [ ! -r "/bin/sns" ] || [ grep "Simple Note System" < "/bin/sns" ];
|
||||
sudo cp "$S" > "/bin/sns"
|
||||
fi
|
||||
# Install Bash completion
|
||||
if [ ! -r "/usr/share/bash-completion/completions/sns" ]\
|
||||
|| [ grep "Simple Note System" < "/usr/share/bash-completion/completions/sns" ]; then
|
||||
sudo cp "src/bash-completion/sns" >\
|
||||
"/usr/share/bash-completion/completions/sns"
|
||||
fi
|
||||
exit
|
||||
Reference in New Issue
Block a user