> Well... it's only a *partial* solution (and perhaps you're already 
aware), but you can execute an arbitrary script after running git pull ...

Since I will shortly have a similar itch to scratch, I had a peek around 
the Interwebs this morning for utilities that might do the trick. On 
Windows, this post:

   - http://stackoverflow.com/a/4162022

suggests using a small VB script (via WSH 
<https://en.wikipedia.org/wiki/Windows_Script_Host>). (I can also recommend 
AutoHotkey <http://ahkscript.org/>, but it might be overkill.)

For Linux, I found these links/suggestions:

   - http://stackoverflow.com/a/7187389 (recommends xdotool 
   <http://www.semicomplete.com/projects/xdotool/>)
   - http://stackoverflow.com/a/26632702 (recommends the Firefox Remote 
   Control <https://addons.mozilla.org/en-US/firefox/addon/remote-control/> 
   plugin)
   
Using a local post-merge hook to trigger one of these utilities (or 
something similar) ought to allow your TW page to auto-refresh whenever git 
pull receives new objects from the remote...

On Wednesday, January 4, 2017 at 6:24:27 PM UTC-5, Evade Flow wrote:
>
> Well... it's only a *partial* solution (and perhaps you're already 
> aware), but you can execute an arbitrary script after running git pull in 
> a local working copy by creating a post-merge hook like this:
>
> $ cat > .git/hooks/post-merge << EOF
> heredoc> #!/bin/sh
> heredoc> exec touch I-LIKE-TRAFFIC-LIGHTS.txt
> heredoc> EOF
>
> The problem, of course, is figuring out what to run instead of touch I-
> LIKE-TRAFFIC-LIGHTS.txt, but it's a start...
>
>
>
>
> On Wednesday, January 4, 2017 at 2:24:45 PM UTC-5, Rob Hoelz wrote:
>>
>> Hi TiddlyWiki users and devs!
>>
>> I've been using TiddlyWiki for a while now, and I've had an issue that 
>> I'm finally trying to solve.
>>
>> I use TiddlyWiki on multiple machines, and in order to synchronize 
>> changes between them, I took a dumb, but simple and effective,
>> route of just storing my wiki.html file in a Git repository and 
>> pushing/pulling between the various machines.  This works pretty well,
>> only there's a small caveat: if I pull and forget to reload the 
>> TiddlyWiki page, I can end up potentially undoing changes I made on another
>> machine.
>>
>> For example, let's say I'm working on machine S and I make a series of 
>> changes, which we'll call version A.  I pull the changes onto machine
>> T, reload the tab, and then I make some more changes, which we'll call 
>> B.  I go back to S and pull, but forget to refresh the page with TiddlyWiki 
>> open.  If
>> I make some edits and push that up, it'll be some sort of version A', 
>> which will have blown away all of the changes I made between A and B.
>>
>> Since this is in a Git repostory, it's not the end of the world - I can 
>> recover the change through the commit history.  However, this has bit me a
>> few times (and it's rather annoying to recover from), and I don't know if 
>> there are times it has happened and I've continued to use my wiki unawares
>> (I'm working on a script to detect this).  I would really like to 
>> automate this to prevent this from happening again.
>>
>> I saw this discussion[1] while searching, mentioning syncing of 
>> TiddlyWikis; there are some interesting ideas there, but I didn't see 
>> mention of the problem
>> I've been experiencing.  I've been using the auto reload firefox 
>> extension[2] for the last few days, and it largely does the job, but 
>> unfortunately it's a bit
>> overzealous - it reloads the wiki every time I save it!  It'll work for 
>> now, but I was wondering if other users had some tips or ideas on how to 
>> handle this issue.
>> Perhaps TiddlyFox could be modified to reload a wiki if it's been changed 
>> outside of the browser?
>>
>> Thanks for any help/insight you can offer!
>>
>> -Rob
>>
>> [1] https://groups.google.com/d/topic/tiddlywiki/irgt8hUmADQ/discussion
>> [2] https://addons.mozilla.org/en-US/firefox/addon/auto-reload/?src=api
>>
>

-- 
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/ee64895a-60fb-49a7-8f8a-cfcb2443c50d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to