Procházet zdrojové kódy

Add static sound. Add predefined announcements and helper scripts.

master
Dejvino před 3 roky
rodič
revize
ccc5c82dba
11 změnil soubory, kde provedl 72 přidání a 1 odebrání
  1. +5
    -0
      bin/megaton_radio.sh
  2. +4
    -0
      bin/pipe_announcement
  3. +9
    -0
      bin/schedule_announcement
  4. +9
    -0
      bin/schedule_emergency
  5. +26
    -0
      bin/schedule_meeting
  6. +4
    -0
      bin/schedule_meeting_announcement
  7. +4
    -0
      bin/schedule_meeting_emergency
  8. +5
    -0
      bin/start_announcement_server
  9. +4
    -0
      bin/submit_announcement
  10. +2
    -1
      sounds/README.md
  11. binární
      sounds/static.ogg

+ 5
- 0
bin/megaton_radio.sh Zobrazit soubor

@@ -0,0 +1,5 @@
#!/bin/bash

VOL=25

mplayer "http://us2.internet-radio.com:8443/;stream" -cache 1024 -cache-min 20 -volume $VOL -softvol -channels 2 -af pan=1:0.5:0.5

+ 4
- 0
bin/pipe_announcement Zobrazit soubor

@@ -0,0 +1,4 @@
#!/bin/bash

mosquitto_pub -t vault/psa/announcement -l


+ 9
- 0
bin/schedule_announcement Zobrazit soubor

@@ -0,0 +1,9 @@
#!/bin/bash

TIME=$1
shift
at "$TIME" <<EOT
cd ~/build/vault-announcer/bin
./announce-freeform "$@"
EOT


+ 9
- 0
bin/schedule_emergency Zobrazit soubor

@@ -0,0 +1,9 @@
#!/bin/bash

TIME=$1
shift
at "$TIME" <<EOT
cd ~/build/vault-announcer/bin
./emergency-freeform "$@"
EOT


+ 26
- 0
bin/schedule_meeting Zobrazit soubor

@@ -0,0 +1,26 @@
#!/bin/bash

function time_minus_minutes() {
time="$1"
change="$2"

difference=$(($change * 60))
result=$(( $(date -d "$time" "+%s") - $difference ))

echo `date -d "@$result" "+%H:%M"`
}

TYPE=$1
shift
TARGET=$1
shift
SLACK=5
TIME=`time_minus_minutes "$TARGET" "$SLACK"`

NAME="$@"

MSG="Meeting in $SLACK minutes. ... Meeting '$NAME' in $SLACK minutes."
#echo "Scheduling $TYPE for meeting '$NAME' at $TARGET in $SLACK minutes in advance, at $TIME."
~/schedule_${TYPE} "$TIME" "$MSG"


+ 4
- 0
bin/schedule_meeting_announcement Zobrazit soubor

@@ -0,0 +1,4 @@
#!/bin/bash

~/schedule_meeting announcement $@


+ 4
- 0
bin/schedule_meeting_emergency Zobrazit soubor

@@ -0,0 +1,4 @@
#!/bin/bash

~/schedule_meeting emergency $@


+ 5
- 0
bin/start_announcement_server Zobrazit soubor

@@ -0,0 +1,5 @@
#!/bin/bash

cd ~/build/vault-announcer/bin/
mosquitto_sub -t vault/psa/announcement | ./announcement-server


+ 4
- 0
bin/submit_announcement Zobrazit soubor

@@ -0,0 +1,4 @@
#!/bin/bash

mosquitto_pub -t vault/psa/announcement -m "$@"


+ 2
- 1
sounds/README.md Zobrazit soubor

@@ -6,4 +6,5 @@
* Source: [freesound.org](https://freesound.org/people/chimerical/sounds/105228/)
* `alarm_simple.ogg`
* Source: [freesound.org](https://freesound.org/people/Suburbanwizard/sounds/440307/)

* `static.ogg`
* Source: [freesound.org](https://freesound.org/people/Jay_You/sounds/384090/)

binární
sounds/static.ogg Zobrazit soubor


Načítá se…
Zrušit
Uložit