Formatting of code : You can (and must) use [ tcl ] an [ /tcl ] tags (without spaces in tags) to format your TCL codes and have syntax coloration x

Spotify/Soundcloud tcl
hi all,

is there any tcl script that gets the music from spotify or soundcloud and relay it to the irc channel?

thank you in advance.
Not sure to understand. What do you want to relay exactly ?
I don't know how spotify or soundclound works, but I doubt you can have a feed with the actual music you're listening - Offrez-moi un café
Merci de ne pas demander d'aide en MP
yes @ CrazyCat i mean to feed it in the irc channel based on your music collection in soundcloud or spotify.
As previously said, I don't know/use spotify nor soundcloud, so you have to provide urls of the feeds, or to the API documentation) if you want some help. - Offrez-moi un café
Merci de ne pas demander d'aide en MP
@ CrazyCat please take a look at this link below;

Soundclound API:

hope this works..
it takes a little autonomy and research on your part, trying to work on the beginning of the script, and when you get stuck on a part, we can help you.
here, i found this from the other forum.

# spotify.tcl
# by doggo #omgwtfnzbs@EFNET

set logo "\002\00300,03 Spotify \017"

proc spotify:announce {nick uhost hand chan text} {
global logo

   if {[channel get $chan spotify] != 1 } { return }           

   if {[regexp -nocase {[A-Za-z0-9]+)} $text match spotify]} {

   set html [spotify:getdata "$spotify"]
   regexp -nocase {<meta property="og:description" content="(.*?), a song by\s(.*?)\son Spotify." />} $html match title artist

   if {![info exists title]} {
   putlog "\[spotify\] unable to get title/artist info from:$spotify"
   } else {
   putlog "\[spotify\] fetching:$spotify"
   puthelp "privmsg $chan :$logo $artist - $title"

proc spotify:getdata {data} {
   ::http::config -useragent "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.8.1) Gecko/2006101023 Firefox/2.0"
   set url [::http::geturl $data -timeout 5000]
   set source_code [::http::data $url]
   ::http::cleanup $source_code
   return $source_code

package require http
setudef flag spotify
bind pubm -|- "% **" spotify:announce

putlog "spotify.tcl loaded!"

i tried it in my bot.. but nothing happen.

If we can start here.. a big thanks to all of you.
This seems to be a really old script as it doesn't use https.
And if I well understand, the way is to have a script which will retrieve spotify or soundcloud urls given by users in a channel and display info about the track/playlist ?

Your initial post wasn't clear. - Offrez-moi un café
Merci de ne pas demander d'aide en MP
sorry about that @ CrazyCat if it is not clear..

this is similar to mp3.tcl but it will get the data from spotify or soundcloud.
Well, mp3.tcl is just an anti-idle announcing random title from a list, nothing similar to any thing which can be done with the spotify or soundcloud API.
the API allows to get info about a particular playlist or track, and the script you show us do the same: it reacts to a spotify url and (when working) returns info about this specified track. - Offrez-moi un café
Merci de ne pas demander d'aide en MP

Forum Jump:

Users browsing this thread: 1 Guest(s)