Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-05-10 Thread Mohammad Rahmani
Hi Tony!
 Sure I will inform you about the update!


Best wishes
Mohammad


On Sun, May 10, 2020 at 2:16 PM TonyM  wrote:

> 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*
> On Sunday, May 10, 2020 at 1:58:00 PM UTC+10, Mohammad wrote:
>>
>> Thanks Jed! If so, I will your procedure above + JSZip to see how can I
>> create a library in browser!
>>
>> On Sunday, May 10, 2020 at 3:20:51 AM UTC+4:30, Jed Carty wrote:
>>>
>>> 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.
>>
>> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/5ceff8ad-2473-4929-ae2f-f14e7aabba6c%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/CAAV1gMDUWo0P6prXViJ3WV1semXaW%3DVLmn5J4BuY0j7nWiCa4Q%40mail.gmail.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-05-10 Thread TonyM
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*
On Sunday, May 10, 2020 at 1:58:00 PM UTC+10, Mohammad wrote:
>
> Thanks Jed! If so, I will your procedure above + JSZip to see how can I 
> create a library in browser!
>
> On Sunday, May 10, 2020 at 3:20:51 AM UTC+4:30, Jed Carty wrote:
>>
>> 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.
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5ceff8ad-2473-4929-ae2f-f14e7aabba6c%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-05-09 Thread Mohammad
Thanks Jed! If so, I will your procedure above + JSZip to see how can I 
create a library in browser!

On Sunday, May 10, 2020 at 3:20:51 AM UTC+4:30, Jed Carty wrote:
>
> 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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8f21c3cb-efe4-4dbc-a247-ab26eeddc32f%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-05-09 Thread Jed Carty
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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6b0a9946-1ccf-4143-b50d-7c197cae79b9%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-05-09 Thread Mohammad
Hi Jed,
 Do you thing using the new JSZip plugin whihc lets to download tiddlers 
and create a folder structure on the fly on can simply create a plugin 
library on the fly?

Ref: 

   1. https://github.com/Jermolene/TiddlyWiki5/issues/4646
   2. https://groups.google.com/d/msg/tiddlywiki/gEpIkzW5ADU/RALNIKbUAAAJ
   


--Mohammad

On Thursday, April 23, 2020 at 2:00:54 PM UTC+4:30, Jed Carty wrote:
>
> 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.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/847c245d-c4ba-438b-94f0-35cd9cf7005f%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-30 Thread julien23
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
(TWC IncludePlugin alternative for 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

On Friday, April 24, 2020 at 3:00:16 PM UTC+2, Jan wrote:
>
> 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
>
>
>
>
>
>
> Am 24.04.2020 um 07:11 schrieb Mohammad:
>
>
>
> 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!
>
>>
>> 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.
>>
> -- 
> 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 tiddl...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/4556a7cb-1490-4d70-a695-622787414b41%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/6772c898-0db8-4596-be8a-3e2e553145b4%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-24 Thread Jan

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






Am 24.04.2020 um 07:11 schrieb Mohammad:



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!



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.

--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4556a7cb-1490-4d70-a695-622787414b41%40googlegroups.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5EA2E23A.2080503%40googlemail.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Mohammad


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!

>
> 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.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4556a7cb-1490-4d70-a695-622787414b41%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Mohammad
Hi Jan,
 I would be happy to help, by way Josiah and Mark are very good at regex :-)

--Mohammad

On Friday, April 24, 2020 at 2:19:24 AM UTC+4:30, Jan wrote:
>
> 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
>
>
>
> Am 23.04.2020 um 16:16 schrieb TonyM:
>
> 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
>
>
>
>
>
> On Thursday, 23 April 2020 23:13:22 UTC+10, Mohammad wrote: 
>>
>> @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
>>
>> On Thursday, April 23, 2020 at 5:23:22 PM UTC+4:30, Jan wrote: 
>>>
>>> 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
>>>
>>>
>>> Am 23.04.2020 um 11:52 schrieb Jed Carty:
>>>
>>> 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. 
>>> -- 
>>> 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 tiddl...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/tiddlywiki/05a22ed6-9f3d-4323-b043-cf7716dffd58%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>>
>>> -- 
> 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 tiddl...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/1d53506d-a13f-45a0-91b0-06a9320215a7%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ba0f048d-037e-4aba-9006-1a2c78b755a6%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jed Carty
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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3b013abe-4db5-4e84-8062-1179435bacef%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jan

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



Am 23.04.2020 um 16:16 schrieb TonyM:

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





On Thursday, 23 April 2020 23:13:22 UTC+10, Mohammad wrote:

@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

On Thursday, April 23, 2020 at 5:23:22 PM UTC+4:30, Jan wrote:

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


Am 23.04.2020 um 11:52 schrieb Jed Carty:

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.
-- 
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 tiddl...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/tiddlywiki/05a22ed6-9f3d-4323-b043-cf7716dffd58%40googlegroups.com

.


--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1d53506d-a13f-45a0-91b0-06a9320215a7%40googlegroups.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5EA20CBE.2040202%40googlemail.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jed Carty
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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2c4935d6-e5ba-4400-bfa8-0c1521847545%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread TonyM
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





On Thursday, 23 April 2020 23:13:22 UTC+10, Mohammad wrote:
>
> @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
>
> On Thursday, April 23, 2020 at 5:23:22 PM UTC+4:30, Jan wrote:
>>
>> 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
>>
>>
>> Am 23.04.2020 um 11:52 schrieb Jed Carty:
>>
>> 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. 
>> -- 
>> 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 tiddl...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/tiddlywiki/05a22ed6-9f3d-4323-b043-cf7716dffd58%40googlegroups.com
>>  
>> 
>> .
>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1d53506d-a13f-45a0-91b0-06a9320215a7%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Mohammad
@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

On Thursday, April 23, 2020 at 5:23:22 PM UTC+4:30, Jan wrote:
>
> 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
>
>
> Am 23.04.2020 um 11:52 schrieb Jed Carty:
>
> 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. 
> -- 
> 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 tiddl...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/05a22ed6-9f3d-4323-b043-cf7716dffd58%40googlegroups.com
>  
> 
> .
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e5cc7620-c4d5-4f12-8b61-6a4f9350b987%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jan

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


Am 23.04.2020 um 11:52 schrieb Jed Carty:

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.

--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/05a22ed6-9f3d-4323-b043-cf7716dffd58%40googlegroups.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5EA18F1C.2070502%40googlemail.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jed Carty
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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/d712ccbe-9c12-4887-bb73-d8c648968c6e%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Mohammad
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


On Thursday, April 23, 2020 at 2:22:11 PM UTC+4:30, Jed Carty wrote:
>
> 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. 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b5a67d32-e174-40dd-995b-e34ca90afcee%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jed Carty
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. 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/05a22ed6-9f3d-4323-b043-cf7716dffd58%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jed Carty
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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f84a9e5e-fa2d-4c2e-b5ec-397743274abf%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-23 Thread Jan

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







Am 23.04.2020 um 03:10 schrieb TonyM:

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

On Wednesday, April 22, 2020 at 11:25:31 PM UTC+10, Jed Carty wrote:

the plugin development repo is here:
https://github.com/inmysocks/PluginDevelopment


--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a46199ec-b02a-433b-9a53-f2b6a0cd037b%40googlegroups.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5EA15B55.6070908%40googlemail.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-22 Thread TonyM
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

On Wednesday, April 22, 2020 at 11:25:31 PM UTC+10, Jed Carty wrote:
>
> the plugin development repo is here: 
> https://github.com/inmysocks/PluginDevelopment
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a46199ec-b02a-433b-9a53-f2b6a0cd037b%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-22 Thread Jed Carty
the plugin development repo is 
here: https://github.com/inmysocks/PluginDevelopment

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/93cfccfa-9e4a-4b8e-8825-827a0046b761%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-22 Thread TonyM
Jed,

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

Thanks
Tony

On Wednesday, April 22, 2020 at 6:27:25 PM UTC+10, Jed Carty wrote:
>
> 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.
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ac053650-9bae-418e-84cd-37679a38206a%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-22 Thread Jed Carty
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.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/af71ae84-3a09-492c-9f26-7b61db408232%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-21 Thread Jan

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)
`







Plugin Library

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/.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();
}

})();





HelloThere

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


See https://tiddlywiki.com/; 
target="_blank">https://tiddlywiki.com/ for details of how to 
install plugins.




`
\end

\define oneTiddler()
  <$list
filter='[fields[]] -text +[bl[]]'
  >

"<$view field='title' jsencoded/>": "<$view 
tiddler=<> field=<> format=jsencoded/>",

  
  <$list
filter='[fields[]] -text +[bl[]]'
  >

"<$view field='title' jsencoded/>": "<$view 
tiddler=<> field=<> format=jsencoded/>"

  
\end

\define jsonListing()
[
<$list
filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
  variable=theTiddler
>
  {
  <>
  
  },
  

<$list
filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
  variable=theTiddler
>
  {
  <>
  
  }
  

]
\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:''

<>

!! Tiddler JSON files:

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

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

''contents:''

<$text text=<>/>


---
''filename:'' index.html

''contents:''

<$wikify name=JSONLISTING text=<>>

<>


|


--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 

Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-21 Thread Mohammad Rahmani
Thank you Jed.
I will make some tests and share the results with you!

Best wishes
Mohammad


On Tue, Apr 21, 2020 at 3:30 PM Jed Carty  wrote:

> 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)
> `
> 
> 
> 
> 
> 
> 
> 
> 
> Plugin Library
> 
> 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/.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();
> }
>
> })();
>
> 
> 
> 
>
> HelloThere
>
> This is the TiddlyWiki plugin library. It is not intended to be opened
> directly in the browser.
>
> See https://tiddlywiki.com/; target="_blank">
> https://tiddlywiki.com/ for details of how to install plugins.
>
> 
> 
> `
> \end
>
> \define oneTiddler()
>   <$list
> filter='[fields[]] -text +[bl[]]'
>   >
> 
> "<$view field='title' jsencoded/>": "<$view
> tiddler=<> field=<> format=jsencoded/>",
>   
>   <$list
> filter='[fields[]] -text +[bl[]]'
>   >
> 
> "<$view field='title' jsencoded/>": "<$view
> tiddler=<> field=<> format=jsencoded/>"
>   
> \end
>
> \define jsonListing()
> [
> <$list
>   filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
>   variable=theTiddler
> >
>   {
>   <>
>   
>   },
>   
> 
> <$list
>   filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
>   variable=theTiddler
> >
>   {
>   <>
>   
>   }
>   
> 
> ]
> \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:''
>
> <>
>
> !! Tiddler JSON files:
>
> <$list filter={{$:/state/PluginLibrary!!filter}}>
>
> ---
> ''filename:'' <$view field='title' format='urlencoded'/>.json
>
> ''contents:''
>
> <$text text=<>/>
> 
>
> ---
> ''filename:'' index.html
>
> ''contents:''
>
> <$wikify name=JSONLISTING text=<>>
> 
> <>
> 
> 
>
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/tiddlywiki/648ee829-7bf8-49b0-abcc-fa3d0214b637%40googlegroups.com
> 

[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-21 Thread 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)
`








Plugin Library

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/.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();
}

})();





HelloThere

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

See https://tiddlywiki.com/; 
target="_blank">https://tiddlywiki.com/ for details of how to install 
plugins.



`
\end

\define oneTiddler()
  <$list
filter='[fields[]] -text +[bl[]]'
  >

"<$view field='title' jsencoded/>": "<$view 
tiddler=<> field=<> format=jsencoded/>",
  
  <$list
filter='[fields[]] -text +[bl[]]'
  >

"<$view field='title' jsencoded/>": "<$view 
tiddler=<> field=<> format=jsencoded/>"
  
\end

\define jsonListing()
[
<$list
  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
  variable=theTiddler
>
  {
  <>
  
  },
  

<$list
  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
  variable=theTiddler
>
  {
  <>
  
  }
  

]
\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:''

<>

!! Tiddler JSON files:

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

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

''contents:''

<$text text=<>/>


---
''filename:'' index.html

''contents:''

<$wikify name=JSONLISTING text=<>>

<>




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/648ee829-7bf8-49b0-abcc-fa3d0214b637%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-20 Thread Mohammad
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

On Sunday, April 19, 2020 at 2:05:20 PM UTC+4:30, Jed Carty wrote:
>
> 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='[fields[]] -text +[bl[]]'
>  >
>
>"<$view field='title' jsencoded/>": "<$view 
> tiddler=<> field=<> format=jsencoded/>",
>  
>  <$list
>filter='[fields[]] -text +[bl[]]'
>  >
>
>"<$view field='title' jsencoded/>": "<$view 
> tiddler=<> field=<> format=jsencoded/>"
>  
> \end
>
> \define jsonListing()
> [
> <$list
>  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
>  variable=theTiddler
> >
>  {
>  <>
>  
>  },
>  
> 
> <$list
>  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
>  variable=theTiddler
> >
>  {
>  <>
>  
>  }
>  
> 
> ]
> \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:''
>
> <>
>
> !! Tiddler JSON files:
>
> <$list filter={{$:/state/PluginLibrary!!filter}}>
>
> ---
> ''filename:'' <$view field='title' format='urlencoded'/>.json
>
> ''contents:''
>
> <$text text=<>/>
> 
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/144f291e-9a0f-417b-a6c7-3636305fc9db%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-20 Thread TonyM
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

On Monday, 20 April 2020 19:36:09 UTC+10, Jed Carty wrote:
>
> 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[]]">
> "{{{ [] +[jsonstringify[]] }}}": <$text 
> text=<>/>,
> <$list filter="[subfilter{$:/state/MakePlugin!!filter}]+[last[]]">
> "{{{ [] +[jsonstringify[]] }}}": <$text 
> text=<>/>
> }
> }
> \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=<>>
> <$action-setfield $tiddler={{$:/state/MakePlugin!!name}} 
> text=<> type='application/json' 
> description={{$:/state/MakePlugin!!description}} core-version=">=5.0.0" 
> dependents="" list={{$:/state/MakePlugin!!list}} plugin-type="plugin" 
> version={{$:/state/MakePlugin!!version}}/>
> 
> 
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/20f3099f-7397-43d6-a7a8-ba359d0332ba%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-20 Thread Mohammad
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

On Monday, April 20, 2020 at 2:06:09 PM UTC+4:30, Jed Carty wrote:
>
> 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[]]">
> "{{{ [] +[jsonstringify[]] }}}": <$text 
> text=<>/>,
> <$list filter="[subfilter{$:/state/MakePlugin!!filter}]+[last[]]">
> "{{{ [] +[jsonstringify[]] }}}": <$text 
> text=<>/>
> }
> }
> \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=<>>
> <$action-setfield $tiddler={{$:/state/MakePlugin!!name}} 
> text=<> type='application/json' 
> description={{$:/state/MakePlugin!!description}} core-version=">=5.0.0" 
> dependents="" list={{$:/state/MakePlugin!!list}} plugin-type="plugin" 
> version={{$:/state/MakePlugin!!version}}/>
> 
> 
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/8d9cca1c-db45-4d1f-b52d-2a3360918495%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-20 Thread Jed Carty
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[]]">
"{{{ [] +[jsonstringify[]] }}}": <$text 
text=<>/>,
<$list filter="[subfilter{$:/state/MakePlugin!!filter}]+[last[]]">
"{{{ [] +[jsonstringify[]] }}}": <$text 
text=<>/>
}
}
\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=<>>
<$action-setfield $tiddler={{$:/state/MakePlugin!!name}} 
text=<> type='application/json' 
description={{$:/state/MakePlugin!!description}} core-version=">=5.0.0" 
dependents="" list={{$:/state/MakePlugin!!list}} plugin-type="plugin" 
version={{$:/state/MakePlugin!!version}}/>




-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/88b159c3-ce56-44fb-9695-7cfa7d798379%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread TonyM
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


On Monday, April 20, 2020 at 9:46:18 AM UTC+10, TonyM wrote:
>
> 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
>
> On Sunday, April 19, 2020 at 7:35:20 PM UTC+10, Jed Carty wrote:
>>
>> 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='[fields[]] -text +[bl[]]'
>>  >
>>
>>"<$view field='title' jsencoded/>": "<$view 
>> tiddler=<> field=<> format=jsencoded/>",
>>  
>>  <$list
>>filter='[fields[]] -text +[bl[]]'
>>  >
>>
>>"<$view field='title' jsencoded/>": "<$view 
>> tiddler=<> field=<> format=jsencoded/>"
>>  
>> \end
>>
>> \define jsonListing()
>> [
>> <$list
>>  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
>>  variable=theTiddler
>> >
>>  {
>>  <>
>>  
>>  },
>>  
>> 
>> <$list
>>  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
>>  variable=theTiddler
>> >
>>  {
>>  <>
>>  
>>  }
>>  
>> 
>> ]
>> \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:''
>>
>> <>
>>
>> !! Tiddler JSON files:
>>
>> <$list filter={{$:/state/PluginLibrary!!filter}}>
>>
>> ---
>> ''filename:'' <$view field='title' format='urlencoded'/>.json
>>
>> ''contents:''
>>
>> <$text text=<>/>
>> 
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/1df17010-b1be-4ed7-bea3-21c685f33bfe%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread TonyM
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

On Sunday, April 19, 2020 at 7:35:20 PM UTC+10, Jed Carty wrote:
>
> 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='[fields[]] -text +[bl[]]'
>  >
>
>"<$view field='title' jsencoded/>": "<$view 
> tiddler=<> field=<> format=jsencoded/>",
>  
>  <$list
>filter='[fields[]] -text +[bl[]]'
>  >
>
>"<$view field='title' jsencoded/>": "<$view 
> tiddler=<> field=<> format=jsencoded/>"
>  
> \end
>
> \define jsonListing()
> [
> <$list
>  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
>  variable=theTiddler
> >
>  {
>  <>
>  
>  },
>  
> 
> <$list
>  filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
>  variable=theTiddler
> >
>  {
>  <>
>  
>  }
>  
> 
> ]
> \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:''
>
> <>
>
> !! Tiddler JSON files:
>
> <$list filter={{$:/state/PluginLibrary!!filter}}>
>
> ---
> ''filename:'' <$view field='title' format='urlencoded'/>.json
>
> ''contents:''
>
> <$text text=<>/>
> 
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7bfa7b48-2224-4537-9348-63245ac07238%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Mohammad
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=< "jsontiddlers Macro">>/>,
>
>

Should be note to the input parameter in jsontiddler

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




-- 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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a4b91271-4ac7-4048-8799-3e2cd7f0f5a6%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Mohammad
Thank you Jed,
 I could reproduce your result. Would you please test with 
filter: [tag[Learning]]


--Mohammad


On Sunday, April 19, 2020 at 4:16:49 PM UTC+4:30, Jed Carty wrote:
>
> 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?
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/eefe9a98-e473-4dd2-a348-deb53d962e2b%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Jed Carty
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?

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f502dd5b-3157-4c54-98c5-2b4d4c54fdaf%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Mohammad
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

```





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=< "jsontiddlers Macro">>/>,
> 
> <$list filter='[subfilter{$:/state/MakePlugin!!filter}]+[last[]]'>
> "<$view field=title format=jsencoded/>": <$text text=< "jsontiddlers Macro">>/>
> }
> }
> \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="<>">
> <$action-setfield $tiddler={{$:/state/MakePlugin!!name}} 
> text=<> type='application/json' 
> description={{$:/state/MakePlugin!!description}} core-version=">=5.0.0" 
> dependents="" list={{$:/state/MakePlugin!!list}} plugin-type="plugin" 
> version={{$:/state/MakePlugin!!version}}/>
> 
> 
> ```
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/061169e3-bca2-4a9c-8d52-a71e21f9ed6c%40googlegroups.com.


Re: [tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Jan

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


Am 19.04.2020 um 07:38 schrieb Mat:
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?


<:-)
--
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+unsubscr...@googlegroups.com 
.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/03b4a9ae-9cf3-4bfd-9ee4-608fee605bb8%40googlegroups.com 
.


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5E9C296C.7090205%40googlemail.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Jed Carty
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='[fields[]] -text +[bl[]]'
 >
   
   "<$view field='title' jsencoded/>": "<$view 
tiddler=<> field=<> format=jsencoded/>",
 
 <$list
   filter='[fields[]] -text +[bl[]]'
 >
   
   "<$view field='title' jsencoded/>": "<$view 
tiddler=<> field=<> format=jsencoded/>"
 
\end

\define jsonListing()
[
<$list
 filter='[subfilter{$:/state/PluginLibrary!!filter}] +[bl[]]'
 variable=theTiddler
>
 {
 <>
 
 },
 

<$list
 filter='[subfilter{$:/state/PluginLibrary!!filter}] +[last[]]'
 variable=theTiddler
>
 {
 <>
 
 }
 

]
\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:''

<>

!! Tiddler JSON files:

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

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

''contents:''

<$text text=<>/>


-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/854ee27e-fefc-45a9-8f5a-81352e581b7e%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Jed Carty
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=<>/>,

<$list filter='[subfilter{$:/state/MakePlugin!!filter}]+[last[]]'>
"<$view field=title format=jsencoded/>": <$text text=<>/>
}
}
\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="<>">
<$action-setfield $tiddler={{$:/state/MakePlugin!!name}} 
text=<> type='application/json' 
description={{$:/state/MakePlugin!!description}} core-version=">=5.0.0" 
dependents="" list={{$:/state/MakePlugin!!list}} plugin-type="plugin" 
version={{$:/state/MakePlugin!!version}}/>


```

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/959b6482-67eb-4aae-a544-26ad92f69186%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread TonyM
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

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/0460d2c5-2b07-426f-880b-67958803e5aa%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread TonyM
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 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f00c4215-fe6b-4db1-a51e-6149d5fe3a11%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-19 Thread Mohammad
Jan,

 Until I had not seen the ebook edition announced by Xavier, I did not even 
imagine one can distribute contents using plugin!
 Url: https://groups.google.com/d/msg/tiddlywiki/_VLufc4Svp8/jALzYZ09BAAJ

 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
  See 
here: https://groups.google.com/d/msg/tiddlywikidev/6uhnRwiz9Ik/NqVi2951AQAJ

 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


On Sunday, April 19, 2020 at 1:41:02 AM UTC+4:30, Jan wrote:
>
> 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 
>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3bb50d68-d00e-4edc-b8bf-c92c9534508a%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-18 Thread Mohammad
Amazing!
 Thanks for sharing this Tony!

On Sunday, April 19, 2020 at 4:40:45 AM UTC+4:30, TonyM wrote:
>
> 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
>
>
> On Sunday, April 19, 2020 at 7:11:02 AM UTC+10, Jan wrote:
>>
>> 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 
>>
>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c8853eef-63e2-4b5c-832f-e646c4ee6ac9%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-18 Thread Mat
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?

<:-)

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/03b4a9ae-9cf3-4bfd-9ee4-608fee605bb8%40googlegroups.com.


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-18 Thread TonyM
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


On Sunday, April 19, 2020 at 7:11:02 AM UTC+10, Jan wrote:
>
> 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 
>
>
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/ff197fb1-100f-4db4-b8f3-80d2ac2ad475%40googlegroups.com.


Copy Text import.tid
Description: Binary data


[tw5] Re: Is it possible to host a Plugin-Library for content?

2020-04-18 Thread Mat
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).

<:-)

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3cb30892-a1d2-45a9-a9dd-9b93075581f1%40googlegroups.com.