Yes, I want upgrade it to streams2. Alternatively there should already be 
some way to compose proper stream2 duplex stream using existing Dominic 
Tarr modules (duplex/mux-demux/event-stream etc)

On Friday, 14 June 2013 16:19:14 UTC+10, Marco Rogers wrote:
>
>
>
>
> On Thu, Jun 13, 2013 at 11:14 PM, Andrey <[email protected]<javascript:>
> > wrote:
>
>> You can use https://github.com/sidorares/exec-stream
>>
>> var es = require('exec_stream'); var convert = es('imagemagick', 
>> ['options']); rs.pipe(convert).pipe(ws);
>>
>>
>>
> This looks great. Do you have plans to upgrade it with the latest APIs? 
> It's not obvious, but it will pay to support the updated streams. Using the 
> base classes like I've done in my example gets you all the goodness minimal 
> less fuss. Wrap it in your nice module and it's a one-stop solution.
>
> :Marco
>  
>
>>
>> On Friday, 14 June 2013 11:23:08 UTC+10, ryandesign wrote:
>>>
>>> I understand that a process that I spawn with require('child_process').*
>>> *spawn() *has* three streams: stdin, stdout, stderr. 
>>>
>>> http://nodejs.org/api/child_**process.html#child_process_**
>>> child_process_spawn_command_**args_options<http://nodejs.org/api/child_process.html#child_process_child_process_spawn_command_args_options>
>>>  
>>>
>>> But I've now read about require('stream').Transform and it feels like 
>>> for certain types of programs (compression programs like bzip2 or image 
>>> conversion programs like ImageMagick) I would want the spawned process to 
>>> *be* a stream -- a transform stream. 
>>>
>>> http://nodejs.org/api/stream.**html#stream_class_stream_**transform<http://nodejs.org/api/stream.html#stream_class_stream_transform>
>>>  
>>>
>>> I've tried to find examples of how to wrap a spawned child process in a 
>>> transform stream, and I haven't found any, which makes me think I'm going 
>>> about this the wrong way. 
>>>
>>> I want to be able to do something like this: 
>>>
>>> var rs; // a readable stream, maybe a file 
>>> var ws; // a writable stream, maybe an http response 
>>> var convert; // a transform stream that uses ImageMagick's convert 
>>> program 
>>> rs.pipe(convert).pipe(ws); 
>>>
>>> Am I wrong to want this? 
>>> If not, how to I do this? 
>>>
>>>  -- 
>> -- 
>> Job Board: http://jobs.nodejs.org/
>> Posting guidelines: 
>> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
>> You received this message because you are subscribed to the Google
>> Groups "nodejs" group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/nodejs?hl=en?hl=en
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "nodejs" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/nodejs/sbvdxC6i5Yw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> Marco Rogers
> [email protected] <javascript:> | https://twitter.com/polotek
>
> Life is ten percent what happens to you and ninety percent how you respond 
> to it.
> - Lou Holtz 
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to