Commit 06e793b9 authored by Pierre's avatar Pierre

rss avec incidents cachet

parent 1753f1f1
[(#HTTP_HEADER{Content-type: text/xml[; charset=(#CHARSET)]})]<?xml
version="1.0"[ encoding="(#CHARSET)"]?>
<rss version="2.0" [(#REM) rss 2.0.9)]
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
>
<channel[ xml:lang="(#LANG)"]>
<title>[(#NOM_SITE_SPIP|textebrut|texte_backend)]</title>
<link>#URL_SITE_SPIP/</link>
<description>[(#DESCRIPTIF_SITE_SPIP|supprimer_tags|texte_backend)]</description>
<language>#LANG</language>
<generator>SPIP - www.spip.net</generator>
[ <image>
<title>[(#NOM_SITE_SPIP|texte_backend)]</title>
<url>(#LOGO_SITE_SPIP|image_reduire{144,400}|extraire_attribut{src}|url_absolue|texte_backend)</url>
<link>#URL_SITE_SPIP/</link>
[<height>(#LOGO_SITE_SPIP|image_reduire{144,400}|extraire_attribut{height})</height>]
[<width>(#LOGO_SITE_SPIP|image_reduire{144,400}|extraire_attribut{width})</width>]
</image>
]
#SET{incidents, #ARRAY}
<BOUCLE_cachet(DATA){source json,https://cachet.domainepublic.net/api/v1/incidents}>
<BOUCLE_items(DATA){source table,#VALEUR}{par id}{inverse}>[
(#VALEUR|table_valeur{id}|oui)
#SET{incidents, #GET{incidents}|array_merge{#ARRAY{#VALEUR|table_valeur{created_at},#VALEUR}}}
]</BOUCLE_items>
</BOUCLE_cachet>
<BOUCLE_10recents(ARTICLES) {lang ?}{branche ?}{id_mot ?}{id_auteur ?} {par date}{inverse}{0,10}{unique}>[
(#SET{incidents, #GET{incidents}|array_merge{#ARRAY{#DATE,#ID_ARTICLE}}})]</BOUCLE_10recents>
<BOUCLE_tres_recents(ARTICLES){lang ?}{branche ?}{id_mot ?}{id_auteur ?} {par date}{inverse}{age<3}{unique}>[
(#SET{incidents, #GET{incidents}|array_merge{#ARRAY{#DATE,#ID_ARTICLE}}})]</BOUCLE_tres_recents>
<BOUCLE_tout(DATA){source table,#GET{incidents}}{par cle}{inverse}{0,10}>[
(#VALEUR|is_array|oui)
<INCLURE{fond=inc-rss-incident, valeur=#VALEUR} />][
(#VALEUR|is_array|non)
<INCLURE{fond=inc-rss-item, id_article=#VALEUR} />]
</BOUCLE_tout>
</channel>
</rss>
<item[ xml:lang="(#LANG)"]>
<title>[(#VALEUR|table_valeur{name}|supprimer_tags|texte_backend)]</title>
<link>https://cachet.domainepublic.net/?start_date=[(#VALEUR|table_valeur{created_at}|couper{10,""})]</link>
[<guid isPermaLink="true">https://cachet.domainepublic.net/?start_date=(#VALEUR|table_valeur{created_at}|couper{10,""})</guid>]
[<dc:date>(#VALEUR|table_valeur{created_at}|date_iso)</dc:date>]
<dc:format>text/html</dc:format>
[(#REM)
Le bloc qui suit diffuse les mots-cles a la mode RSS
]
<description>[(#VALEUR|table_valeur{message}|texte_backend)]
</description>
</item>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment