diff --git a/README.md b/README.md index 7984fd9..2cfb451 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,31 @@ Simple Note System ================== -The Simple Note System is a shell script enabling easy management of plain-text -notes. SNS depends on GPG for encryption and uses the vim editor by default. +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. - usage: sns [-ce] NAME NOTEBOOK SECTION" - sns [-d ] NAME NOTEBOOK SECTION" - sns [-lp] NOTEBOOK" - sns [-w ]" - sns [-h ]" +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. - -c | --create : Create note" - -d | --delete : Delete note" - -e | --edit : Open note for editing" - -h | --help : Display this message" - -p | --print : Print note to console" - -l | --list : List all notes in NOTEBOOK" - -i | --init : Write default config and initalize SNS store" +As it developed, OpenSSL encryption was dropped in favor of GPG, and the script +was almost entirely rewritten as SNSv2. + + simple note system + ================== + + usage: sns [-cedp] NAME NOTEBOOK SECTION + sns [-l] NOTEBOOK + sns [-hi] + -c | --create : Create note + -d | --delete : Delete note + -e | --edit : Open note for editing + -h | --help : Display this message + -p | --print : Print note to console + -l | --list : List all notes in NOTEBOOK + -i | --init : Write default config and initalize SNS store" + + +[pass]: http://passwordstore.org diff --git a/sns.xcodeproj/project.xcworkspace/xcuserdata/xilmwa.xcuserdatad/UserInterfaceState.xcuserstate b/sns.xcodeproj/project.xcworkspace/xcuserdata/xilmwa.xcuserdatad/UserInterfaceState.xcuserstate index c97975e..df0db65 100644 Binary files a/sns.xcodeproj/project.xcworkspace/xcuserdata/xilmwa.xcuserdatad/UserInterfaceState.xcuserstate and b/sns.xcodeproj/project.xcworkspace/xcuserdata/xilmwa.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/src/main/stage2.sns.sh b/src/main/stage2.sns.sh index ed56a34..10cbc02 100644 --- a/src/main/stage2.sns.sh +++ b/src/main/stage2.sns.sh @@ -15,7 +15,7 @@ elif [ "$ARG" = "-p" ] || [ "$ARG" = "--print" ]; then PRINT="TRUE"; OP="TRUE" elif [ "$ARG" = "-l" ] || [ "$ARG" = "--list" ]; then LIST="TRUE"; OP="TRUE" elif [ "$ARG" = "-h" ] || [ "$ARG" == "--help" ]; then help; exit 0 - elif [ "$ARG" = "-i" ] || [ "$ARG" == "--init" ]; then init_store; exit 0 + elif [ "$ARG" = "-i" ] || [ "$ARG" == "--init" ]; then init_store; exit 0 else if [ -z "$NAME" ] && [ -n "$ARG" ]; then NAME="$ARG" elif [ -z "$NOTEBOOK" ] && [ -n "$ARG" ]; then NOTEBOOK="$ARG" diff --git a/src/main/stage3.sns.sh b/src/main/stage3.sns.sh index a0a1adf..673b184 100644 --- a/src/main/stage3.sns.sh +++ b/src/main/stage3.sns.sh @@ -17,11 +17,11 @@ if [ "$LIST" == TRUE ]; then list exit 0 - elif [ -z "$NAME" ]; + elif [ -z "$NAME" ]; then printf "\n%s\n %s\n" "ERROR: Insufficient arguments:" "Notebook not specified" exit 30 fi - + NOTE_DIR="$NOTES_DIR"/"$NOTEBOOK"/"$SECTION"