Is it possible to host a Plugin-Library for content?

452 views
Skip to first unread message

Jan

unread,
Apr 18, 2020, 5:11:02 PM4/18/20
to TiddlyWiki
Hi community,
I am very fascinated with the new ability of the plugin-library to
install plugins on the fly. I would like to use this mechanism for
importing content - like history-data, theatre-plays etc. ... or even
images. Because no js is involved, the even would run instantly.
What is the infrastructure behind the plugin-library?
Do you think it is possible to build and host a similar backend?

Thanks and best wishes
Jan



Mat

unread,
Apr 18, 2020, 5:24:32 PM4/18/20
to TiddlyWiki
That's interesting!

It gives me an idea: Would it be possible to lazy load tiddlers (if that is the correct term here) - i.e showing tiddler titles but not until you actually click the link do they load. The title link is a kind of library link. And on closing such tiddlers they could even delete (so to not grow the size of the TW file).

<:-)

TonyM

unread,
Apr 18, 2020, 8:10:45 PM4/18/20
to TiddlyWiki
Jan/Mat,

I too am keen on making use of libraries,

However much of what you wan't can I expect be done by other means.
  • The attached tiddler illustrates something quite interesting. 
  • Drop it on a Wiki and import it (trust me)
  • Open it and you will see it is ready to import two tiddlers (you can select here)
  • It will then import (a button to copy the text from the current tiddler)
  • Currently such install pending tiddlers delete the source automatically
  • It would be trivial to set a flag and modify the import to not delete install pending tiddlers so you can install and reinstall. 
I actually have a wealth of hacks with importing and plugins that offer so many tricks I have not being able yet to see how best to share them. Once I can reproduce libraries, ideally without the command line, from single file wikis, I can do even more. 

Regards
Tony
Copy Text import.tid

Mat

unread,
Apr 19, 2020, 1:38:40 AM4/19/20
to TiddlyWiki
Tony, that's some neat buttons ...but it requires that you click the button in the source tiddler. One main point with an import library is that you don't leave your wiki. 

@Jan, do you even imagine your source to be in the form of tiddlers before they're imported?

<:-)

Mohammad

unread,
Apr 19, 2020, 1:57:54 AM4/19/20
to TiddlyWiki
Amazing!
 Thanks for sharing this Tony!

Mohammad

unread,
Apr 19, 2020, 2:11:05 AM4/19/20
to TiddlyWiki
Jan,

 Until I had not seen the ebook edition announced by Xavier, I did not even imagine one can distribute contents using plugin!

 I think your idea is feasible to implement. I thought even propose Tiddlywiki automatically recognize this.
 Right now Tiddlywiki plugin type is limited to theme and plugin, may be content can be another type.

 You may know Andrew Harison has amazing wikitext macros creating plugins on the fly! It likes give a filter, a name and press a button

 So, it seems to me, any user with no Node.JS or other technical knowledge of plugins and plugin library can make plugin and a library...

--Mohammad

TonyM

unread,
Apr 19, 2020, 3:43:27 AM4/19/20
to TiddlyWiki
Mohamad

My example in this thread hints packaging into plugins can be done in single file wikis very simply. I have already made alternate plugin type simply by giving a json tiddler a new plugin-type field value. How do I get a json tiddler? Just drop some tiddlers on a wiki and rename $:/import and change its fields.

If you look at my example you can import a tiddler that imports tiddlers.

Regards
Tony

TonyM

unread,
Apr 19, 2020, 3:47:37 AM4/19/20
to TiddlyWiki
Mat

My example was more showing untapped hacks of imports plugins and packaging. We can design a template to generate libraries and export them and possibly import the link to the library.

Tony

Jed Carty

unread,
Apr 19, 2020, 5:29:35 AM4/19/20
to TiddlyWiki
Making a plugin in a single file wiki is simple, put this in a tiddler then fill out the form, the filter is the filter for what you want to package in the plugin:

```
\define plugintext()
{
"tiddlers": {<$list filter='[subfilter{$:/state/MakePlugin!!filter}]+[bl[]]'>
"<$view field=title format=jsencoded/>": <$text text=<<jsontiddler "jsontiddlers Macro">>/>,
</$list>
<$list filter='[subfilter{$:/state/MakePlugin!!filter}]+[last[]]'>
"<$view field=title format=jsencoded/>": <$text text=<<jsontiddler "jsontiddlers Macro">>/></$list>
}
}
\end

Name: <$edit-text tiddler='$:/state/MakePlugin' field='name' class='tc-edit-texteditor'/>
Filter: <$edit-text tiddler='$:/state/MakePlugin' field='filter' class='tc-edit-texteditor'/>
Description: <$edit-text tiddler='$:/state/MakePlugin' field='description' class='tc-edit-texteditor'/>
List: <$edit-text tiddler='$:/state/MakePlugin' field='list' class='tc-edit-texteditor'/>
Version: <$edit-text tiddler='$:/state/MakePlugin' field='version' class='tc-edit-texteditor'/>

<$button>
Make Plugin
<$wikify name=pluginText text="<<plugintext>>">
<$action-setfield $tiddler={{$:/state/MakePlugin!!name}} text=<<pluginText>> type='application/json' description={{$:/state/MakePlugin!!description}} core-version=">=5.0.0" dependents="" list={{$:/state/MakePlugin!!list}} plugin-type="plugin" version={{$:/state/MakePlugin!!version}}/>
</$wikify>
</$button>
```

Jed Carty

unread,
Apr 19, 2020, 5:35:20 AM4/19/20
to TiddlyWiki
To get the content for the files in a plugin library you can use this tiddler. Paste this into a tiddler and fill out the from. Unfortunately here you have to save the files manually by copying and pasting the text into the files indicated in the tiddler, I never got around to making an exporter that would put everything in the correct place. In this one the filter has to list only the plugin tiddlers that you want included in the library, trying to include non-plugin tiddlers will break things.

\define oneTiddler()
 <$list
   filter='[<theTiddler>fields[]] -text +[bl[]]'
 >
   <br>
   &nbsp;&nbsp;&nbsp;&nbsp;"<$view field='title' jsencoded/>": "<$view tiddler=<<theTiddler>> field=<<currentTiddler>> format=jsencoded/>",
 </$list>
 <$list
   filter='[<theTiddler>fields[]] -text +[bl[]]'
 >
   <br>
   &nbsp;&nbsp;&nbsp;&nbsp;"<$view field='title' jsencoded/>": "<$view tiddler=<<theTiddler>> field=<<currentTiddler>> format=jsencoded/>"
 </$list>
\end

\define jsonListing()
[<br>
<$list
 filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
 variable=theTiddler
>
 &nbsp;&nbsp;{
 <<oneTiddler>>
 <br>
 &nbsp;&nbsp;},
 <br>
</$list>
<$list
 filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
 variable=theTiddler
>
 &nbsp;&nbsp;{
 <<oneTiddler>>
 <br>
 &nbsp;&nbsp;}
 <br>
</$list>
]
\end

This packages the plugins returned by this filter into the format needed by a plugin library.

The file structure needs to be:

*Library Folder
** recipes
*** library
**** tiddlers
***** //individual tiddler json files//
**** tiddlers.json
** index.html

filter: <$edit-text tiddler='$:/state/PluginLibrary' field=filter/>


!! tiddlers.json

''filename:'' tiddlers.json

''contents:''

<<jsonListing>>

!! Tiddler JSON files:

<$list filter={{$:/state/PluginLibrary!!filter}}>

---
''filename:'' <$view field='title' format='urlencoded'/>.json

''contents:''

<$text text=<<jsontiddler>>/>
</$list>

Jan

unread,
Apr 19, 2020, 6:38:06 AM4/19/20
to tiddl...@googlegroups.com
Hi Mat, Hi Tony, Hi Mohammad!
I would like to reduce the number of necessary clicks for possible users as much as possible.
Jed alread furnished a very valuable tool with the bundeler - but this still is three clicks before you really can work with the content and thus too much for an average end-user.
As I pointed out in your following thread, I would love to have one click which allows you to import and use the content.
Therefore I would invest time take to prepare packages. But if it were possible to create the downloadable content dynamically like with the bundles this would of course be even better.

Yours
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/03b4a9ae-9cf3-4bfd-9ee4-608fee605bb8%40googlegroups.com.

Mohammad

unread,
Apr 19, 2020, 7:10:59 AM4/19/20
to TiddlyWiki
Hi Jed,
 Wonderful! Small issue, seems tiddlers bundled in plugin all have the below contents

```
The <<.def jsontiddlers>> [[macro|Macros]] returns the fields of a [[selection of tiddlers|Title Selection]] in [[JSON|JavaScript Object Notation]] form.

An example can be seen in the [[template tiddler for JSON exports|$:/core/templates/exporters/JsonFile]].

!! Parameters

;filter
: A [[filter|Filters]] selecting which tiddlers to include
;spaces
: An optional number of spaces to use for formatting the JSON. Defaults to 4, with blank or zero resulting in packed JSON with no formatting spaces

```

Jed Carty

unread,
Apr 19, 2020, 7:46:49 AM4/19/20
to TiddlyWiki
Mohammad,

I am not getting those results, I put that code into a tiddler on tiddlywiki.com, fill out all of the fields in the form and use the filter [!is[system]limit[10]] and the plugin gets the first 10 non system tiddlers.

What steps should I take to reproduce what you are getting?

Mohammad

unread,
Apr 19, 2020, 10:23:10 AM4/19/20
to TiddlyWiki
Thank you Jed,
 I could reproduce your result. Would you please test with filter: [tag[Learning]]


--Mohammad

Mohammad

unread,
Apr 19, 2020, 3:48:24 PM4/19/20
to TiddlyWiki
Jed, 
I think I found the source of error!


On Sunday, April 19, 2020 at 1:59:35 PM UTC+4:30, Jed Carty wrote:
Making a plugin in a single file wiki is simple, put this in a tiddler then fill out the form, the filter is the filter for what you want to package in the plugin:

```
\define plugintext()
{
"tiddlers": {<$list filter='[subfilter{$:/state/MakePlugin!!filter}]+[bl[]]'>
"<$view field=title format=jsencoded/>": <$text text=<<jsontiddler "jsontiddlers Macro">>/>,



Should be note to the input parameter in jsontiddler

"<$view field=title format=jsencoded/>": <$text text=<<jsontiddler>>/>,




-- Mohammad

TonyM

unread,
Apr 19, 2020, 7:46:18 PM4/19/20
to TiddlyWiki
Jed,

Thanks so much for this tool, I just can't find the library format documentation, of course I can reverse engineer your code to determine the format but if you can point us to a document I would appreciate it.

It seems part of the complication is for those like myself unfamiliar with recipes.

Regards
Tony

TonyM

unread,
Apr 19, 2020, 11:34:14 PM4/19/20
to TiddlyWiki
All,

I just thought I would let you know I too am looking forward to being able to use libraries for publishing.

However I am working on something I would be happy to collaborate on that relates to this;
  • Work Flow and tools for iterative rapid solution development
  • Continuous improvement and development process that moves with me to the wiki I am currently designing
  • Import a solution and use it, but permit modifications and improvements by making the current Wiki own it
  • Republish modified version with changes (increment version)
  • Re-import and start again.
Working examples I am developing

In addition to this I am looking to bundle a set of designer tools to make use of this development approach, designer tools the we later remove from the wiki to keep it simple and not bloated.

I hope also to package a set of features I may want to install and leave behind rather than remove after design, so I want to be able to unpackage and install them as needed ideally from a package. Kind of like adding ingredients to my recipe. However I wish to keep these in a continuous development loop like my design tools.

If I could then also publish the package(s) as a library for others to selectively install as the need arises it would be fantastic.

Tiddlywiki offers the ideal platform for iterative development processes. Not all of these deserve their own plugins for distribution but should be selectively installable as needed.

For those in the know I am really keen in leveraging the Agile set based design  methods. Later I would hope someone else could improve a component and hand it back to me for re-inclusion.

In short tiddlywiki is not only a complete platform it can also be it's own software development Kit and Rapid Set based design project management.

Regards
Tony

Jed Carty

unread,
Apr 20, 2020, 5:36:09 AM4/20/20
to TiddlyWiki
Tony,

I don't know of any documentation, I looked at a working library and tried to make that. I have no idea what 'recipes' refers to.

Mohammad,

Thank you for finding this, you were right about the place that caused one error, but there was also an error with encoding the titles, I was using jsencoding which escapes ' characters, but that breaks json so when there was a ' in a tiddler title it would break. Anyway, this should be a working version, please let me know if you find any other things that break it.

\define plugintext()
{
"tiddlers": {<$list filter="[subfilter{$:/state/MakePlugin!!filter}]+[bl[]]">
"{{{ [<currentTiddler>] +[jsonstringify[]] }}}": <$text text=<<jsontiddler>>/>,
</$list><$list filter="[subfilter{$:/state/MakePlugin!!filter}]+[last[]]">
"{{{ [<currentTiddler>] +[jsonstringify[]] }}}": <$text text=<<jsontiddler>>/></$list>

Mohammad

unread,
Apr 20, 2020, 6:56:51 AM4/20/20
to TiddlyWiki
Hi Jed.

Several tests on tiddlywiki.com were performed, it works fine!

I will inform you if I found any issue.

Thank you again
Mohammad

TonyM

unread,
Apr 20, 2020, 10:18:34 PM4/20/20
to TiddlyWiki
Jed,

Thanks - Library doco is a gap then. 

I don't understand bags and recipes either, they come up here and there. It relates to the tiddlywiki build process and never was document for end users. 

Regards
Tony

Mohammad

unread,
Apr 21, 2020, 12:50:47 AM4/21/20
to TiddlyWiki
Jed,
 I am trying to use the below plugin library maker! most of part works, except the index.html which is not produced here!

--Mohammad

Jed Carty

unread,
Apr 21, 2020, 7:00:44 AM4/21/20
to TiddlyWiki
Oh, sorry about that. I had another tiddler generate the html file. Here is everything in one file, I am also adding it to the plugin development repo. The formatting for the html file output isn't great, but it should work:

\define makeHTML(json)
`
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="application-name" content="TiddlyWiki Plugin Library" />
<meta name="application-version" content="v0.0.0" />
<meta name="copyright" content="Copyright 2015 Jeremy Ruston" />
<link id="faviconLink" rel="shortcut icon" href="favicon.ico">
<title>Plugin Library</title>
<script>
var assetList = $(JSONLISTING)$

/*\
title: $:/plugins/tiddlywiki/pluginlibrary/libraryserver.js
type: application/javascript
module-type: library

A simple HTTP-over-window.postMessage implementation of a standard TiddlyWeb-compatible server. It uses real HTTP to load the individual tiddler JSON files.

\*/
(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

// Listen for window messages
window.addEventListener("message",function listener(event){
console.log("plugin library: Received message from",event.origin);
console.log("plugin library: Message content",event.data);
switch(event.data.verb) {
case "GET":
if(event.data.url === "recipes/library/tiddlers.json") {
// Route for recipes/library/tiddlers.json
event.source.postMessage({
verb: "GET-RESPONSE",
status: "200",
cookies: event.data.cookies,
url: event.data.url,
type: "application/json",
body: JSON.stringify(assetList,null,4)
},"*");
} else if(event.data.url.indexOf("recipes/library/tiddlers/") === 0) {
var url = "recipes/library/tiddlers/" + encodeURIComponent(removePrefix(event.data.url,"recipes/library/tiddlers/"));
// Route for recipes/library/tiddlers/<uri-encoded-tiddler-title>.json
httpGet(url,function(err,responseText) {
if(err) {
event.source.postMessage({
verb: "GET-RESPONSE",
status: "404",
cookies: event.data.cookies,
url: event.data.url,
type: "text/plain",
body: "Not found"
},"*");
} else {
event.source.postMessage({
verb: "GET-RESPONSE",
status: "200",
cookies: event.data.cookies,
url: event.data.url,
type: "application/json",
body: responseText
},"*");
}
});
} else {
event.source.postMessage({
verb: "GET-RESPONSE",
status: "404",
cookies: event.data.cookies,
url: event.data.url,
type: "text/plain",
body: "Not found"
},"*");
}
break;
}
},false);

// Helper to remove string prefixes
function removePrefix(string,prefix) {
if(string.indexOf(prefix) === 0) {
return string.substr(prefix.length);
} else {
return string;
}
}

// Helper for HTTP GET
function httpGet(url,callback) {
var http = new XMLHttpRequest();
http.open("GET",url,true);
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
callback(null,http.responseText);
}
};
http.send();
}

})();

</script>
</head>
<body>

<h1>HelloThere</h1>

<p>This is the TiddlyWiki plugin library. It is not intended to be opened directly in the browser.</p>

<p>See <a href="https://tiddlywiki.com/" target="_blank">https://tiddlywiki.com/</a> for details of how to install plugins.</p>

</body>
</html>
`
\end
---
''filename:'' index.html

''contents:''

<$wikify name=JSONLISTING text=<<jsonListing>>>
<pre>
<<makeHTML>>
</pre>
</$wikify>


Mohammad Rahmani

unread,
Apr 21, 2020, 7:05:45 AM4/21/20
to tiddl...@googlegroups.com
Thank you Jed.
I will make some tests and share the results with you!

Best wishes
Mohammad


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Jan

unread,
Apr 21, 2020, 6:35:52 PM4/21/20
to tiddl...@googlegroups.com
Hi Jed this looks great.
I have some questions
-Am I right that node.js is not needed to host the library, just the html-file on a server?
-It would be great to have a button to export the html file. My html-file was aproximately one kilometer long which makes it complicated to copy it manually.
-What does the command to import a plugin on the other side look like?

Thanks a lot for this invention which could be truueely helpfull for the projects I am just working on.

Jan


Am 21.04.2020 um 13:00 schrieb Jed Carty:
Oh, sorry about that. I had another tiddler generate the html file. Here is everything in one file, I am also adding it to the plugin development repo. The formatting for the html file output isn't great, but it should work:

\define makeHTML(json)
`
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; />

Jed Carty

unread,
Apr 22, 2020, 4:27:25 AM4/22/20
to TiddlyWiki
Jan,

The plugin server doesn't need node, anything that can serve files should work, but it is more than just the html file, in one of my posts above I have a tiddler that generates the rest of the files needed and shows the directory structure needed by the plugin library. Since this is something that obviously would benefit from more examples/documentation I am going to add it to the plugin development repo I made with some working examples and hopefully get some help with documenting it.

If we can get reasonable documentation and a good setup I want to put it up on tiddlywiki.com/dev, because it has needed updates for a long time.

TonyM

unread,
Apr 22, 2020, 8:17:42 AM4/22/20
to TiddlyWiki
Jed,

Thanks for this work. Can you point me to the plugin development repo please?

Thanks
Tony

Jed Carty

unread,
Apr 22, 2020, 9:25:31 AM4/22/20
to TiddlyWiki
the plugin development repo is here: https://github.com/inmysocks/PluginDevelopment

TonyM

unread,
Apr 22, 2020, 9:10:03 PM4/22/20
to TiddlyWiki
Jed Thanks,

I will see if I can make use of it. I am running too many development threads at the moment. However I am trying to democratise the following related services;
  • Tiddlers to Bookmarklet
  • Tiddlers to JSON
  • Tiddlers to Plugins and other plugin types
  • Tiddlers to URI new Share Tiddler via link
  • Tiddlers and Plugins to libraries
In someways Libraries, If we publish one are a good way to share content of the plugin or static type. In part because it lives independently at a particular URL and is loaded on demand.

I wonder if this could be a cross domain form of federation, at least in one direction. I mention this to you because you are the federation guru :)

Regards
Tony

Jan

unread,
Apr 23, 2020, 5:12:26 AM4/23/20
to tiddl...@googlegroups.com
Hi Jed, hi everyboy
I made a proof-of-concet fopr a php-library-uploader here https://szenio.de/Libraries/
Unfortuantely it is not working yet, because Jed's Create-HTML does not seem to work in the textarea for the export.

And I do not know whether I fully understood the process.
1. Create the plugins to export (With jed's plugin creator that is also already there Question: Can I alternatively use TINKA?)
2. Create the library-html and host ot on your server (This step would be replaced by my php-based uploader)
3. Create a Library-Importer pointing to the URL.

Is that correct or what did I forget?

Thanks again for this great step forward, jed

Jan
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Jed Carty

unread,
Apr 23, 2020, 5:30:54 AM4/23/20
to TiddlyWiki
there isn't anything special about the tool I posted here, you could use tinka or anything else to build the plugins.

You are missing the actual plugin tiddlers in your steps, the html generated is just the index, the rest of the pieces are json files that need to be stored in the place shown in the folder layout in the library builder tiddler.

The structure is:

root folder
- index.html <- the generated html
- library folder
  - tiddlers.json <- the first file listed in the tiddler
  - tiddlers folder
    - //one json file for each plugin served// <- all the files listed between the first file and the html file

the names have to be exactly what is shown in the tiddler or they won't work.

There is a reason this is normally done on node.
It wouldn't be too hard to make an exporter that just downloads the files individually, which would make it a lot easier but you still have to download them one at a time. there may be a way to have it export a zip file that contains all the files in the correct folders, but that isn't a project I am going to take on right now.

Jed Carty

unread,
Apr 23, 2020, 5:52:11 AM4/23/20
to TiddlyWiki
Jan,

I just looked at your proof of concept and you are doing something more clever than what I was considering. I was thinking in terms of exporting the plugin library into a local file system so that then you would upload it somewhere else.
Your way is a much better idea I think.
I made a widget that lets you send http POST requests from a browser, that would allow you to skip any copy and pasting or exporting steps and directly send the files to your php server. The widget is here https://ooktech.com/TiddlyWiki/SubmitForm/

I think the widget should be modified a bit to fit this situation, but the entire process could be done in a browser.

The problem with the widget currently is that it uses the raw text content (not the wikified content) of a tiddler and we want it to use the output of macros as the text to send.

Oh, and to clear up the confusion about the plugin library creator, the one you have titled LibraryHTML-Creator is an update to the other one that includes the html, the first part is the same as the old one, it just has the html part appended to the end of it. 

Mohammad

unread,
Apr 23, 2020, 5:59:10 AM4/23/20
to TiddlyWiki
Hi Jed,

This is really smart! Can this widget update a library hosted on GitHub also?
It seems using this widget, one can create plugins and libraries in the browser and then publish them without any hassles!

--Mohammad

Jed Carty

unread,
Apr 23, 2020, 6:05:10 AM4/23/20
to TiddlyWiki
Mohammad,

I can't take credit for Jan's idea, but I believe that using this it is possible to create a plugin library without having to do anything outside of a browser aside from putting the php script wherever it is needed.

I am not familiar enough with the non-git apis that GitHub supports to know if you could use this with GitHub. I am pretty sure that you could use GitHub to host a library, I am not sure if you would be able to update it using this.

Jan

unread,
Apr 23, 2020, 8:53:22 AM4/23/20
to tiddl...@googlegroups.com
Hi Jed,
it was your submit-form-widget that opened the world of php for me.
I am happy that you like that Idea.

Mohammed,
I do not know enough about github to say anything sure about that. This is for php-servers, i do not know whether github has this possibility.

I'll be back soon.
now I am off videoconferencing
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.

Mohammad

unread,
Apr 23, 2020, 9:13:22 AM4/23/20
to TiddlyWiki
@Jed
 I am keen to see how this work! I also use git for GitHub!

@Jan
I will eager to see how this work on php-server and then if one can use with other servers like GitHub pages!


--Mohammad
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

TonyM

unread,
Apr 23, 2020, 10:16:40 AM4/23/20
to TiddlyWiki
Me too Mohammad,

I am trying to build my own tools now, but there is still more to learn with insufficient documentation. Thank heavens for Jeds knowledge.

I am also keen to follow Jeds php post widget perhaps even to publish the library, json files and more.

With my import tools, the tiddler and json tiddler handling I have picked up recently, I see a lot of ways for sharing tiddlywiki content as if, it was not already good at it.

Regards
Tony

Jed Carty

unread,
Apr 23, 2020, 10:52:24 AM4/23/20
to TiddlyWiki
I did nothing with php. Don't give me credit for what Jan came up with.

The widget for sending http posts has been around for somewhere around 3 years, I announced it and showed how it could be used to send data into google sheets. Considering that it has been around that long it is not the interesting part here, otherwise this conversation would have happened 3 years ago.

Jan

unread,
Apr 23, 2020, 5:49:24 PM4/23/20
to tiddl...@googlegroups.com
Hi fellows,
as I now understand, this means uploading quite a lot of stuff via forms. I will have to meditate on how to do that elegantly.
Jed, can you tell why (and whether) you need the single tiddler files and a tiddlers.json? Ain't this redundant? Single tiddlers means the entire plugins...not the plugintiddlers I hope.
What is the recipies-file mentioned in the structure?
It could be an Idea to generate the folders index.html dynamically on the server by php...so that you can upload the plugins one by one and the index adjusts to the content.
Mohammad we could need your help as a regex-magician there ;-)

Best wishes to you.
Jan
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1d53506d-a13f-45a0-91b0-06a9320215a7%40googlegroups.com.

Jed Carty

unread,
Apr 23, 2020, 6:16:43 PM4/23/20
to TiddlyWiki
Jan,

I am not sure the reason the folder is called recipes, I believe it has something to do with how some system was set up while this was being developed. I think you would have to ask Jeremy why.

the things that are uploaded are the things generated by the tiddler I made, yes they are necessary. tiddlers.json is the metadata for the plugins, not the full plugins.

I think that you are thinking about this as more complex than it has to be, a single php server that can accept post and a path is plenty to do this, on the wiki side it could be done with one click. When adding plugins you just need to upload the plugin itself and update the index.html file, unless you are on a very limited bandwidth connection that shouldn't be a problem, if you manage to have enough plugins to make a 1mb index.html file I will be very impressed.

It would probably be helpful to make a plugin library and look at its structure.

Mohammad

unread,
Apr 24, 2020, 1:06:08 AM4/24/20
to TiddlyWiki
Hi Jan,
 I would be happy to help, by way Josiah and Mark are very good at regex :-)

--Mohammad

Mohammad

unread,
Apr 24, 2020, 1:11:25 AM4/24/20
to TiddlyWiki


On Friday, April 24, 2020 at 2:46:43 AM UTC+4:30, Jed Carty wrote:
Jan,

I am not sure the reason the folder is called recipes, I believe it has something to do with how some system was set up while this was being developed. I think you would have to ask Jeremy why.

Right now the folder structure is like below

- /root
-- index.html
-- /recipes
--- /library
----- tiddlers.json
----- /tiddlers

Why two nested folders that way (library under recipes ,...). So, if ask Jeremy, please ask about the folder structure too!

Jan

unread,
Apr 24, 2020, 9:00:16 AM4/24/20
to tiddl...@googlegroups.com
Hi Jed,
 it is not the size but the number of files to upload that is difficult to represent in one upload-form and recieving php .
But perhaps I only do not know the technology well enough.
So my Idea was to upload (and delete) the plugins one by one and generate index.html and the also tiddlers.json dynamically on the server by php.
Does the "index" have to be named html or can it have the ending and execute php and adapt it content and generate the json.

But I thinK you are right: this project apppears to big for me right know.

Yours Jan
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4556a7cb-1490-4d70-a695-622787414b41%40googlegroups.com.

julien23

unread,
Apr 30, 2020, 3:29:19 AM4/30/20
to TiddlyWiki
Hi all

I have a use case that may be relevant here.

I have with TWC a "library" structure I would like to reproduce on TW5

.../ProjectA/twA.html
.../ProjectB/twB.html
.../ProjectC/twC.html

Tiddlers shared by twA and twB are tagged #twA and #twB

When twB is loaded in a web browser, it silently looks for #twB tiddlers in twA and twC and copies them into itself (Abego IncludePlugin)

Tiddlers may be plugins or themes because one of the project is precisely to develop packages specific to the different types of content I handle with my wiki

Is it something that could be achieved based on your testings ?

Looking forward to finally move to TW5 :)

Regards

Julien
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.

Jeremy Ruston

unread,
Apr 30, 2020, 7:08:29 AM4/30/20
to TiddlyWiki

I am not sure the reason the folder is called recipes, I believe it has something to do with how some system was set up while this was being developed. I think you would have to ask Jeremy why.

Backing up, TiddlyWiki 5’s client-server HTTP API was designed to be compatible with the existing protocol used by TiddlyWiki Classic to talk to TiddlyWeb and later TiddlySpace.

TiddlyWeb implements a simple model for composing wikis from groups of tiddlers stored separately called “bags and recipes”. The idea is that tiddlers are stored in named bags, and that a recipe is a sequence of bags. Then we make a wiki by pulling together the tiddlers in the corresponding recipe.

The built-in TiddlyWiki 5 server is a degenerate implementation of the protocol, only supporting a single bag and a single recipe, but the TiddlyWiki 5 client has always had full support for bags and recipes.

It would be natural to use this same API for the plugin library but of course due to our unusual architecture where the plugin library is static without a server we are not able to use HTTP. Instead we use window.postMessage() to communicate with the plugin library via an embedded iframe. The implementation is an attempt to tunnel HTTP over postMessage, and so uses the same URLs that would be used with the HTTP API.

You can see the gory details of the code that talks to the iframe here:


And here’s the much simpler code that runs within the iframe:


Best wishes

Jeremy

Mohammad

unread,
May 9, 2020, 3:39:58 PM5/9/20
to tiddl...@googlegroups.com
Hi Jed,
 Do you think using the new JSZip plugin which lets to download tiddlers and create a folder structure, on can simply create a plugin library on the fly?

Ref: 


--Mohammad

Jed Carty

unread,
May 9, 2020, 6:50:51 PM5/9/20
to TiddlyWiki
Yes, I used that for something, I don't remember what. You could make a zip file with all of the files and the folder structure with a bit of JavaScript.

Mohammad

unread,
May 9, 2020, 11:58:00 PM5/9/20
to TiddlyWiki
Thanks Jed! If so, I will your procedure above + JSZip to see how can I create a library in browser!

TonyM

unread,
May 10, 2020, 5:46:37 AM5/10/20
to TiddlyWiki
Mohammad,

I would greatly appreciate your work on this. With all the activity of late it has been hard to keep up with all the innovation and I am keen to publish initially for internal activities some of my own material via a in house library with a view to more public publishing soon.

I will keep an eye on your progress and don't hesitate to ask for assistance. I can offer naive user testing :)

Thanks in advance
Tony

Mohammad Rahmani

unread,
May 10, 2020, 5:53:19 AM5/10/20
to tiddl...@googlegroups.com
Hi Tony!
 Sure I will inform you about the update!


Best wishes
Mohammad


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5ceff8ad-2473-4929-ae2f-f14e7aabba6c%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages