You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

156 lines
4.5 KiB

#!/bin/bash
# Weather Script Configuration File. Sets up the variables used by the various weather scripts.
#
# $Id: wx_scripts.conf 85 2012-07-21 23:13:23Z $
# The weather scirpts require:
# text to speech programs -
# Festival [http://www.cstr.ed.ac.uk/projects/festival/],
# **Or**
# Cepstral Text to Speech. [http://www.cepstral.com]
#
# wget for proper operation.
#
#
# node call with spaced letters, for speech programs
CALL_SPACED="W 0 A N M"
export CALL_SPACED
# Choose the speech to text software desired. If cepstal is choosen, you must
# install the new software and configure the voice.
# Uncomment one only.
# TEXT2SPEECH=festival # Festival Text to speech sw
TEXT2SPEECH=cepstral # Cepstral Text to speech sw
# text2wave binary location for festival
TEXT2WAVEBIN=/usr/bin/text2wave
#if using Cepstral, define defualt voice below
SWIFT_DEFAULT_VOICE=David #define the voice
SWIFT_VOL=100 # Volue control for swift voice,
# volume in precentage
# location of swift binary, can also be in opt
SWIFTBIN=/opt/swift/bin/swift
# Zone information for Weather Alerts
# See WxScripts.txt documentation
ZONE=MNZ059
# NWS County Information, MNC171 plus county name for example:
# COUNTY="MNC171, Wright County"
COUNTY="NOTSET, County Name" # NWS County Information, MNC171
ICAO_STN=KCFE
# for Weather Underground Stations
WX_UNDERGRND_STN=KMNSTMIC3
# Email address to where skywarn notices will be sent. Must have email
# configured correctly. If not used, comment out option.
# EMAIL="chris@myisp.com, w0anm_73@arrl.net"
# Play Weather Alert Beacon
WXALERT_BEACON="Y" # Play weather alert message
# "C" = critical alerts only
# "Y" = yes, "N" = no
ACTIVE_PLAY="TRUE" # if TRUE, allows playing of weather
# messages when connected to other
# nodes. If not desired, change to
# "FALSE"
FULL_ALERT="N" # Alert Summary, Full or Truncated
# "Y" - Full alert info
# "N" - No (truncated)
##################################################################
# Should not need to modify the following, but just in case..
# Binary file locations
#
WGET="/usr/bin/wget"
# Directories used by weather scripts:
#
WXDIR="$AUDIO/custom/wx"
# Weather Alert Specific Variables
# Alert spool directory
WXALERT_SPOOLDIR="$WXDIR/alert" # Location for raw audio and data
# Weather Forcast Specific Variables
# Forcast spool directory
WXFOR_SPOOLDIR="$WXDIR/forecast"
######################################################################
# No editing required from this point.
######################################################################
# export Cepstral Voice
if [ "$TEXT2SPEECH" = "cepstral" ] ; then
export SWIFT_DEFAULT_VOICE
fi
# Create Spool directory (WXALERT_SPOOLDIR)
if [ ! -d $WXALERT_SPOOLDIR ] ; then
mkdir -p $WXALERT_SPOOLDIR
fi
# create spool directory if not preset
if [ ! -d $WXFOR_SPOOLDIR ] ; then
mkdir -p $WXFOR_SPOOLDIR
fi
# Setup Text to Speech command
if [ "$TEXT2SPEECH" = "festival" ] ; then
TEXT2WAVE=$TEXT2WAVEBIN
fi
if [ "$TEXT2SPEECH" = "cepstral" ] ; then
TEXT2WAVE=$SWIFTBIN
fi
# irlp common functions:
#
# description: Places the commonly used functions into one place where
# it is eay to get to. This eliminates having to place the
# commands in each script where they are used. Just need
# to source this one file to get all of its functions.
#
# history:
# 20030706 kc6hur Original release
# 20050806 kc6hur Changed "must be repeater" message
########################################################################
########################################################################
#
# Convenience functions
#
# Send message to LOGFILE
function log () {
MESSAGE="${0##*/}: $@"
echo "$MESSAGE"
if [ -n "$LOGFILE" ]; then
echo "`date '+%b %d %Y %T %z'` $MESSAGE" >> $LOGFILE
fi
}
#######################################################################
#
# Standard Script Opening
#
# Make sure we are user repeater!!!
if [ `/usr/bin/whoami` != "repeater" ] ; then
echo "${0##*/} must be run as user \"repeater\"!"
exit 1
fi
# Make sure we have sourced the environment file
if [ "$RUN_ENV" != "TRUE" ] ; then
. /home/irlp/custom/environment
fi
#
# END Common Functions

Powered by TurnKey Linux.