created: 20211005102423816
creator: Telumire
descriptionFeed: Here's the stuff I do
linkBase: https://Telumire.github.io/index.html
linkFeed: https://Telumire.github.io/xml.rss
maxItems:
modified: 20211005171018958
modifier: Telumire
publishFilter: -[tag[private]]
tags: bookmark
title: RSS
titleFeed: Telumire's blog
\whitespace trim
\define dateFormat() ddd, 0DD mmm YYYY 0hh:0mm:0ss +0200
\define feedFilter()
[!is[system]is[tiddler]] -[prefix[$:/state/popup/]] -[prefix[$:/temp/]] -[prefix[$:/HistoryList]] -[status[pending]plugin-type[import]] -[[$:/boot/boot.css]] -[type[application/javascript]library[yes]] -[[$:/boot/boot.js]] -[[$:/boot/bootprefix.js]] $(publishFilter)$
+[!sort[modified]]
+[limit[$(maxItems)$]]
\end
\define join(value,temp:"$:/temp/concatenate",separator:"",index:0)
<$action-setfield $tiddler="$temp$" $index="$index$" $value={{{[[$temp$]getindex[$index$]][[$value$]]+[join[$separator$]]}}} />
\end
\define item()
- $(itemTitle)$$(itemDescription)$$(itemPub)$$(itemLink)$$(itemLink)$
\end
\define first()
$(titleFeed)$$(linkBase)$$(descriptionFeed)$$(languageFeed)$
\end
\define last()
\end
\define resetRSS()
<$action-setfield $tiddler='$:/temp/rss' $index=""/>
\end
\define rss()
<>
<$vars
descriptionFeed={{!!descriptionFeed}}
languageFeed={{{[{$:/language}removeprefix[$:/languages/]]}}}
linkBase={{!!linkBase}}
linkFeed={{!!linkFeed}}
titleFeed={{!!titleFeed}}
publishFilter={{!!publishFilter}}
maxItems={{{[{!!maxItems}!is[blank]else[10]]}}}
>
<$macrocall $name="join" value=<> temp="$:/temp/rss" index="rss"/>
<$list filter=<> variable="itemRSS" >
<$vars
itemTitle={{{[encodehtml[]]}}}
itemDescription={{{[all[current]get[summary]else[...]encodehtml[]]}}}
itemPub={{{[{!!modified}else{!!created}format:date]}}}
itemLink={{{[encodeuricomponent[]addprefix[#]addprefix]}}}
>
<$macrocall $name="join" value=<- > temp="$:/temp/rss" index="rss"/>
$vars>
$list>
<$macrocall $name="join" value=<> temp="$:/temp/rss" index="rss"/>
$vars>
\end
\define sendRSS(fileName:"xml.rss")
<>
<$action-setfield $tiddler="$fileName$" text={{{[[$:/temp/rss]getindex[rss]]}}}/><$action-sendmessage $message="tm-upload-tiddlers" $param="[[$fileName$]]"/>
<$action-deletetiddler $tiddler="$fileName$"/>
\end