Hi Marc

> Thanks Jeremy. I'm looking at using the `child_process` module but I don't 
> see any node_modules/ folder in TW Desktop. Could you give me a leg up on how 
> to import a module?

TiddlyDesktop doesn’t use node_modules at the moment. You’ll need to research 
the details of how nw.js handles node_modules, but it definitely works.

> Bonus Question: If you could hack a small plugin which shows a button which 
> execs say `ls` and returns (alerts) the string that would be awesome.

It’s not a trivial amount of work, I’m afraid. There is no direct access 
between the TiddlyDesktop main process and the content of a wiki. To devise a 
way for the wiki to request that the main process executes a code fragment, you 
might want to to look at how saving is handled using the DOM for message 
transfer. You’d need to rig up something similar so that a hosted wiki can 
request that a code fragment be executed.

Just to be clear, your goals here are ambitious and unusual. I don’t know of 
anyone else who’s done the same thing. So there’s going to be quite a lot of 
slog to get there: you’ll need to learn a lot of the details of how things work 
so that you can copy/extend things. As a programmer, I’d say that it’s the 
recipe for absorbing entertainment, but it’s not for everyone :)

Best wishes

Jeremy

> 
>  const exec = require('child_process').exec;
>  exec('ls', (err, stdout, stderr) => {
>   if (err) {
>    console.error(err);
>    return;
>   }
>   console.log(stdout);
>  });
> 
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/tiddlywikidev 
> <https://groups.google.com/group/tiddlywikidev>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywikidev/9fee8f58-22e0-4627-9438-0ba7c1d6962c%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywikidev/9fee8f58-22e0-4627-9438-0ba7c1d6962c%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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/A5CE42B9-7D74-40D3-8345-9B92F0F02026%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to