I finally got it to work just as I imagined! I can now create and open tiddlers in seconds containing whatever data I want. Thanks so much!
Jeremy, *If you look at the “network” tab of developer tools while you run that snippet you’ll see that it generates the same underlying HTTP request as we’ve discussed earlier in the thread.* I didn't know this, and it was extremely helpful. *Chrome isn’t particularly easy to automate; you’d probably need to write an extension.* You were right again, this is exactly what I needed to do. *The issue you ran into whereby the change you made on the server wasn’t propagated to the browser is because the default polling interval is 60 seconds. You can manually force a poll by clicking the “refresh” button in the “Server” tab of control panel. * I am still unsure what you mean by this. When I tried modifying the $:/StoryList file, it did not change which tiddlers were open. Nothing I could do helped. Not refreshing, not restarting the server, and not clicking the "refresh" button in the "server" tab as you suggested. In fact, to quote the help tiddlers themselves: "The $:/StoryList <http://tiddlywiki.com/static/%2524%253A%252FStoryList.html> tiddler is an example of a StateTiddler <http://tiddlywiki.com/static/StateTiddler.html>: a tiddler that is used to hold the state of the user interface. Changes to the user interface are made indirectly, by changing the underlying state tiddlers, and letting TiddlyWiki <http://tiddlywiki.com/static/TiddlyWiki.html> ripple the changes through the user interface." To be honest, I'm not sure I understand entirely. But what I do know is that $:/StoryList is fundamentally different from other tiddlers. In the end, I accomplished my goal by injecting the javascript I mentioned above into the page through a Chrome extension. I have the injected script itself running on a separate server, so I can make changes to it and automate it. Thanks again for your ideas, and for making such a versatile program. Best, Matt On Monday, February 20, 2017 at 7:40:27 AM UTC-5, Jeremy Ruston wrote: > > Hi Matt > > Well I was going to post some of my updated findings and ask again for > help, when all of a sudden I stumbled upon what may be the answer. All I > had to do was run this javascript snippet in Chrome: > > var storyList = "TiddlerIWantToOpen" > $tw.wiki.addTiddler({title: "$:/StoryList", text: "", list: > storyList},$tw.wiki.getModificationFields()); > > > If you look at the “network” tab of developer tools while you run that > snippet you’ll see that it generates the same underlying HTTP request as > we’ve discussed earlier in the thread. > > This works perfectly. Now I am just looking for a way to automate the > running of this snippet. (Does anyone happen to know how one can automate a > javascript snippet in Chrome?) > > > Chrome isn’t particularly easy to automate; you’d probably need to write > an extension. > > Is there a reason why all of the http stuff was suggested? This seems like > a more direct solution. > > > Because your original post mentioned that you wanted to do display a > tiddler “from an external script”. The most direct way for an external > script to interact with TiddlyWiki under Node.js is the HTTP interface. > > The issue you ran into whereby the change you made on the server wasn’t > propagated to the browser is because the default polling interval is 60 > seconds. You can manually force a poll by clicking the “refresh” button in > the “Server” tab of control panel. > > Best wishes > > Jeremy. > > > On Wednesday, February 15, 2017 at 7:11:00 PM UTC-5, Matt Groth wrote: >> >> Hi Jeremy, >> >> You're right, the regular http.request was the way to go. After I lot of >> fiddling, I managed to get update tiddlers with normal HTTP requests! >> >> When I send a request, I see this terminal output: >> >> syncer-server: Dispatching 'save' task: $:/StoryList >> FileSystem: Saved file /Users/Matt/TiddlyMusic/tiddlers/$__StoryList.tid >> >> >> While the .tid file is updated instantly, my TiddlyWiki in Chrome does >> not sync with the server until I interact with it in some way, such as >> opening or closing a tiddler. Then, I see the above terminal output again >> and the changes from my HTTP request appear. >> >> However, changes to $:/StoryList do not sync at all, so I am still unable >> to automate the opening and closing of tiddlers. I have my $:/StoryList.tid >> text file open, and the 'list' property is changed in that file to exactly >> what I want. Also, the above terminal output occurs. However, when I do >> anything to my opened TiddlyWiki, whether it involves opening and closing >> tiddlers or not, the currently opened tiddlers in my browser simply >> overwrite whatever was in $_StoryList.tid previously. >> >> How can I command TiddlyWiki in my browser to load changes to tiddler >> values, including $_StoryList.tid? >> >> Thanks, >> Matt >> >> On Tuesday, February 14, 2017 at 9:43:08 AM UTC-5, Jeremy Ruston wrote: >>> >>> Hi Matt >>> >>> On 14 Feb 2017, at 13:32, Matt Groth <mgro...@gmail.com> wrote: >>> >>> The http.get request can also be seen in my network manager. Do you know >>> why the http.post might not be working, given that http.get does work? >>> >>> >>> I’m not familiar with the http-post library that you’re using; perhaps >>> it’s doing something funky. I’d be inclined to just use the http module >>> unadorned. >>> >>> Best wishes >>> >>> Jeremy >>> >> > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to tiddlywiki+...@googlegroups.com <javascript:>. > To post to this group, send email to tiddl...@googlegroups.com > <javascript:>. > 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/9248c985-8fc3-4da7-b5a4-49961a938cd9%40googlegroups.com > > <https://groups.google.com/d/msgid/tiddlywiki/9248c985-8fc3-4da7-b5a4-49961a938cd9%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 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/2e1f5c25-025c-4a81-b9e6-b828b01d54f1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.