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"/> <$macrocall $name="join" value=<> temp="$:/temp/rss" index="rss"/> \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 <$vars newFieldNameTiddler=<> newFieldValueTiddler=<>> <$transclude tiddler="$:/core/ui/EditTemplate/fields"/> <<<.tc-warning Warning :  [[xml.rss]]  will be deleted/overwrite. <<< * Require  [[$:/plugins/tobibeer/base64]]  and  [[$:/plugins/commons/file-uploads]]  for sending the RSS file. * All the fields must be filled except maxItems (default = 10). Use the buttons or use custom values. <$button>Set titleFeed <$wikify name='text' text={{$:/SiteTitle}} output='text'> <$action-setfield $field="titleFeed" $value=<> /> <$button>Set descriptionFeed <$wikify name='text' text={{$:/SiteSubtitle}} output='text'> <$action-setfield $field="descriptionFeed" $value=<> /> <$button>Set linkBase <$action-setfield $field="linkBase" $value={{{[[https://]][{$:/GitHub/Repo}removeprefix{$:/SaveToGitHub/private/username}removeprefix[/]][{$:/GitHub/Path}][{$:/GitHub/Filename}]+[join[]]}}} /> <$button>Set linkFeed <$action-setfield $field="linkFeed" $value={{{[[https://]][{$:/GitHub/Repo}removeprefix{$:/SaveToGitHub/private/username}removeprefix[/]][{$:/GitHub/Path}][[xml.rss]]+[join[]]}}}/> <$button actions=<>>Generate feed <$button actions=<>>Clear feed <$button actions=<>>Send with fileUploads <$macrocall $name="copy-to-clipboard" src={{{[[$:/temp/rss]getindex[rss]]}}}/>
<$text text={{{[[$:/temp/rss]getindex[rss]]}}} />