[tw] Re: [TW5] How to use images with node.js ?

2015-08-09 Thread Peter Merel
I just hit this issue this evening and I have a better solution I'll be implementing for myself in the morning. Basically, I run the node server on my local box to be able to edit my tiddlers just as you'd expect. But I back the entire shebang with git and serve it up publicly via github

[tw] Re: [TW5] How to use images with node.js ?

2015-05-13 Thread Michele Zaffalon
Thanks for sharing the macro. I use a slightly different one \define img(img, img_url) a href=http://localhost:8084/$img_url$; target=_blankimg src= http://localhost:8084/$img$//a \end because I want to link to the image: the image I display is a scaled-down version of the linked one. Even on

Re: [tw] Re: [TW5] How to use images with node.js ?

2015-05-12 Thread Jeremy Ruston
Hi Mark Yes, all the work-arounds I suggested are currently doable. The problem with exporting images is that there isn't a reverse process for importing them (with embedded images) back into node.js. What do you mean by exporting images? Are you talking about saving a standalone HTML file

Re: [tw] Re: [TW5] How to use images with node.js ?

2015-05-12 Thread 'Mark S.' via TiddlyWiki
Yes. I mean the process by which embedded images can be converted into external images. Then TW can then be rendered out of nodejs into a stand-alone TW. That would be good if you were going offline or away from home base. But when you came back, there is no way to take those external images

Re: [tw] Re: [TW5] How to use images with node.js ?

2015-05-12 Thread Jeremy Ruston
Just to point out that there is a GitHub issue addressing this point: https://github.com/Jermolene/TiddlyWiki5/issues/1000 I can understand the frustration that TiddlyWiki doesn't do everything that you want, but would remind you that TiddlyWiki is an ongoing development; it's not finished yet.

Re: [tw] Re: [TW5] How to use images with node.js ?

2015-05-12 Thread 'Mark S.' via TiddlyWiki
Here Jeremy, Yes, all the work-arounds I suggested are currently doable. The problem with exporting images is that there isn't a reverse process for importing them (with embedded images) back into node.js. Is there a known hook or method somewhere in the code that would let you change image

[tw] Re: [TW5] How to use images with node.js ?

2015-05-10 Thread 'Mark S.' via TiddlyWiki
Ok, using Michele's idea for http-server running on port 8084, I can define a macro like this: *\define images(image:Bugs Bunny)* *$macrocall $name=imagepath image=$image$ path={{imagePath1}} /* *\end* *\define imagepath(image:a,path:b)* *[img[$path$$image$]]* *\end* Then with tiddler

Re: [tw] Re: [TW5] How to use images with node.js ?

2015-05-10 Thread Michele Zaffalon
Hi Mark, I have asked the same question here https://groups.google.com/d/msg/tiddlywiki/MBuzDDEpIPw/_uTxW0HT6CkJ and other people are interested in this. I agree that not having to install a webserver is very convenient and unfortunately my coding skills are not sufficient to add the feature

Re: [tw] Re: [TW5] How to use images with node.js ?

2015-05-10 Thread 'Mark S.' via TiddlyWiki
It's effectively a text-only or mostly-text system if you plan to create a stand-alone TW (which is the only way I can see using it as a mobile reference). Images are large, so just a handful will bring your TW to a crawl -- especially on a mobile device. I'm guessing that the upper limits for

[tw] Re: [TW5] How to use images with node.js ?

2015-05-09 Thread PMario
On Saturday, May 9, 2015 at 7:32:33 PM UTC+2, Mark S. wrote: I'm wondering if there's a way that I redirect image links based on a path tiddler. This way I could manage images separately and just change the path when operating from a different platform. Pretty sure Eric had a plugin for

[tw] Re: [TW5] How to use images with node.js ?

2015-05-09 Thread 'Mark S.' via TiddlyWiki
Rules are always changing. TW itself violated the first rules of javascript. Remember javascript wasn't ever supposed to be able to write to the file system. For TW on nodejs to be of practical use (at least to me), it needs to serve up images. This doesn't seem like an unreasonable

[tw] Re: [TW5] How to use images with node.js ?

2015-05-09 Thread PMario
TW node server is no general purpose file server. So it doesn't serve files. If you want to serve files from your HD and have access to TW you'd need to add a proxy server in front of TW. eg. nginx This may be interesting: https://groups.google.com/d/msg/tiddlywiki/z8emI6_oKbw/KLfRhbYCDB8J

Re: [tw] Re: [TW5] How to use images with node.js ?

2015-05-09 Thread Michele Zaffalon
I use http-server https://www.npmjs.com/package/http-server, (because node.js is already installed for TiddlyWiki5) and img src= http://localhost:8084/image.jpg/. On Sat, May 9, 2015 at 11:21 AM, PMario pmari...@gmail.com wrote: TW node server is no general purpose file server. So it doesn't

[tw] Re: [TW5] How to use images with node.js ?

2015-05-09 Thread 'Mark S.' via TiddlyWiki
Hi Michele Mario, It's a little hard to understand the excitement about node.js. Apparently, in order to get images, I would have to install 2 servers (node something else) and change all my image links OR I would have to convert all my images into tid files (which would laden the