#!/usr/bin/expect
set transcription_hash [lindex $argv 0];
set youtube_video_id [lindex $argv 1];

# spawn ssh root@74.81.189.3 -p 6732
spawn ssh root@134.209.190.51
#expect "(yes/no)?"
#send "yes\r"
expect "assword:"
send "EJK5vh3rw2CrbrYeLHGR3X*@!qx94kXm"
send "\r"
expect "]#"

send "\r"
expect "]#"
send "\r"
expect "]#"



### ####################### LOAD THE PHP PAGE FOR FURTHER CONVERSION AND TRANSCRIPTION:

#send "/usr/bin/wget -q -O /var/www/html/_other/transcriber.wiki/_logs/transcription_engine_slave_v5_nsdb_${transcription_hash}.txt http://transcriber.wiki/_admin/transcription_engine_slave_v5.nsdb?hash=${transcription_hash}"

#send "nohup php -f /var/www/html/_other/transcriber.wiki/_admin/transcription_engine_slave_v5.nsdb ${transcription_hash} > /var/www/html/_other/transcriber.wiki/_logs/transcription_engine_slave_v5_nsdb_${transcription_hash}.txt &"

send "nohup php -f /var/www/html/_other/transcriber.wiki/_admin/transcription_engine_slave_v5.nsdb ${transcription_hash} > /var/www/html/_other/transcriber.wiki/_logs/transcription_engine_slave_v5_nsdb_${transcription_hash}.txt &"


#send "/usr/bin/wget -b -O /var/www/html/_other/transcriber.wiki/_logs/transcription_engine_slave_v5_nsdb_${transcription_hash}.txt http://transcriber.wiki/_admin/transcription_engine_slave_v5.nsdb?hash=${transcription_hash}"

send "\r"
send "\r"
send "\r"
expect "]#"
send "\r"
send "\r"
send "\r"
expect "]#"



exit 0





