[PD] piping into pd

Frank Barknecht fbar at footils.org
Tue Sep 5 13:10:36 CEST 2006


Hallo,
Marius Schebella hat gesagt: // Marius Schebella wrote:

> I want to feed the log-output of an apache2 server into Pd. I know that 
> it is possible to pipe the access_log (or any other log-output) of the 
> apache2 to a process, by defining something like
> CustomLog "|/usr/bin/send_to_pd" common
> On the Pd side I would like to use a receive, or a netreceive object. My 
> problem is, that I don??t know how to join those two processes... Should 
> I try to write a script (bash, perl, python?), or is there a way to pipe 
> directly into pd?

I would write a little script. There are examples how to send to
netreceive written in perl and python in the CVS or on pure-data.info,
it's really simple.

You could also use the pdsend utility, however doing it in Python is
more flexible IMO, especially as you also need to append a ";" after
each line to send. 

You could direct the apache log output to a FIFO pseudofile created
with "mkfifo /path/to/fifo" on Linux, then read from there, or do a
"tail"-clone in Python or use bash or whatever. 

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__




More information about the Pd-list mailing list