Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sending metadata to Twitter account

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Blastbot



Joined: 20 Jan 2011
Posts: 37
Location: us

PostPosted: Tue May 24, 2011 6:18 pm    Post subject: sending metadata to Twitter account Reply with quote

Does anybody on here know how to send artist and title metadata to a Twitter account? If so, do you care to share?
Back to top
View user's profile Send private message
gerrit



Joined: 25 Apr 2009
Posts: 17

PostPosted: Wed May 25, 2011 2:39 pm    Post subject: Reply with quote

You can you use this xsl file to create a xml feed for
http://twitterfeed.com

twitter.xsl
Code:
<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/icestats">

<rss version="2.0">
<channel>
    <title>My Streams</title>
    <link>http://www.yourwebsite.com</link>
    <language>en-US</language>
    <pubDate></pubDate>
    <description>What is playing</description>
<xsl:for-each select="source">
    <item>
        <title><xsl:value-of select="server_name" /></title>
        <guid><xsl:value-of select="metadata_updated" /></guid>
        <link><xsl:value-of select="listenurl" /></link>
        <description><xsl:value-of select="artist" /> <xsl:value-of select="title" /></description>
    </item>
</xsl:for-each>
</channel>
</rss>
</xsl:template>

</xsl:stylesheet>


Put this file in share/icecast/web the url is the base url from your stream with /twitter.xsl behind it, or what ever name you give it.
Back to top
View user's profile Send private message
Cog



Joined: 02 Mar 2011
Posts: 18

PostPosted: Tue Nov 29, 2011 4:27 pm    Post subject: Reply with quote

Hey gerrit, this looks exactly what I am after.

Can I clarify a few things please.

you mention to put the xsl file in /share/icecast/web

my directories are set up with different names when the guy installed it. I am hoping to be able to create a feed for each of my channels and was hoping this xsl file resided in the channel folder for reference by Twitterfeed, is that not the case?

Im looking at it now and I dont see any reference to the icecast source address for all or one channel here.. so im a bit confused at the moment.

Ideally I would like it for each of my channels but I dont see it does that.

Thanks

Guy
Back to top
View user's profile Send private message
Cog



Joined: 02 Mar 2011
Posts: 18

PostPosted: Wed Nov 30, 2011 4:03 pm    Post subject: Reply with quote

OK found my web root for each stream so getting somewhere, just need a little advice on which of the above I need to change specifically for each of my streams. I see 'Youwebsite' which is obvious but not sure about the rest.

Thanks in advance
Back to top
View user's profile Send private message
gerrit



Joined: 25 Apr 2009
Posts: 17

PostPosted: Wed Nov 30, 2011 10:39 pm    Post subject: Reply with quote

It creates a "what is playing" from all the steams on the server, if you have a separate twitter account for every stream then you can't use this script
Back to top
View user's profile Send private message
gerrit



Joined: 25 Apr 2009
Posts: 17

PostPosted: Wed Nov 30, 2011 11:30 pm    Post subject: Reply with quote

This a modified version where you can select one mount

twitter.xsl:
Code:
<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/icestats">
<xsl:variable name="mountname">/mymount.ogg</xsl:variable>

<rss version="2.0">
<channel>
    <title>My Streams</title>
    <link>http://www.youseeradio.nl</link>
    <language>en-US</language>
    <pubDate></pubDate>
    <description>What is playing</description>
<xsl:for-each select="source">
    <xsl:if test="@mount=$mountname">
        <item>
            <title><xsl:value-of select="server_name" /></title>
            <guid><xsl:value-of select="metadata_updated" /></guid>
            <link><xsl:value-of select="listenurl" /></link>
            <description><xsl:value-of select="artist" /> <xsl:value-of select="title" /></description>
        </item>
    </xsl:if>
</xsl:for-each>
</channel>
</rss>
</xsl:template>

</xsl:stylesheet>


replace mymount.ogg with the mountpoint you need


Last edited by gerrit on Fri Dec 02, 2011 11:27 am; edited 1 time in total
Back to top
View user's profile Send private message
Cog



Joined: 02 Mar 2011
Posts: 18

PostPosted: Thu Dec 01, 2011 9:28 am    Post subject: Reply with quote

thank you gerrit. I appreciate it.

Guy
Back to top
View user's profile Send private message
Cog



Joined: 02 Mar 2011
Posts: 18

PostPosted: Thu Dec 01, 2011 1:07 pm    Post subject: Reply with quote

Im stuck on one thing.

Ive created an xsl file and put it under my /web directory for a channel account.

my mount name is /stream

but Ive tried a few options for my base url but its failing at twitterfeed.

Is my base url the same as the start page url plus /web/my-rss-file.xsl ?

or is it my listener url, i.e.

http://256.256.256.256/8888/live/my-rss-file.xsl ?
Back to top
View user's profile Send private message
gerrit



Joined: 25 Apr 2009
Posts: 17

PostPosted: Thu Dec 01, 2011 2:15 pm    Post subject: Reply with quote

Would be something like this

http://256.256.256.256:8888/my-rss-file.xsl

You can test it with your browser, to see what you get
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber