X-Git-Url: https://git.ao2.it/tweeper.git/blobdiff_plain/e825e4202ca664beca2b41cc2b5ff51fbee81996..cd0835d56d8c7ab3f5c78df71b183f87148d8f88:/src/rss_converter_instagram.com.xsl diff --git a/src/rss_converter_instagram.com.xsl b/src/rss_converter_instagram.com.xsl index 58cc19c..2d54f3d 100644 --- a/src/rss_converter_instagram.com.xsl +++ b/src/rss_converter_instagram.com.xsl @@ -1,7 +1,7 @@ - + - + - - - + @@ -60,14 +58,14 @@ - - - - + + + + <xsl:variable name="title-length" select="140"/> - <xsl:variable name="item-content-title" select="normalize-space(concat($user-name, ': ', $item-content-caption))"/> + <xsl:variable name="item-content-title" select="normalize-space(concat($screen-name, ': ', $item-content-caption))"/> <!-- ellipsize, inspired from http://stackoverflow.com/questions/13622338 --> <xsl:choose> <xsl:when test="string-length($item-content-title) > $title-length"> @@ -87,7 +85,7 @@ <xsl:value-of select="$item-permalink"/> </guid> <pubDate> - <xsl:variable name="timestamp" select="./date"/> + <xsl:variable name="timestamp" select="./taken_at_timestamp"/> <xsl:value-of select="php:functionString('Tweeper\Tweeper::epochToRssDate', $timestamp)"/> </pubDate> <description> @@ -113,7 +111,7 @@ <xsl:variable name="channel-link"> <xsl:choose> <xsl:when test="$location-name != ''"> - <xsl:variable name="location-id" select="//LocationsPage/location/id"/> + <xsl:variable name="location-id" select="//LocationsPage/graphql/location/id"/> <xsl:value-of select="concat($BaseURL, '/explore/locations/', $location-id)"/> </xsl:when> <xsl:otherwise> @@ -121,6 +119,7 @@ </xsl:otherwise> </xsl:choose> </xsl:variable> + <xsl:variable name="channel-image" select="//ProfilePage/graphql/user/profile_pic_url"/> <rss version="2.0"> <xsl:attribute name="xml:base"><xsl:value-of select="$BaseURL" /></xsl:attribute> @@ -135,24 +134,31 @@ <description> <xsl:text disable-output-escaping="yes"><![CDATA[</xsl:text> <xsl:value-of select="normalize-space(concat($screen-name, '. ', //user/biography))"/> + <xsl:if test="$location-name != ''"> + <xsl:variable name="location-latitude" select="//LocationsPage/graphql/location/lat"/> + <xsl:variable name="location-longitude" select="//LocationsPage/graphql/location/lng"/> + <xsl:value-of select="concat(' (', $location-latitude, ', ', $location-longitude, ')')"/> + </xsl:if> <xsl:variable name="external-url" select="//user/external_url"/> <xsl:if test="$external-url != ''"> <xsl:text> </xsl:text><a href="{$external-url}"><xsl:value-of select="$external-url"/></a> </xsl:if> <xsl:text disable-output-escaping="yes">]]></xsl:text> </description> - <image> - <title> - <xsl:value-of select="$channel-title"/> - - - - - - - - - + + + + <xsl:value-of select="$channel-title"/> + + + + + + + + + +