diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 9d5944b..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Jaysin - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index 67c1b1e..0000000 --- a/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Zen -Zen messenger randomly constructs **random** messages to **random** people in **random** groups. - -Script should be run at random times to express thoughtfulness and consideration. - -### Instillation Procedure - -1. Download the script -```bash -sudo wget https://github.com/j-lord/zen/raw/master/zen.sh -```` -2. Make the script executable -```bash -chmod u+x zen.sh -``` -3. If using Mac OS -You'll be ready to exacute. -```bash -./zen.sh -``` -[[https://github.com/j-lord/zen/master/zenExample1.jpg|alt=octocat]] - - -4. If on PC or Linux -Open zen.sh comment out the last chuck of code for osascript instructions and pick a messaging technique. diff --git a/Terminal.jpg b/Terminal.jpg new file mode 100644 index 0000000..3ca7b14 Binary files /dev/null and b/Terminal.jpg differ diff --git a/zen.sh b/zen.sh deleted file mode 100644 index 2c25fbd..0000000 --- a/zen.sh +++ /dev/null @@ -1,198 +0,0 @@ -##################################################################### -# * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * # -# | | # -# | Stay calm, Remain relaxed | # -# | | # -# | #### #### Keep ZEN | # -# | ###### ###### | # -# | ######## ######## | # -# | ################# | # -# | ################# | # -# | ############### | # -# | ############# | # -# | ########## This script was crafted using the | # -# | ######## finest Itanian leather | # -# | ###### | # -# | #### ... and love | # -# | ## | # -# | # | # -# | # | # -# | | # -# * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * # -##################################################################### - -# If on Mac, change MY_NUMBER, group names, and group numbers. -# make file exacutable - -#!/bin/bash -MY_NUMBER="+13334567777" -scriptName=zen.sh -# -# GROUPS, NAMES, and NUMBERS (like a sudo map) -ladies=("Amy":"+123" "Brittany":"+234" "Dana":"+345" "Lisa":"+456") -family=("Gma":"+987" "Mom":"+876" "Dad":"+765" "Aunt Sandy":"+654") -mates=("Dominic":"+111" "Jeremy":"+222" "Thomas":"+333" "Matt":"+444") -number_of_groups=3 -# group 0=ladies 1=family 2=mates -# -# gounp_name=("Name":"+countryCodePhone_number" "Name"...and so on) -# -# to add a group, add info here under the last group and -# advance number_of_groups + 1 - -############# Pick random Group and random Person ############# -target_group=$[ RANDOM % number_of_groups ] - -if [ $target_group -eq 0 ]; then - person_index=$[$RANDOM % ${#ladies[@]}]; - target_name=${ladies[person_index]}; -elif [ $target_group -eq 1 ]; then - person_index=$[$RANDOM % ${#family[@]}]; - target_name=${family[person_index]}; -elif [ $target_group -eq 2 ]; then - person_index=$[$RANDOM % ${#mates[@]}]; - target_name=${mates[person_index]}; -# . -# . -# elif [ $target_group -eq N ]; then -# person_index=$[$RANDOM % ${#GROUPNAME[@]}]; -# target_name=${GROUPNAME[person_index]}; -else - echo "Error!" - echo "Make sure you really have ${number_of_groups} groups?" -fi -############################################################### - -name=${target_name%%:*} # information preceding colon -> name: -number=${target_name#*:} # information following colon -> :number - -################### Messsage database ####################### -# Current hour -hourNow="$(date +%H)"; - -# shell will interpret hourNow as an octal number (with leading 0) -# to avoid this, remove the leading zero using parameter expansion. -hourNow=${hourNow#0} - -# add all time depended variable here -if (( hourNow >= 6 )) && (( hourNow < 12 )); then - time_of_day="morning"; HHH="have"; GGG="is"; TTT="tonight"; - - elif (( hourNow >= 12 )) && (( hourNow <= 17 )); then - time_of_day="afternoon";HHH="are having"; GGG="is going"; TTT="later"; - - elif (( hourNow >= 17 )) && (( hourNow <= 0 )); then - time_of_day="evening"; HHH="had"; GGG="has been"; TTT=""; -fi -# this assumes no messages will be sent from 12 midnight to 6:00 am - -# Will be working on building a larger message database -ladies_start=( "Good $time_of_day" "Hey $name" "What's up $name," - "I've been thinking about you all $time_of_day," "Just wanted to tell you" - "I just texted to say" ) -ladies_end=( "I miss you." "I hope that you ${HHH} a great day." - "I hope that your day ${GGG} great." "you're really great, I hope you know that." - "I can't wait to see you." ) -family_start=( "Good $time_of_day" "Hey $name" "I've been meaning to call you" ) -family_end=( "I hope all has been well at home." - "I will be home later next month love you." "let's talk sometime next week, are you free any time?" ) -# male punctuation use tends to be more so grammerically inconsistent -mates_start=("Good day sir" "Hey" "What's up" "Yo") -mates_end=("what's going on $TTT" "what are you doing later?" - "are we going out tonight?" "how's everything been going.") -################################################################# - -################# Build random message ######################### -messageCode=$target_group; -# generate message beginning and ending -# wanted to simply state beginning=$[ $RANDOM % ${#random_group[@]} ]; -# but I was unable to find an elegant solution to a bash-type 2D array -if [ $messageCode -eq 0 ]; then - - begining=$[ $RANDOM % ${#ladies_start[@]} ]; - endning=$[ $RANDOM % ${#ladies_end[@]} ]; - # assigns begining/ending index - - random_beginning=${ladies_start[$begining]}; - random_ending=${ladies_end[$endning]}; - # assigns begining/ending message - -elif [ $messageCode -eq 1 ]; then - - begining=$[ $RANDOM % ${#family_start[@]} ]; - endning=$[ $RANDOM % ${#family_end[@]} ]; - - random_beginning=${family_start[$begining]}; - random_ending=${family_end[$endning]}; - -elif [ $messageCode -eq 2 ]; then - - begining=$[ $RANDOM % ${#mates_start[@]} ]; - endning=$[ $RANDOM % ${#mates_end[@]} ]; - - random_beginning=${mates_start[$begining]}; - random_ending=${mates_end[$endning]}; -else - echo "Error!" - echo "Make sure you really have ${number_of_groups} groups?" -fi - -sentence="${random_beginning} ${random_ending}" -#the space between beginning ^ and ending puts the space between the two -# parts of the sentences this is by far the most important space to have ever existed. -################################################################## - -########## The Following Takes advantage of Apple's osascript ########## -#### This will work only if you are on a mac and logged into your iCloud account - osascript < number format +15556667777 -# curl -X POST 'https://api.twilio.com/2010-04-01/Accounts/ACCOUNTNUMBER/Messages.json' \ -# --data-urlencode "To=$number" \ -# --data-urlencode "From=$MY_NUMBER" \ -# --data-urlencode "Body=${sentence}" \ -# -u ACba25802cbbd29f1ec807f26a429abfcc:AUTHORIZATIONTOKEN <-- get from site - -# Twilio pros: Complete abstraction, absolute flexability -# cons: there is a fee but its only $1.00 a month + $0.0075 per message -# 50 messages a week would cost ($1.00 + $0.0075*200) = $2.50 / month -# https://www.twilio.com/sms/pricing - -# 2. Using textbelt --> number format 5556667777 - -# curl -X POST http://textbelt.com/text \ -# -d number=${MY_NUMBER} \ -# -d "message=${sentence}" - -# textbelt pros: Quick and effortless -# cons: messages look HORRIBLE. If the goal is complete abstraction -# this is not your choice. Its better for sending reminders or -# notifications to yourself -# http://textbelt.com/#sthash.mtXpg60r.dpuf - -# 3. using Apple Script (If on mac) -# directions above -# Apple Script pros: complete intergration of the system along with -# notification plane. Take advantage of the ability to send iMessages. -# cons: can only be used on Mac. diff --git a/zen1.png b/zen1.png new file mode 100644 index 0000000..b47c81d Binary files /dev/null and b/zen1.png differ diff --git a/zen2.png b/zen2.png new file mode 100644 index 0000000..df0fd61 Binary files /dev/null and b/zen2.png differ diff --git a/zen3.png b/zen3.png new file mode 100644 index 0000000..15960e6 Binary files /dev/null and b/zen3.png differ diff --git a/zen4.png b/zen4.png new file mode 100644 index 0000000..5f9316e Binary files /dev/null and b/zen4.png differ