FND / tiddlywebplugins.bfw

Barely Functioning Wiki, emphasizing micro-content
0 stars 2 forks source link

macros (i.e. custom scripting) #61

Open FND opened 10 years ago

FND commented 10 years ago

from IRC (edited for conciseness):

my scenario / use case is
I have this list of records: <timestamp>: <number>\n (hiking)
and want that turned into sparklines or something similar

I create a wiki "fnd_macros", in there I create a tidddler "sparklines"
then I add a reference like fnd_macros/sparklines in the body of the respective tiddler
so fnd/hiking reads <timestamp>: <number>\nscript:fnd/plugins
normally that ends up being ignored
then I create a whilelist in my home space, so fnd/_plugins reads fnd_macros/sparklines
if that's in there, the corresponding script tag to the referenced macro tiddler is emitted

{{script:wiki/title}} might work, essentially pretending this was transclusion
in which case you could work within the existing syntax:
{{script:title}}@wiki
FND commented 10 years ago

I made a start on the macros branch - would appreciate a review from @cdent (no rush)