diff --git a/LICENSE b/LICENSE index 91234c7..577c60b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,28 @@ # The MIT License (MIT) +*Copyright (c) 2017 Weizhou Pan(潘伟洲)* + +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. + +dingdang-robot's main project skeleton is modified from Jasper project, under +MIT License. Their copyrights are also included. + *Copyright (c) 2014-2015 Charles Marsh, Shubhro Saha & Jan Holthuis* Permission is hereby granted, free of charge, to any person obtaining a copy @@ -19,3 +42,4 @@ 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/launcher/dingdang-AutoUpdate-Launcher-for-pi-User.sh b/launcher/dingdang-AutoUpdate-Launcher-for-pi-User.sh new file mode 100644 index 0000000..ae9452a --- /dev/null +++ b/launcher/dingdang-AutoUpdate-Launcher-for-pi-User.sh @@ -0,0 +1,33 @@ +#!/bin/bash +sleep 1 + +#Delete Cache +sudo rm -r /home/pi/.cache +sudo rm -r /home/pi/.config +sudo rm -r /home/pi/.netease-musicbox +sudo rm -r /home/pi/userInfo +sleep 1 + +#AutoUpdate Before Launch +#Update dingdang-robot +cd /home/pi/dingdang +git pull + +#Update dingdang-contrib +cd /home/pi/.dingdang/contrib +git pull + +#Update dingdang-contrib Requirements +sudo pip install --upgrade -r requirements.txt +sleep 1 + +#Restore Configuration of AlsaMixer +alsactl --file=/home/pi/asound.state restore +sleep 1 + +#Launch Dingdang in LxTerminal +lxterminal -e "python /home/pi/dingdang/dingdang.py" +sleep 1 + +#Start Respeaker-Switcher in Background +sudo python /home/pi/ReSpeaker-Switcher/switcher.py & diff --git a/launcher/dingdang-AutoUpdate-Launcher-for-root-User.sh b/launcher/dingdang-AutoUpdate-Launcher-for-root-User.sh new file mode 100644 index 0000000..7e17d72 --- /dev/null +++ b/launcher/dingdang-AutoUpdate-Launcher-for-root-User.sh @@ -0,0 +1,32 @@ +#!/bin/bash +sleep 1 + +#Delete Cache +sudo rm -r /root/.cache +sudo rm -r /root/.config +sudo rm -r /root/.netease-musicbox +sudo rm -r /root/userInfo +sleep 1 + +#Update dingdang-robot +cd /home/pi/dingdang +git pull + +#Update dingdang-contrib +cd /home/pi/.dingdang/contrib +git pull + +#Update dingdang-contrib Requirements +sudo pip install --upgrade -r requirements.txt +sleep 1 + +#Restore Configuration of AlsaMixer +alsactl --file=/home/pi/asound.state restore +sleep 1 + +#Launch Dingdang in LxTerminal +sudo lxterminal -e "python /home/pi/dingdang/dingdang.py" +sleep 1 + +#Start Respeaker-Switcher in Background +sudo python /home/pi/ReSpeaker-Switcher/switcher.py & diff --git a/launcher/dingdang-Launcher.sh b/launcher/dingdang-Launcher.sh new file mode 100644 index 0000000..9c40b13 --- /dev/null +++ b/launcher/dingdang-Launcher.sh @@ -0,0 +1,17 @@ +#!/bin/bash +sleep 1 + +#Delete Cache +sudo rm -r /root/.cache +sudo rm -r /root/.config +sudo rm -r /root/.netease-musicbox +sudo rm -r /root/userInfo + +#Restore Configuration of AlsaMixer +alsactl --file=/home/pi/asound.state restore +sleep 1 + +#Start DingDang +sudo lxterminal -e "python /home/pi/dingdang/dingdang.py" +sleep 1 +sudo python /home/pi/ReSpeaker-Switcher/switcher.py &