Thank you, interesting, I hadn't seen this plugin previously.  I've put a 
link to this thread in the addendum; but I will enlarge the section and put 
an explicit link to the plugin and include your code snippet too.  
Incidentally do you have a home page / social media profile so I can 
attribute you correctly (assuming you wanted that)?  

Incidentally my blog posts are always like this - it is only when I've 
finished them I find half a dozen interesting new ways of approaching the 
problem :)

Yours
Gene

On Friday, July 9, 2021 at 10:24:15 AM UTC+1 [email protected] wrote:

> @Gene this plugin might be worth a look too:
>
>
> https://github.com/linonetwo/tiddlywiki-plugins/tree/master/plugins/linonetwo/watch-fs
>
> "This plugin enables TiddlyWiki to watch the change in your disk, and if 
> you edit one of your tiddler using editor likes VSCode and save it on the 
> disk, the change will immediately reflected in the browser."
>
> On Wednesday, July 7, 2021 at 8:01:46 PM UTC+2 [email protected] 
> wrote:
>
>> @Saq - Ha yes, that's a neat way of getting around the need for nodemon, 
>> that I hadn't considered (mostly as I was ignorant of the API / focussed on 
>> writing to the folder).  And you could call a bash script from Vim, or as 
>> @David Shaw points out an even tidier way would be to write it with VimL.  
>>
>> If I have time for a project prior to the next release, I might give it a 
>> whirl.  Thanks for the suggestion / education.
>>
>> Yours,
>> Gene
>>
>> On Wednesday, July 7, 2021 at 10:22:19 AM UTC+1 David Shaw wrote:
>>
>>> Like Saq, I'm no Vim expert, but there's also the built in VimL language 
>>> that might be able to do this without having to invoke external scripts.
>>>
>>> And thanks for the original post - very interesting and possibly of use 
>>> to me.
>>>
>>> Many thanks,
>>> David Shaw
>>>
>>>
>>> On Wed, 7 Jul 2021, 09:50 Saq Imtiaz, <[email protected]> wrote:
>>>
>>>> Hi Gene,
>>>>
>>>> For the specific use case that your video demonstrates, i.e. creating 
>>>> short new tiddlers rather than editing existing ones, have you considered 
>>>> the following workflow:
>>>>
>>>> - don't write your newly created tiddler files to the wiki directory.
>>>> - instead have vim do a PUT request with cURL to the tiddlywiki to save 
>>>> the tiddler.
>>>>
>>>> API: 
>>>> https://tiddlywiki.com/#WebServer%20API%3A%20Put%20Tiddler:%5B%5BWebServer%20API%3A%20Put%20Tiddler%5D%5D
>>>>
>>>> Example:
>>>>
>>>> curl -X PUT -i 'http://192.168.0.12:8080/recipes/default/tiddlers/
>>>> NewTiddlerTitle' --data '{
>>>>  "tags": "firstTag anotherTag",
>>>>  "creator": "gene",
>>>>  "modifier": "gene",
>>>>  "text": "The use of knowledge in society"
>>>> }' -H "X-Requested-With: TiddlyWiki"
>>>>
>>>> I don't use VIM myself but as far as I know it can execute bash scripts 
>>>> so you could set one up to do the PUT with cURL. Alternatively there seem 
>>>> to be VIM plugins specifically for interacting with APIs.
>>>>
>>>> Cheers,
>>>> Saq
>>>>
>>>>
>>>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3a284643-5702-4a2d-b43b-dc47960b5363n%40googlegroups.com.

Reply via email to