X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/e80eeccf22777e2226ceef7a02f4b1907c8b6f10..768c52191fabeee267767c74a5ffee452e15b05a:/rss_converter_twitter.com.xsl diff --git a/rss_converter_twitter.com.xsl b/rss_converter_twitter.com.xsl index a5f3c4b..c154141 100644 --- a/rss_converter_twitter.com.xsl +++ b/rss_converter_twitter.com.xsl @@ -21,69 +21,187 @@ + xsl:extension-element-prefixes="php" + exclude-result-prefixes="php"> - + - + https://twitter.com + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + - <xsl:value-of select="concat($user-name, ': ', $tweet-text)"/> + <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:functionString('preg_replace', '@((?<!\()(?:http[s]?://|pic.twitter.com))@', ' \1', $item-content)"/> + <!-- Also strip   and … --> + <xsl:value-of select="normalize-space(translate($processed-title, ' …', ''))"/> - + + + + - + <![CDATA[ - + + (Video) + + + ]]> - - + + + + + + + + + + + + + + - + Tweeper - <xsl:text>Twitter / </xsl:text><xsl:value-of select="$screen-name"/> + <xsl:value-of select="$channel-title"/> - + - + + + <xsl:value-of select="$channel-title"/> + + + + - + - +