For watching other wikis for changes, you would probably need to manually
load those changes into the server wiki using a separate script from the
one above, which would then trigger that script to send the changes to the
client.

If you are watching your own folder, I think it would work basically the
same way. Don't forget to take folder prefixes into account. Check the file
system adapter to see where and how it saves files and load the files using
the same settings. It might not matter though since you want to load all
changed files anyway. How do you have it setup if the metadata and actual
data files are two separate files?

Hope that helps.
Arlen

On Sat, Nov 4, 2017 at 6:01 PM, Arlen Beiler <[email protected]> wrote:

> If you are communicating between the server command and its client
> instance, then ignore the file system sync adapter and watch for changes
> directly on the wiki.
>
> Aren't you using the file system adapter to sync changes from the NodeJS
> server to the file system?
>
> I am imagining that you want to watch the wiki on the server for changes
> and immediately send a message to the client as soon as there is a change.
> In that case, I would add a startup module that calls
> wiki.addEventListener("change", function(changes) {}). Where you get your
> wiki variable, I'm not sure, but look at the other startup modules to see
> how it works. You might even be able to push a list of the changed tiddlers
> to the client, where you can trigger a refresh of those tiddlers directly I
> believe.
>
> Hope that helps.
>
> Arlen
>
> On Sat, Nov 4, 2017 at 5:49 PM, Jed Carty <[email protected]> wrote:
>
>> I have the message handlers and the connection, the part that I am
>> lacking right now is whatever gets the save hook from the wiki so that I
>> can make it send the message to save the files on the file system. I can
>> manually send things to be saved on the file system and when I do that it
>> changes propagate quickly enough to be usable, but I don't want to reinvent
>> the wheel because there is already a framework in place for 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 [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at https://groups.google.com/group/tiddlywiki.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/tiddlywiki/ad9b39f2-6023-41bb-b460-48b53d74a35b%40googlegroups.com
>> <https://groups.google.com/d/msgid/tiddlywiki/ad9b39f2-6023-41bb-b460-48b53d74a35b%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/CAJ1vdSTheEdQ9i9WJHu0XXyBhgcM6LOLk0dN_TWbctR3fB4FpQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to