<commit_before>#!/bin/sh

cd '/Volumes/Media/iTunes/Music/Morning Automation/Morning Automation'
AUX_FILE=/tmp/speech-script.txt

long_speach ()
{
  TIME=`date +%k:%M`
  DATE=`date +'%A %B %e, %Y'`
  echo "Good morning, time to wake up! It's $TIME on $DATE." > script.txt
  echo >> script.txt
  echo "Your custom weather forecast for Lafayette Colorado." >> script.txt
  echo >> script.txt
  sh ~/Develop/pmade/rc/macosx/scripts/weather/weather.sh >> script.txt
  echo >> script.txt
  
  if [ -r $AUX_FILE ]; then
    cat $AUX_FILE >> script.txt
    cat /dev/null > $AUX_FILE
  fi
}

short_speach ()
{
  TIME=`date +%k:%M`
  echo "The time is now $TIME" > script.txt
}

if [ x$1 = xtime ]; then
  short_speach
else
  long_speach
fi

say -f script.txt -o 'Morning Time.aiff'
cat <<EOF | osascript
tell application "iTunes"
  set the_volume to (get sound volume)

  repeat while the_volume > 0
    set i to the_volume - 5
    if i < 0 then set i to 0
    set sound volume to i
    set the_volume to i
    delay 1
  end repeat

  stop
  set sound volume to 70
  play playlist "Morning Energy"
end tell
EOF
<commit_msg>Changed the location of my iTunes directory<commit_after>#!/bin/sh

cd '/Volumes/AV RAID/iTunes/Music/Morning Automation/Morning Automation'
AUX_FILE=/tmp/speech-script.txt

long_speach ()
{
  TIME=`date +%k:%M`
  DATE=`date +'%A %B %e, %Y'`
  echo "Good morning, time to wake up! It's $TIME on $DATE." > script.txt
  echo >> script.txt
  echo "Your custom weather forecast for Lafayette Colorado." >> script.txt
  echo >> script.txt
  sh ~/Develop/pmade/rc/macosx/scripts/weather/weather.sh >> script.txt
  echo >> script.txt
  
  if [ -r $AUX_FILE ]; then
    cat $AUX_FILE >> script.txt
    cat /dev/null > $AUX_FILE
  fi
}

short_speach ()
{
  TIME=`date +%k:%M`
  echo "The time is now $TIME" > script.txt
}

if [ x$1 = xtime ]; then
  short_speach
else
  long_speach
fi

say -f script.txt -o 'Morning Time.aiff'
cat <<EOF | osascript
tell application "iTunes"
  set the_volume to (get sound volume)

  repeat while the_volume > 0
    set i to the_volume - 5
    if i < 0 then set i to 0
    set sound volume to i
    set the_volume to i
    delay 1
  end repeat

  stop
  set sound volume to 70
  play playlist "Morning Energy"
end tell
EOF

{'fraction_non_alphanumeric': 0.11582670203359859, 'fraction_numerical': 0.007073386383731211, 'mean_word_length': 3.070143884892086, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7044899', 'n_tokens_mistral': 894, 'n_tokens_neox': 826, 'n_words': 275}