Hi Tony

It’s great that the innerwiki plugin is of interest; it was very satisfying to 
make.
> Could I be so bold as to point out since the data widget is quite specific to 
> the workings of Innerwiki it is quite a generic name.
The data widget is in fact completely generic, and could be used with other 
widgets if we had a use case. It gives us a way to declare a tiddler-like blob 
of data that could be used anywhere we need a flexible way to generate data.I’m 
thinking of moving it into the core.

One obvious application for the core is to be able to use it to inject 
additional tiddlers into a saved wiki, just like the <$innerwiki> widget allows 
additional tiddlers to be injected into the inner wiki. That way, thinking of 
your earlier thread, one could furnish users with different download buttons 
that added different configuration tiddlers to the file that is output.

Interestingly, the <$anchor> widget that is also used by the <$innerwiki> 
widget is actually an alias for the <$data> widget.
> Not only may it cause confusion with processing data tiddlers but it is using 
> a widget name that may very well have a future application.
> Would it be too late to rename this to the wikidata widget or some other name 
> before this goes into production?
Just to be clear, we can of course change anything in the prerelease until the 
moment it is released.

> Speculation
> One use I see at some point for the data widget would be the construction of 
> a data widget designed to act on items in a datatiddler such as iterate, add, 
> change and delete and lookup.

I think we can do most of that already. The <$data> widget is declarative and 
so it only helps with operations like that as a way to package their parameters.

Best wishes

Jeremy

> Such speculation is only that, however the idea of a data widget would 
> simplify handling datasets, and imported database information.
> This would open up datatiddler use to more than the enthusiast.
> 
> Best wishes
> Tony
> 
> On Sunday, January 27, 2019 at 11:04:15 PM UTC+11, Jeremy Ruston wrote:
> Software documentation is better with screenshots. However, the problem is 
> that screenshots go out of date the moment a typo is fixed or a drop shadow 
> is deepened. So I’ve been interested for some time in the idea of a tool that 
> could automate the generation of TiddlyWiki screenshots from a set of 
> tiddlers.
> 
> This could be done by creating a separate wiki for each screenshot, loading 
> it up with the tiddlers required for the screenshot. The cool thing about the 
> way that TiddlyWiki maintains the entire user interface state in the tiddler 
> store is that we can restore any specific state of the user interface just by 
> arranging the right tiddlers. So, we could create a wiki that shows a tiddler 
> in the process of being edited, or one that shows the dropdown in the 
> “filter” tab of the advanced search tiddler.
> 
> Then we’d need a mechanism for creating a PNG from the wiki under Node.js so 
> that we can automate it. That part turns out to be quite straightforward: 
> Google’s Puppeteer project allows a headless installation of Chrome to be 
> controlled from a Node.js application. Thus the Node.js application can spin 
> up a virtual page in Puppeteer, load it with HTML and then there’s an API 
> call to take a screenshot. All of this is documented in numerous blog posts 
> and official docs. For example:
> 
> https://buddy.works/guides/how-take-screenshots-with-puppeteer-headless-chrome
>  
> <https://buddy.works/guides/how-take-screenshots-with-puppeteer-headless-chrome>
> 
> But, I wanted to do a bit better: setting up a wiki is time consuming and 
> having one for each screemshot would mean a lot of jumping around between 
> wikis. And I didn’t like the idea of having to set up an entire wiki with 
> just a couple of tiddlers in it.
> 
> The solution I’ve come up with is a new plugin called “innerwiki” that 
> enables wikis to be constructed on the fly and either embedded in a tiddler 
> in the browser, or rendered as a PNG under Node.js. One can type a complete 
> description of a wiki in just a few lines, editing a single tiddler. Here’s a 
> simple example:
> 
> <$innerwiki width="1200" height="400" style="width:100%;" 
> filename="screenshot-1">
>       <$data title="HelloThere" text="This tiddler is inside a wiki"/>
>       <$data title="$:/DefaultTiddlers" text="HelloThere"/>
> </$innerwiki>
> 
> The innerwiki widget sets up a blank wiki of a specified virtual width and 
> height, and then injects the tiddlers described by the data widgets embedded 
> within it. In this example, we inject a “HelloThere” tiddler and then we set 
> up $:/DefaultTiddlers so that the new tiddler is displayed at startup. Here’s 
> how it renders:
> 
> 
> 
> Because it’s an iframe, the innerwiki is completely interactive (however 
> everytime it is refreshed it will revert to its original content).
> 
> One quite satisfying-but-useless thing is that it is entirely possible to 
> embed an innerwiki within an innerwiki:
> 
> 
> 
> 
> Under Node.js these innerwikis can be turned into PNG screenshots with the 
> screenshot command:
> 
> tiddlywiki mywiki --screenshot [tag[screenshot]]
> 
> You can try out the innerwiki plugin in the prerelease:
> 
> https://tiddlywiki.com/prerelease/plugins/tiddlywiki/innerwiki/ 
> <https://tiddlywiki.com/prerelease/plugins/tiddlywiki/innerwiki/>
> 
> Any comments or questions are welcome.
> 
> Best wishes
> 
> Jeremy
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to tiddlywikidev+unsubscr...@googlegroups.com 
> <mailto:tiddlywikidev+unsubscr...@googlegroups.com>.
> To post to this group, send email to tiddlywikidev@googlegroups.com 
> <mailto:tiddlywikidev@googlegroups.com>.
> Visit this group at https://groups.google.com/group/tiddlywikidev 
> <https://groups.google.com/group/tiddlywikidev>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/569572ed-32f3-481d-b0ca-2798c8df9f21%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/569572ed-32f3-481d-b0ca-2798c8df9f21%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywikidev+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywikidev@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/624275D7-4E13-4415-A1DA-65469B57DFD1%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to