titolo trx, funding, creator, nome podcast
This commit is contained in:
parent
42fe3cacb8
commit
ba615b5706
1 changed files with 33 additions and 14 deletions
|
@ -1,5 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
|
||||
<rss
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
|
||||
xmlns:podcast="https://podcastindex.org/namespace/1.0"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
version="2.0">
|
||||
<channel>
|
||||
<atom:link href="http://www.ondarossa.info{{ ror.url | escape("html_attr") }}" rel="self" type="application/rss+xml" />
|
||||
<title>Radio Onda Rossa</title>
|
||||
|
@ -7,8 +12,8 @@
|
|||
<language>it-it</language>
|
||||
<itunes:subtitle>La radio di chi se la sente</itunes:subtitle>
|
||||
<itunes:author>Ondarossa</itunes:author>
|
||||
<itunes:summary>Podcast completo</itunes:summary>
|
||||
<description>Tutti gli aggiornamenti, i redazionali, le trasmissioni della radio di chi se la sente</description>
|
||||
<itunes:summary>{{ror.title}}</itunes:summary>
|
||||
<description>{{ror.title}}</description>
|
||||
<itunes:owner>
|
||||
<itunes:name>Ondarossa</itunes:name>
|
||||
<itunes:email>ondarossa@ondarossa.info</itunes:email>
|
||||
|
@ -16,38 +21,52 @@
|
|||
<itunes:explicit>no</itunes:explicit>
|
||||
<itunes:image href="http://www.ondarossa.info/favicon.png" />
|
||||
<itunes:category text="News & Politics"/>
|
||||
<podcast:funding url="http://ondarossa.info/sostieni">Sostieni ondarossa</podcast:funding>
|
||||
|
||||
{% for nid, node in ror.podcast.nodes %}
|
||||
{% set num_audios = node.audio|length %}
|
||||
{% for num, audio in node.audio %}
|
||||
<item>
|
||||
{% set img = node.img.0.uri %}
|
||||
{% set audiourl = audio.field_audio_link[0].uri %}
|
||||
{% set ext = audiourl|split('.')|last %}
|
||||
{% set durata = audio.field_durata[0].value %}
|
||||
{% set duratahrs = durata // 3600 %}
|
||||
{% set duratamin = (durata // 60) % 60 %}
|
||||
{% set duratasec = durata % 60 %}
|
||||
{% if num_audios > 1 %}
|
||||
<title> {{node.title.0.value}} ({{num+1}}/{{num_audios}}: {{audio.field_audio_link[0].title}}) </title>
|
||||
{% if node.tx != "" %}
|
||||
{% set author = node.tx %}
|
||||
{% else %}
|
||||
<title> {{node.title.0.value}} </title>
|
||||
{% set author = "Radio Onda Rossa" %}
|
||||
{% endif %}
|
||||
|
||||
<title>{% if node.tx != "" %}[{{node.tx}}] {%endif%}{{node.title.0.value}}{% if num_audios > 1 %} ({{num+1}}/{{num_audios}}: {{audio.field_audio_link[0].title}}){% endif %}</title>
|
||||
<itunes:summary>{{ node.summary | raw }}</itunes:summary>
|
||||
<description> {{ node.body.0.value }}
|
||||
{# [fields]
|
||||
{% for field in node.img.0|keys %}
|
||||
[[ {{ field}}{{"\t"}}-> `{{node.img.0[field]}}` ]]
|
||||
{% endfor %}
|
||||
[/fields] #}
|
||||
</description>
|
||||
<description> {{ node.body.0.value }} </description>
|
||||
<link>http://www.ondarossa.info{{node.path.0.alias}}</link>
|
||||
|
||||
<enclosure url="{{ audiourl | replace({"https://": "http://"}) | escape('html_attr') }}" type="audio/{{ext}}" length="1024"></enclosure>
|
||||
{% if img != "" %}
|
||||
{% set img_ext = img|split('.')|last|lower|replace({jpg: 'jpeg'}) %}
|
||||
<itunes:image href="{{node.img.0.uri}}" type="image/{{img_ext}}" />
|
||||
{% endif %}
|
||||
<pubDate>{{ "@#{node.created.0.value}" | date("r") }}</pubDate>
|
||||
<itunes:author>Redazione Ondarossa</itunes:author>
|
||||
<dc:creator><![CDATA[{{author}}]]></dc:creator>
|
||||
<itunes:author><![CDATA[{{author}}]]></itunes:author>
|
||||
<itunes:duration>{{"%02d" | format(duratahrs)}}:{{"%02d" | format(duratamin)}}:{{"%02d" | format(duratasec)}}</itunes:duration>
|
||||
<itunes:explicit>no</itunes:explicit>
|
||||
{#
|
||||
questo if serve per poter fare una transizione senza cambiare di
|
||||
botto i guid a tutti; tornare qui nel 2022 e lasciare solo il primo
|
||||
ramo.
|
||||
Senza questo cambio, se due articoli hanno lo stesso audio, si generano
|
||||
guid duplicati
|
||||
#}
|
||||
{% if node.created.0.value > 1639689963 %}
|
||||
<guid>{{ audiourl }}@http://www.ondarossa.info{{node.path.0.alias}}@{{num}}</guid>
|
||||
{% else %}
|
||||
<guid>{{ audiourl }}</guid>
|
||||
{% endif %}
|
||||
</item>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue