> > Directly creating/editing files in the tiddlers directory requires a > restart of the nodejs server, followed by a refresh of the browser > window, for any changes to go through >
You said that you are new to TiddlyWiki, so firstly TiddlyWiki runs as a SPA (Single Page Application) within the browser. The server merely constructs the application and sends it as a solitary HTML file to the browser. *All the tiddlers are included* within that solitary file. All your content is already contained there. So, the application will not see the changes you directly made to the server under normal circumstances. You would need to fully reload the page anew, thus forcing the server to create it anew. But some browsers will cache the page, so you may need to force the browser to do a full refresh. If a user saves the page to their local file system, they don't even need the server at all unless there are specific links to content there, such as images. Again, the entire app/website is contained within that single file that was served up to the browser. Lastly, the server and the App both cache things, so if you are using a text editor to directly edit the tiddlers externally on the server, then there is a good chance that some of these changes will not be visible to the server while it is running. Using the REST API (GET/PUT/DELETE) seems straight forward enough for > getting, editing, or creating text based tiddlers. However, > it's undocumented > This server.js <https://github.com/Jermolene/TiddlyWiki5/blob/1530b3e2d8d76f39caed56024e7a0d1ecc260354/core/modules/commands/server.js> page and this libraryserver.js <https://github.com/Jermolene/TiddlyWiki5/blob/ffc0899f52b45ba2b5a5a20fb909dcc587e80b3e/plugins/tiddlywiki/pluginlibrary/libraryserver.js> page should give you all the information you need if you wish to write your own mini-client for the server. Regarding the examples you provided discussing some of your ideas, if you know how to write JavaScript inside your browser to do what you want, then you can do the same within TiddlyWiki. You can either write a plugin, or simply save the JavaScript making sure you select the `application/javascript` content type when you save that tiddler. The JavaScript will then be executable within the browser. TiddlyWiki has its own Domain Specific Language comprised largely of what it calls Widgets, Macros, Actions, Buttons, Messages and more. You can find detailed information on the internals of TiddlyWiki by referencing the developer wiki here <http://tiddlywiki.com/dev/>. Best regards, Doug On Sunday, April 2, 2017 at 5:29:14 PM UTC-5, Dan L. wrote: > > My goal is to use TidyWiki as a repository for personal notes and > journals (i.e. Evernote). I'm new to using TiddlyWiki, but comfortable > with scripting and development. I'd like to get some input from more > experienced users on how they approach creating and editing tiddler > content (or integrating in general) outside of manually creating > tiddlers. > > The two approaches I could find were editing files directly, and using > the REST API. > > * Directly creating/editing files in the tiddlers directory requires a > restart of the nodejs server, followed by a refresh of the browser > window, for any changes to go through. > * Using the REST API (GET/PUT/DELETE) seems straight forward enough for > getting, editing, or creating text based tiddlers. However, it's > undocumented so I'm not sure if there's steps I might be missing > (updating indexes, etc.) and I'd have to check into how to handle any > new content such as images. Also, it seems a browser refresh is also > necessary to render any changes. > > Some examples of things I'd like to do: > > * Append entries to a day specific tiddler, either automatically (i.e. I > have a simple script to connect/disconnect from my work VPN and open > related applications, it could also add lines that have the time and > connection/disconnection for time tracking) or manually through the > command line. > * Poll my Pinboard account for new bookmarks, then create corresponding > Tiddlers in TiddlyWiki, which I may later use for annotations/notes on > resources. > * Have a daemon watching a directory so if I put a photo in Dropbox from > my phone, it will import it. > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" 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/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/43227d1d-09cd-494c-b67c-e43755e4d2d7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
