Using one TiddlyWiki as a "server" of content to another "client" TiddlyWiki

63 views
Skip to first unread message

Charlie Veniot

unread,
Feb 13, 2022, 5:06:59 PM2/13/22
to TiddlyWiki
https://youtu.be/sW5BIuFFyE8

I didn't even acknowledge the TiddlyWiki community in this latest video, because I wasn't thinking about how it could be of interest to TW folk.

Well, maybe it would be of interest to folk for this use case:

A TiddlyWiki instance (here the BAM Programming Reference) enhancing content by displaying (right there, in an iframe) related content coming from another TiddlyWiki instance (here, the BASIC Anywhere Machine IDE and source code repository.)

Done via the magic of 

See the "Keyword Viewer" tiddler in the BASIC Anywhere Machine Programming Reference , where you'll find a "{{||tKv}}".  The "tKv" template tiddler involves the "tEx" template tiddler which, finally,  has the magic:

`
<iframe src={{{ [[https://basicanywheremachine.neocities.org/BAM_IDE.html?target=]] [<currentTiddler>split[#️⃣]first[]else<currentTiddler>] [[#View%20Program]] +[join[]] }}} style="width:100%;height:500px;resize:both;overflow:auto;">
</iframe>

<$vars thisFilter={{{ [<currentTiddler>addprefix[(?i)\b]addsuffix[\b]] }}}>
<$list filter="[tag[sample]regexp:text<thisFilter>]">

<details><summary>{{||fL}}</summary>
{{!!text}}
</details>

</$list>
</$vars>
`
Dissecting BASIC Anywhere Machine TiddlyWiki's "View Program" tiddler, you'll find:

`
<$list variable="thisTarget" filter="[[$:/info/url/search]get[text]removeprefix[?]split[&]removeprefix[target=]uppercase[]search-replace:g[%20],[ ]]" >

! <<thisTarget>> Sample Programs

<$vars caselessTarget={{{ [<thisTarget>search-replace[$],[]addprefix[(?i)\b]addsuffix[\b]] [<thisTarget>split[]match[$]addprefix[\]] +[join[]] }}}>
<$list filter="[tag[.bas]regexp:description<caselessTarget>]">

<details> <summary><<currentTiddler>>{{||Run Basic Program Button}}</summary>
<div style="margin-left:5px;border-left:1px solid lightgray;">

{{!!text}}
</div>
</details>
</$list>
</$vars>
</$list>
`


Charlie Veniot

unread,
Feb 16, 2022, 11:41:58 PM2/16/22
to TiddlyWiki
Kind of related, as per my latest update in Local storage prototype: TiddlyWiki and BASIC data exchange, is the ability for every thing of "same site origin"  can share/communicate with every other thing.
Reply all
Reply to author
Forward
0 new messages