I’m testing different plugins to get things I need for my system, and I’d like to know if there’s a way to extract individual tiddlers from a plugin.
I’ve tried using Tinka and Gatha, but nothing has worked. In Gatha, there’s an option to download the plugins to a folder for use in Node, but it doesn’t work for me. Maybe it’s because Gatha needs to be installed on Node, but right now I’m using Tiddlywiki in a single file.
Do you know of a way to extract them, or at least open them all at once, in Tiddlywiki other than opening them one by one and saving them?
You can list them all in the $:/AdvancedSearch > Filter tab, using the plugintiddlers operator. That tab also has an export button that lets you get them all as JSON. You could use this, and then choose the ones you actually want on an import to another wiki.
For instance, to see the tiddlers in the confetti plugin, enter this in the input box in that tab:
Thanks for the search pattern, I didn’t know it could be done that way.
The thing is, what I want is to export them as individual files, and I can’t think of how, except to do it one at a time.
I know with a Node installation, you could do it by importing the file with all the tiddlers, but I don’t currently have Tiddlywiki on Node.
I’ve tried @Mohammad’s Commander, but it also exports them in bulk.
With Scott’s filter [[plugin name]plugintiddlers[]], I was able to extract the tiddlers I wanted, and with Eric’s app [all[tiddlers]prefix[plugin name]], I was able to export them individually as needed.
Just note that prefixing your plugin tiddler titles with the plugin name is a strong convention, but not a strict requirement. Sometimes, you need to use another namespace. So you might want to use plugintiddlers in Eric’s tool as well, with a filter like:
I understand that what you’re doing is fine. If you simply want a tiddler, or a couple of them, and you drag them onto another Tiddlywiki, you won’t leave anything behind. Unless, of course, that tiddler is related to others that you don’t import, and therefore it won’t work properly.
In my case, since I needed to download them all individually, that solution wasn’t suitable, since it would require a considerable amount of time, depending on the number of tiddlers I was processing. But thanks to the instructions from @Scott_Sauyet and @EricShulman, it’s done in a few seconds.
I did write such a UI during a slow meeting yesterday. I don’t think it meets the needs of the OP. But instead of throwing it away, I thought I’d post it before I close the tab where I developed it.
It lets you choose an installed plugin, select any or all of the tiddlers it includes, and drag them to another wiki. But it doesn’t do a download, which should be easy enough. And if it did, there would still be work to do to the separate file downloads, and Eric already has that covered.
It’s nothing special. I like to view files in Notepad++, or similar, instead of searching TiddlyWiki for a tiddler to edit, or having to open multiple instances of TiddyWiki to compare code. It’s more convenient for me to learn and test things.
Each to their own but there are a range of other possibilities you may be more interested in. I tend to use single file wikis a lot, so have a different perspective. I use TiddlyWiki as the IDE intergrated development environment. Of particular value is;
The preview in the editor (including the internals plugin installed at tiddlywiki.com
The code mirror plugin
External editor
I am not sure if its available after recent upgrades to browsers but when NOT using codemirror there are a few browser addons that allow you to edit any text field (tiddler in edit mode) in an external editor, such as Notepadd++ and changes get saved back to the text field.
If you can start to edit tiddlers only within TiddlyWiki it is possible to then leverage a whole range of tools that can make your life a lot easier including syntax highlighting, insert titles via search, drop images into text, autocomplete, custom editor toolbar buttons, custom field editors etc…
It may not meet your needs, but it is possible to search and browse the individual files making up the core plugins from this GitHub page.
GitHub can be intimidating to non-developers, but in this case it is a matter of browsing files in a very similar way to file browsers on Windows/Macs:
I honestly hadn’t considered this option, but after trying it, I see that it does what I need without even having Tiddlywiki open. I’ll go directly to the plugins that their creators have on Github.
@jeremyruston when one does not have a Github location to source Plugin files for node implimentations is there any other method or repository where the files can be shared/located?
Eg given a plugin found in a wiki can we generate the files to install that plugin to node?
My feeling there is a gap here that adds confusion especialy to users trying to move into node implementations after becoming familular with single file implementations. There are many plugins not available on Github, or the GitHub location is unknown.
Are you suggesting that Tiddlywiki offer such a facility?
If instead you’re asking if it already exists, then I’m quite sure the answer is “no”. The decentralized nature of TiddlyWiki doesn’t really offer any way to do this.
There would be the possibility of something like Tiddlyhost adding such a feature, but it’s hard to see it generating enough revenue to cover its (likely small) costs.
The only other real possibility I see in the current ecosystem would be if the CPL offered this. I don’t use it or really even understand the CPL, but I’m under the impression that they don’t wait for submissions, actively searching for and importing publicly available plug-ins. If that is correct, then it might be relatively easy for them to add a file system-like interface.
But I still can’t see that as being very important. The OP seems like a fairly niche request. For me personally, if I want to see how a plug-in works, I visit its Contents tab and examine the interesting-looking tiddlers. If the only public version is already compressed/obfuscated, then there really is no way to recover the source code anyway.
It does not seem like a Niche request when it is trending this week, I also wanted to do it (mere coincidence?). The thing is when a gap exists in the methods and documentation it presents a barrier to new and expierenced users understanding and is as likely to turn users off as it is to push them towards a deeper understanding, especialy if that deeper understanding does not have a documented path.
Even if occasional (we have no evidence either way) every barrier is a disinsentaive.
This is not niche if moving from Single file to node implementations and is very poorly documented in contrast to the plugin library process.