Skip to content

Instantly share code, notes, and snippets.

@brunob
Last active February 8, 2017 17:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brunob/7734298 to your computer and use it in GitHub Desktop.
Save brunob/7734298 to your computer and use it in GitHub Desktop.
Un squelette SPIP qui prend l'url d'un flux RSS issu de scoopit en paramètre pour renvoyer le flux dans lequel les liens sont remplacés par les liens direct vers les ressources, cf http://seenthis.net/messages/202408
[(#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)"]><BOUCLE_channel(DATA){source xml, #ENV{url}}{datapath channel}>
[<title>(#VALEUR{title/0}|textebrut|texte_backend)</title>]
[<link>(#VALEUR{link/0})</link>]
[<description>(#VALEUR{description/0}|supprimer_tags|texte_backend))</description>]
[<pubDate>(#VALEUR{pubDate/0})</pubDate>]
</BOUCLE_channel>
<BOUCLE_items(DATA){source rss, #ENV{url}}>
<item>
[<title>(#TITRE|supprimer_tags|texte_backend)</title>]
[<link>(#URL_SOURCE|url_absolue)</link>]
[<description>(#DESCRIPTIF|texte_backend)</description>]
[<dc:date>(#DATE|date_iso)</dc:date>]
[<guid>(#URL_SOURCE|url_absolue)</guid>]
</item>
</BOUCLE_items>
</channel>
</rss>
@brunob
Copy link
Author

brunob commented Feb 8, 2017

Obsolète depuis que sccopit a supprimé les flux RSS de son site...

Si le fait d'utiliser un service externe ne vous pose pas problème, vous pouvez utiliser http://createfeed.fivefilters.org/ en solution de remplacement, cf http://www.outilsfroids.net/2016/10/creer-un-flux-rss-pour-une-page-scoop-it-presque/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment