| View previous topic :: View next topic |
| Author |
Message |
Blastbot
Joined: 20 Jan 2011 Posts: 37 Location: us
|
Posted: Tue May 24, 2011 6:18 pm Post subject: sending metadata to Twitter account |
|
|
| 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 |
|
 |
gerrit
Joined: 25 Apr 2009 Posts: 17
|
Posted: Wed May 25, 2011 2:39 pm Post subject: |
|
|
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 |
|
 |
Cog
Joined: 02 Mar 2011 Posts: 18
|
Posted: Tue Nov 29, 2011 4:27 pm Post subject: |
|
|
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 |
|
 |
Cog
Joined: 02 Mar 2011 Posts: 18
|
Posted: Wed Nov 30, 2011 4:03 pm Post subject: |
|
|
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 |
|
 |
gerrit
Joined: 25 Apr 2009 Posts: 17
|
Posted: Wed Nov 30, 2011 10:39 pm Post subject: |
|
|
| 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 |
|
 |
gerrit
Joined: 25 Apr 2009 Posts: 17
|
Posted: Wed Nov 30, 2011 11:30 pm Post subject: |
|
|
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 |
|
 |
Cog
Joined: 02 Mar 2011 Posts: 18
|
Posted: Thu Dec 01, 2011 9:28 am Post subject: |
|
|
thank you gerrit. I appreciate it.
Guy |
|
| Back to top |
|
 |
Cog
Joined: 02 Mar 2011 Posts: 18
|
Posted: Thu Dec 01, 2011 1:07 pm Post subject: |
|
|
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 |
|
 |
gerrit
Joined: 25 Apr 2009 Posts: 17
|
|
| Back to top |
|
 |
|