debian/changelog: release package version 1.4.0-1
[tweeper.git] / src / rss_converter_twitter.com.xsl
index b59a97b..1c20e70 100644 (file)
@@ -25,6 +25,7 @@
 
     <xsl:param name="generate-enclosure"/>
     <xsl:param name="show-usernames"/>
+    <xsl:param name="show-multimedia"/>
 
     <xsl:output method="xml" indent="yes"/>
 
          too instead of the t.co redirections.
     -->
     <xsl:template match="a[@data-pre-embedded='true']">
-        <!-- Prepend and append a white space for aestethic reasons -->
-        <xsl:text> </xsl:text>
-        <a>
-            <xsl:attribute name="href">
+        <xsl:if test="$show-multimedia = 1">
+            <!-- Prepend and append a white space for aestethic reasons -->
+            <xsl:text> </xsl:text>
+            <a>
+                <xsl:attribute name="href">
+                    <xsl:value-of select="concat('https://', .)"/>
+                </xsl:attribute>
                 <xsl:value-of select="concat('https://', .)"/>
-            </xsl:attribute>
-            <xsl:value-of select="concat('https://', .)"/>
-        </a>
-        <xsl:text> </xsl:text>
+            </a>
+            <xsl:text> </xsl:text>
+        </xsl:if>
     </xsl:template>
 
     <!-- Present images in a more convenient way -->
                     <xsl:attribute name="style">white-space: pre-wrap;</xsl:attribute>
                     <xsl:apply-templates select="$item-content/node()"/>
                 </xsl:element>
-                <xsl:apply-templates select="$item-media/node()"/>
+                <xsl:if test="$show-multimedia = 1">
+                    <xsl:apply-templates select="$item-media/node()"/>
+                </xsl:if>
                 <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
             </description>
             <xsl:if test="$generate-enclosure = 1">