Re: [tw] Running TW5 on TiddlyWeb

2016-04-15 Thread Robert Kreuzer
Hi Jeremy,

thanks for the explanation, that makes sense to me.

Right now it was still quite hard to get TiddlyWeb and TW5 working together 
for someone with no prior knowledge like me (and would have been impossible 
without Chris' help).
So I thought maybe I could contribute some docs to describe how to set 
everything up. But I'm not sure where the best place to do so would be.
I see that Chris' pull request merges the TW5-specific changes into the 
'tw5tank' edition. But then there is also a 'tw5tiddlyweb' edition, which 
would maybe be the better place?

Best,
Robert



On Tuesday, April 12, 2016 at 3:43:29 PM UTC+2, Jeremy Ruston wrote:
>
> Hi Robert 
>
> The built-in server of TiddlyWiki5 is designed for personal use; TiddlyWeb 
> is intended to be the official multi-user back end that’s tough enough to 
> be exposed on the public Internet. 
>
> Best wishes 
>
> Jeremy. 
>
>
> > On 11 Apr 2016, at 11:33, chris...@gmail.com  wrote: 
> > 
> > On Sun, 10 Apr 2016, Robert Kreuzer wrote: 
> > 
> >> While working on this, I realized that TiddlyWiki itself now also comes 
> >> with a simple server-side component using NodeJS. 
> >> I was wondering what the differences/advantages of using it are rather 
> than 
> >> using TiddlyWeb as the server-side? 
> >> 
> >> It looks to me as if TiddlyWeb has a lot more features but is currently 
> >> also quite hard to integrate with TW5. 
> >> Are there some fundamental differences that make one more suitable than 
> the 
> >> other for a multi-user TW5? 
> > 
> > As far as I recall TW5's server doesn't support users (or at least 
> > not multiple users) at all. Nor does it support TiddlyWeb's concept 
> > of policies[1], recipes[2] and filters[3] in any significant way. 
> > 
> > Recipes are effectively the reason TiddlyWeb was created in the 
> > first place. Since then things like serializers[5] and plugins[6] 
> > have made it very flexible and capable. 
> > 
> > [1] https://tank.peermore.com/tanks/tiddlyweb/policy 
> > [2] https://tank.peermore.com/tanks/tiddlyweb/recipe 
> > [3] http://tweb-filters.tiddlyspace.com/ [4] 
> > [4] The filters content will be moving off tiddlyspace soon. 
> > [5] https://tank.peermore.com/tanks/tiddlyweb/serializer 
> > [6] https://tank.peermore.com/tanks/tiddlyweb/plugins 
> > 
> > -- 
> > Chris Dent   http://burningchrome.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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c2be4d83-64fe-4497-a562-fc0d2975cfe5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Running TW5 on TiddlyWeb

2016-04-10 Thread Robert Kreuzer
Thanks again for your input and apologies for my late response (I only find 
time on weekends to work on this unfortunately). But following your 
instructions and some trial and error I have now managed to make it all 
work together.
I now built the modified edition of TW5 and it is talking to the TiddlyWeb 
server, which is very cool. These were the necessary steps (in case 
somebody else wants to try this):


   1. git clone g...@github.com:Jermolene/TiddlyWiki5.git tiddlywiki5
   2. cd tiddlywiki5
   3. Adapt all the files as per the diff above
   4. ./tiddlywiki.js wiki –init tw5tank
   5. cd wiki
   6. ./../tiddlywiki.js ../wiki –rendertiddler $:/core/save/all index.html 
   text/plain
   7. firefox output/index.html
   8. Run the modified tiddlyweb server with "twanager server"
   
While working on this, I realized that TiddlyWiki itself now also comes 
with a simple server-side component using NodeJS.
I was wondering what the differences/advantages of using it are rather than 
using TiddlyWeb as the server-side?

It looks to me as if TiddlyWeb has a lot more features but is currently 
also quite hard to integrate with TW5.
Are there some fundamental differences that make one more suitable than the 
other for a multi-user TW5?


On Wednesday, March 30, 2016 at 1:53:55 PM UTC+2, Chris Dent wrote:
>
> On Fri, 25 Mar 2016, Robert Kreuzer wrote: 
>
> > I have followed your instructions as far as I understood them, but I 
> > unfortunately know too little about tiddlyweb to make sense of 
> everything. 
>
> Apologies for not keeping track of this as much as I initially 
> promised. Without further input from the TW5 experts it can only get 
> so far and so far we've not really heard from them... 
>
> > 1. created a test instance in tiddlyweb with `twinstance test` 
> > 2. Added the tiddlywebplugins.status and tiddlywebplugins.cors plugins 
> to 
> > test/tiddlywebconfig.py ('system_plugins': ['tiddlywebwiki', 
> > 'tiddlywebplugins.status', 'tiddlywebplugins.cors']) 
>
> You'll also need these settings: 
>
>  ‘cors.enable_non_simple’: True, 
>  ‘cors.allow_creds’: True, 
>  ‘cors.match_origin’: True, 
>
> > 3. Create a new recipe called 'somerecipe' using: curl -X PUT -H 
> > 'Content-Type: application/vnd.tiddlyweb+json' -d 
> > '{"recipe":[["system",""],["common",""]]}' 
> > http://0.0.0.0:8080/recipes/somerecipe 
>
> This is right. 
>
> > Does this make sense so far? If I understand you correctly, I should now 
> > have a $:/config/tiddlyweb/recipe that points to 'somerecipe'. 
> > But I'm not sure where the TW5 files should go in my 'test' instance. 
> And 
> > do I just clone the TW5 repo and copy it in, or is there some other way 
> to 
> > do this? 
>
> This is the tricky tw5 part. There are changes necessary to code 
> within the tw5 repo to make things go. Those changes are shown in 
> this diff: 
>
>  
> https://github.com/Jermolene/TiddlyWiki5/compare/master...cdent:cd/tiddlywebforrealz
>  
>
> Where I've put 'foo' in 'tiddlyweb-recipe.tid' you would put 
> 'somerecipe'. 
>
> With those changes in place you can then build a TW5 following the 
> build instructions available with tidldywiki5. 
>
> I'm hoping someone will step up from the tw5 side to provide some 
> detailed instructions on how to do that and maybe how to most 
> effectively get the tiddlywebadaptor.js code working properly with 
> tiddlyweb. 
>
> The end goal here is making it possible for a local tiddlywiki html 
> file to talk to a tiddlyweb server effectively. I've made it work, 
> quite well, but it requires a lot of hacking into the TiddlyWiki 
> code (as shown by the diff above). 
>
> -- 
> Chris Dent   http://burningchrome.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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b1358cad-d89e-4850-b8e2-78fd771b7b9e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Re: Running TW5 on TiddlyWeb

2016-03-25 Thread Robert Kreuzer
Hi Chris,

I have followed your instructions as far as I understood them, but I 
unfortunately know too little about tiddlyweb to make sense of everything. 
Here is what I have done:

1. created a test instance in tiddlyweb with `twinstance test`
2. Added the tiddlywebplugins.status and tiddlywebplugins.cors plugins to 
test/tiddlywebconfig.py ('system_plugins': ['tiddlywebwiki', 
'tiddlywebplugins.status', 'tiddlywebplugins.cors'])
3. Create a new recipe called 'somerecipe' using: curl -X PUT -H 
'Content-Type: application/vnd.tiddlyweb+json' -d 
'{"recipe":[["system",""],["common",""]]}' 
http://0.0.0.0:8080/recipes/somerecipe

Does this make sense so far? If I understand you correctly, I should now 
have a $:/config/tiddlyweb/recipe that points to 'somerecipe'.
But I'm not sure where the TW5 files should go in my 'test' instance. And 
do I just clone the TW5 repo and copy it in, or is there some other way to 
do this?

Thanks,
Robert

On Monday, March 14, 2016 at 11:08:09 PM UTC+1, Chris Dent wrote:
>
> On Mon, 14 Mar 2016, Chris Dent wrote: 
>
> > * Either create a new edition for tiddlywiki5 which could be described 
> as 
> > "standalone access to tiddlyweb", or make the existing tw5tiddlyweb 
> edition 
> > support that use case as well. 
> > * Such as edition would need to account for the changes to 
> > tiddlywebadaptor.js described above. Probably by effectively branching 
> in 
> > the right places based on certain conditions. This is hard for me to do 
> > because I don't know the available contextual variables. 
>
> There's a very rough diff of my local tw5 changes here: 
>
> https://github.com/Jermolene/TiddlyWiki5/compare/master...cdent:cd/tiddlywebforrealz
>  
>
> -- 
> Chris Dent   http://burningchrome.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 post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/55b29d16-d855-4e23-bfd8-d08731d1fdea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.