add initial support for enclosures
[tweeper.git] / rss_converter_twitter.com.xsl
index 45e148d..c7f03c2 100644 (file)
         <xsl:variable name="tweet-text" select=".//p[@class='js-tweet-text tweet-text']"/>
         <item>
             <title>
         <xsl:variable name="tweet-text" select=".//p[@class='js-tweet-text tweet-text']"/>
         <item>
             <title>
-                <xsl:value-of select="concat($screen-name, ': ')"/>
-                <xsl:value-of select="$tweet-text"/>
+                <xsl:value-of select="concat($screen-name, ': ', $tweet-text)"/>
             </title>
             <link>
             </title>
             <link>
-                <xsl:value-of select="$twitterBaseURL"/><xsl:value-of select=".//a[@class='details with-icn js-details']/@href"/>
+                <xsl:value-of select="concat($twitterBaseURL, .//a[@class='details with-icn js-details']/@href)"/>
             </link>
             <pubDate>
                 <xsl:value-of select="php:functionString('epoch_to_gmdate', .//small[@class='time']//span/@data-time)"/>
             </link>
             <pubDate>
                 <xsl:value-of select="php:functionString('epoch_to_gmdate', .//small[@class='time']//span/@data-time)"/>
@@ -50,6 +49,7 @@
                 <xsl:copy-of select="$tweet-text/node()"/>
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
             </description>
                 <xsl:copy-of select="$tweet-text/node()"/>
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
             </description>
+            <xsl:value-of disable-output-escaping="yes" select="php:function('generate_enclosure', string(.//a[@class='twitter-timeline-link']/@data-expanded-url))"/>
         </item>
     </xsl:template>
 
         </item>
     </xsl:template>