projects
/
tweeper.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e944fa
)
rss_converter_twitter.com.xsl: generate enclosure for images
author
Antonio Ospite <ao2@ao2.it>
Fri, 20 May 2016 12:04:03 +0000
(14:04 +0200)
committer
Antonio Ospite <ao2@ao2.it>
Fri, 20 May 2016 13:03:41 +0000
(15:03 +0200)
rss_converter_twitter.com.xsl
patch
|
blob
|
history
diff --git
a/rss_converter_twitter.com.xsl
b/rss_converter_twitter.com.xsl
index
dbbc537
..
857cf31
100644
(file)
--- a/
rss_converter_twitter.com.xsl
+++ b/
rss_converter_twitter.com.xsl
@@
-107,6
+107,10
@@
<xsl:copy-of select="php:function('Tweeper::generateEnclosure', string(./@data-expanded-url))"/>
</xsl:template>
<xsl:copy-of select="php:function('Tweeper::generateEnclosure', string(./@data-expanded-url))"/>
</xsl:template>
+ <xsl:template match="div[@data-image-url]" mode="enclosure">
+ <xsl:copy-of select="php:function('Tweeper::generateEnclosure', string(concat(./@data-image-url, ':orig')))"/>
+ </xsl:template>
+
<xsl:variable name="screen-name" select="//div[@class='user-actions btn-group not-following ']/@data-screen-name"/>
<xsl:template match="//li[@data-item-id and @data-item-type='tweet']">
<xsl:variable name="screen-name" select="//div[@class='user-actions btn-group not-following ']/@data-screen-name"/>
<xsl:template match="//li[@data-item-id and @data-item-type='tweet']">
@@
-155,6
+159,7
@@
</description>
<xsl:if test="$generate-enclosure = 1">
<xsl:apply-templates select="$item-content//a[@data-expanded-url]" mode="enclosure"/>
</description>
<xsl:if test="$generate-enclosure = 1">
<xsl:apply-templates select="$item-content//a[@data-expanded-url]" mode="enclosure"/>
+ <xsl:apply-templates select="$item-media//div[@data-image-url]" mode="enclosure"/>
</xsl:if>
</item>
</xsl:template>
</xsl:if>
</item>
</xsl:template>