Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

save/png to stdout?

 [1/8] from: kracik:mbox:dkm:cz at: 1-Mar-2001 16:26


Hi rebols, is it possible to somehow redirect save/png binary output to stdout? It would be useful for example for generating graphics www hit counters by REBOL/View CGI script. --- Michal Kracik

 [2/8] from: zyao:sitaranetworks at: 2-Mar-2001 10:39


difficult to guarantee your the sole writer to loop:// and who will read it? do need something like a port number to identify the two ends, but then its IP. -z On Fri, Mar 02, 2001 at 01:45:31PM -0000, . - wrote:

 [3/8] from: g:santilli:tiscalinet:it at: 2-Mar-2001 12:26


Michal Kracik wrote:
> is it possible to somehow redirect save/png binary output to stdout? > It would be useful for example for generating graphics www hit > counters by REBOL/View CGI script.
You can try with: save/png console:// to-image layout [text "hello"] It seems to work here. HTH, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [4/8] from: deadzaphod:hotma:il at: 2-Mar-2001 11:35


It would be really helpful for this sort of thing if we had some sort of loopback port. I know we can use TCP ports connecting to localhost for that, but it would be faster and safer if it didn't have to use TCP. Anyone else think that would be a good feature? Cal -><-

 [5/8] from: g:santilli:tiscalinet:it at: 2-Mar-2001 13:09


. - wrote:
> It would be really helpful for this sort of thing if we had some sort of > loopback port. I know we can use TCP ports connecting to localhost for
What do you mean by loopback port? Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/

 [6/8] from: deadzaphod:h:otmail at: 2-Mar-2001 13:45


I should have gotten to sleep hours ago, so I'm not sure how to explain this at the moment, but I'll try anyway. Rather than say, saving to console:// I'd like to be able to save to loop:// then do a read/binary loop:// and get back whatever was saved. A similar scheme could be nice for capturing the output of a script using 'echo, without having to create a temporary file. I hope that's a bit clearer. Cal Dixon -><-

 [7/8] from: kracik:mbox:dkm:cz at: 2-Mar-2001 15:44


Thanks, but it does not seem to work in Windows. 'print output is redirected to stdout, but accessing console:// seems to open REBOL Windows console for a short moment - even if I run the script with rebol -csw counter.r | more I will try it in Linux, but web server machines might not have shared X libraries installed, so REBOL/View won't work as CGI interpreter. -- Michal Kracik Gabriele Santilli wrote:

 [8/8] from: g:santilli:tiscalinet:it at: 4-Mar-2001 10:34


Hello Cal! On 02-Mar-01, you wrote: [...] CD> temporary file. I hope that's a bit clearer. Yes, it is like I was guessing. This is quite easy to do, and I think Jeff posted an example some time ago. You just have to create a new protocol that stores the data in some string/binary/whatever and then gives it back. Regards, Gabriele. -- Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/