<commit_before>#!/bin/bash

# Usage: slackpost <token> <channel> <message>

# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
server="192.168.3.11"
text=""

# HockeyAppDeploy
if [ "$TRAVIS_BRANCH" != "master" ]; then
	text=$text"HockeyAppDeploy{FALSE}"
else 
	text=$text"HockeyAppDeploy{TRUE}"
fi

# Amazon AWS Deploy
if [ "$DEPLOY_SERVER" != "TRUE" ]; then
	text=$text", ServerDeploy:{TRUE}"
else
	text=$text", ServerDeploy:{FALSE}"
fi

# Amazon Server Status
if nc -w 5 -z "$server" 8080 ; then
    echo "Port 22 on $server is open"
    text=$text", ServerStatus:{UP}"
else
    text="!!!ATTENTION!!!::: "$text", ServerStatus:{DOWN}Commit{"$TRAVIS_COMMIT_MESSAGE"}"
fi


token="<KEY>"
channel="#server"
escapedText=$(echo $text | sed 's/"/\"/g' | sed "s/'/\'/g" )
json="{\"text\": \"$escapedText\"}"

curl -s -d "payload=$json" $slackwebhook<commit_msg>fixed wrong presented server upload status, added commit comment to canary<commit_after>#!/bin/bash

# Usage: slackpost <token> <channel> <message>

# Enter the name of your slack host here - the thing that appears in your URL:
# https://slackhost.slack.com/
server="192.168.3.11"
text=""

# HockeyAppDeploy
if [ "$TRAVIS_BRANCH" != "master" ]; then
	text=$text"HockeyAppDeploy{FALSE}"
else 
	text=$text"HockeyAppDeploy{TRUE}"
fi

# Amazon AWS Deploy
if [ "$DEPLOY_SERVER" != "TRUE" ]; then
	text=$text", ServerDeploy:{FALSE}"
else
	text=$text", ServerDeploy:{TRUE}"
fi


# Amazon Server Status
if nc -w 5 -z "$server" 8080 ; then
    echo "Port 22 on $server is open"
    text=$text", ServerStatus:{UP}"
else
    text="!!!ATTENTION!!!::: "$text", ServerStatus:{DOWN}"
fi
text=$text+", Commit{"$TRAVIS_COMMIT_MESSAGE"}"

token="<KEY>"
channel="#server"
escapedText=$(echo $text | sed 's/"/\"/g' | sed "s/'/\'/g" )
json="{\"text\": \"$escapedText\"}"

curl -s -d "payload=$json" $slackwebhook
{'fraction_non_alphanumeric': 0.19265091863517061, 'fraction_numerical': 0.01679790026246719, 'mean_word_length': 4.937694704049845, 'pattern_counts': {'":': 2, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3498268', 'n_tokens_mistral': 737, 'n_tokens_neox': 693, 'n_words': 183}