Terminai

From Futuragora Wiki
Jump to: navigation, search

Codename: terminai

Servidor: futuragora.pt

O terminai é um sistema integrado de monitorização e controle informático dos sistemas da futuragora. Permite para além de monitorização, activar e automatizar processos actualmente manuais. Escrito em bash e liguagens de programação bash, python, java, php, mysql.

Metodo de programacao: GIT *falta criar o git


Acessos:

Web SSH: 4200 *shell in a box*

Acesso web: http://dev.futuragora.pt:4200

Colaboração

ambiente screen:

Entrar no screen: screen -x terminaiedit #modo de edicao colaborativa


TERMINAI SERVER

Menu A 1) help 2) quit 3) venus 4) futuragora 5) web 6) tools 7) webadmin

Menu B - futuragora

Menu C - web

Menu D - tools

Menu E - webadmin


TERMINAI APP


Script Design: *actualizar 1) Help 2) Quit 3) BioRio > ./biorio.sh 4) Venus > venusdev.sh 5) Telehack > 6) Web > 7) Games > ./games.sh 8) System Tools > 9) Webadmin 10) Junior

Files

hi.mp3 svn-commit.4.tmp venusdev.shbiorio.sh kill9.sh svn-commit.5.tmp venus-falante.shcalc.sh myip.sh svn-commit.tmp venusg1.shdev.sh mylocation.sh terminai_server.sh venusgdev.shdig.sh output.mp3 terminai.sh venusg.sh games ping.sh timer.sh venus.sh games.sh README.txt tools.sh vpn.sh gg.sh scan.sh top.sh webadmin.sh google.sh server_monitor.sh traceroute.sh web.shgtop10.sh svn-commit.2.tmp tts_local.sh whois.sh hawkings.sh svn-commit.3.tmp venusa.sh wikisearch.sh

.

elif [ "$options" = "biorio" ]; then echo "Escolheu a option $options" ./biorio.sh


elif [ "$options" = "telehack" ]; then echo "Escolheu a option $options"echo "Connecting to telehack.com ..........."sleep 3 telnet telehack.com

Venus AIML no Terminai

#!/bin/bash
# venus.sh google search before venus.
echo "Venus Virtual Assistant v 0.1.2 (teste PT)"
while : 
do echo -n "User: "  #get user input
read text
command=${text%% *} gquery=${text#* }
search="procura"
echo -n "Venus: "
if [ $command  == $search ] # split user input on function reply or search
then
echo "Google Top10 Results:"
GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&amp' | sed 's/\/url?q=//;s/&amp//'); echo -e "${stream//\%/\x}"
else
reply=$(curl -s -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) #get chatbot response
echo $reply
fi
done
  1. !/bin/bash
    1. This program is intended to be a terminal virtual assistant with
    2. text to speech, websearch and automation function. It is based on

echo "Venus Virtual Assistant v 0.1.2"

    1. SALUTATION

echo -n "Venus: " hi=$(curl -s -d "botid=Venus&text=oi" http://dev.futuragora.pt:2001) echo $hi wget -q -U Mozilla -O ./hi.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${hi}" mplayer -quiet hi.mp3 > /dev/null 2>&1

    1. LOOP

while : do echo -n "User: " #get user input read text command=${text%% *} gquery=${text#* } search="procura" echo -n "Venus: " if [ $command == $search ] # split user input on function reply or search then echo "Google Top10 Results:" GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&amp' | sed 's/\/url?q=//;s/&amp//'); echo -e "${stream//\%/\x}" else reply=$(curl -s -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) #get chatbot response echo $reply wget -q -U Mozilla -O ./output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${reply}" mplayer -quiet output.mp3 > /dev/null 2>&1 # audio output fi done



"Venus Virtual Assistant"

while : do echo -n "User: " read text

command=${text%% *} gquery=${text#* } search="procura"

if [ $command == $search ] then echo match GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&amp' | sed 's/\/url?q=//;s/&amp//'); echo -e "${stream//\%/\x}" fi

echo -n "Venus: " reply=$(curl -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) echo "" echo $reply wget -q -U Mozilla -O ./output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${reply}" mplayer -quiet output.mp3 > /dev/null 2>&1 done


Venus falante com procura (LOCAL)

  1. !/bin/bash

echo "Venus Virtual Assistant" while : do echo -n "User: " read text command=${text%% *} gquery=${text#* } search="procura" if [ $command == $search ] then echo match GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&amp' | sed 's/\/url?q=//;s/&amp//'); echo -e "${stream//\%/\x}" else echo -n "Venus: " reply=$(curl -s -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) echo "" echo $reply wget -q -U Mozilla -O ./output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${reply}" mplayer -quiet output.mp3 > /dev/null 2>&1

fi done

venus com procura server

  1. !/bin/bash

echo "Venus Virtual Assistant Server" while : do echo -n "User: " read text command=${text%% *} gquery=${text#* } search="procura" if [ $command == $search ] then echo match GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&amp' | sed 's/\/url?q=//;s/&amp//'); echo -e "${stream//\%/\x}" else echo -n "Venus: " reply=$(curl -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) echo "" echo $reply fi done </pre>