X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/5c8599142d25a8a9f9cbd4ecb4b0ea114c46bc93..4d0c6538de56b9404c7a3dbf84106f64db4e1058:/rss_converter_twitter.com.xsl diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index 15507f0..857cf31 100644 --- a/rss_converter_twitter.com.xsl +++ b/rss_converter_twitter.com.xsl @@ -24,7 +24,7 @@ xsl:extension-element-prefixes="php" exclude-result-prefixes="php"> - + @@ -32,8 +32,83 @@ https://twitter.com + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -41,10 +116,26 @@ + + + - <xsl:value-of select="concat($user-name, ': ', $item-content)"/> + <xsl:value-of select="concat($user-name, ': ')"/> + <xsl:if test="$item-has-video"> + <xsl:text>(Video) </xsl:text> + </xsl:if> + <!-- + Prepend a space in front of the URLs which are not + preceded by an open parenthesis, for aestethic reasons. + Also, regex, I know: http://xkcd.com/1171/ + --> + <xsl:variable + name="processed-title" + select="php:function('preg_replace', '@((?<!\()(?:http[s]?://|pic.twitter.com))@', ' \1', string($item-content))"/> + <!-- Also strip   and … --> + <xsl:value-of select="normalize-space(translate($processed-title, ' …', ''))"/> @@ -54,16 +145,21 @@ - + <![CDATA[ - + + (Video) + + + ]]> - - + + + @@ -102,7 +198,7 @@ - +