This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
Sincan2
Voice
Posts: 3 Joined: Wed Jan 15, 2014 5:19 pm
Post
by Sincan2 » Wed Jan 15, 2014 5:38 pm
I have code
Code: Select all
bind pub -|- !qe3 yotube
proc yotube {nick uhost hand chan text} {
set yotube [exec /home/sincan2/qe3.sh]
foreach line [split $youtube \n] {
puthelp "PRIVMSG $chan :$line"
}
}
Code: Select all
sincan2@sincan2-sg-develop:~$ ./qe3.sh http://www.youtube.com/watch?v=ryV-Iwd1DTc
donwload by Sincan2 2014
[youtube] Setting language
[youtube] ryV-Iwd1DTc: Downloading webpage
[youtube] ryV-Iwd1DTc: Downloading video info webpage
[youtube] ryV-Iwd1DTc: Extracting video information
[download] Destination: Raisa - Mantan Terindah-ryV-Iwd1DTc.mp4
[download] 100% of 4.48MiB in 00:00
[avconv] Destination: Raisa - Mantan Terindah-ryV-Iwd1DTc.mp3
Deleting original file Raisa - Mantan Terindah-ryV-Iwd1DTc.mp4 (pass -k to keep)
sincan2@sincan2-sg-develop:~$
form MIRC
<@Sincan2> !qe3
http://www.youtube.com/watch?v=ryV-Iwd1DTc
error TCL
[05:32:25] Tcl error [yotube]: donwload by Sincan2 2014
Usage: youtube-dl [options] url [url...]
youtube-dl: error: you must provide at least one URL
help me
many thanks
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Thu Jan 16, 2014 1:42 am
The error is self explanatory, shouldn't you provide a link to the qe3.sh to check?
Hint:
Code: Select all
set youtube [exec /home/sincan2/qe3.sh [split $text]]
Edit: fixed typo.
Last edited by
caesar on Wed Jan 22, 2014 2:33 am, edited 1 time in total.
Once the game is over, the king and the pawn go back in the same box.
Sincan2
Voice
Posts: 3 Joined: Wed Jan 15, 2014 5:19 pm
Post
by Sincan2 » Thu Jan 16, 2014 9:53 am
qe3.sh <<< bot error bash script this run normaly
Code: Select all
sincan2@sincan2-sg-develop:~/bot$ cat scripts/4.tcl
bind pub -|- !qe3 yotube
proc yotube {nick uhost hand chan text} {
set yotube [exec /home/sincan2/qe3.sh [split $text]]
foreach line [split $youtube \n] {
puthelp "PRIVMSG $chan :$line"
}
}
sincan2@sincan2-sg-develop:~/bot$
<@Sincan2> !qe3
http://www.youtube.com/watch?v=abwCVwviBdU
Code: Select all
[21:59:17] Tcl error [yotube]: can't read "youtube": no such variable
This scripts qe3.sh
Code: Select all
sincan2@sincan2-sg-develop:~$ cat qe3.sh
#!/bin/bash
echo "donwload by Sincan2 2014"
#url $1
sleep 1
youtube-dl $1 -t -x --audio-format "mp3"
mv *.mp3 /home/sincan2/mp3
chown -R sincan2:sincan2 /home/sincan2/mp3
exit 0
}
sincan2@sincan2-sg-develop:~$
Sincan2
Voice
Posts: 3 Joined: Wed Jan 15, 2014 5:19 pm
Post
by Sincan2 » Tue Jan 21, 2014 2:35 pm
Help Me........
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Wed Jan 22, 2014 2:32 am
There's a typo in this line:
Code: Select all
set yotube [exec /home/sincan2/qe3.sh [split $text]]
It's wrong in the first post too. Hint:
yotube .
Once the game is over, the king and the pawn go back in the same box.