How turn a folder into a print queue?
There is a simpler solution in 4 steps and a small shell script:


make your own spool directory:

/usr/bin/sudo mkdir /var/spool/my_printer

write the following shell script within your usual local bin directory
let's say /local/bin

cd /local/bin


copy the following inside my_spooler:

#!/bin/sh

# go into the spool directory
cd /var/spool/my_printer

# main loop: loop till end of time
while : ; do

    # check for any newly arrived text file
    for _file in * ; do

       # if _file is a normal file, print and remove it (-r option to lpr)
        [ -f "${_file}" ] &amp;&amp; lpr -r "${_file}"
    done

    # don't loop like a fool
    sleep 300
done

make your my_spooler executable:

chmod u+x my_spooler

start it:

my_spooler &amp;


it should start without a full path if /local/bin is within your PATH
if it isn't, then start it this way:

/local/bin/my_spooler &amp;


The ending &amp; means start it in background so as not to block your session waiting until the end of time.


How to use it

To use it you simply have to move any text or PS or PDF file within your own defined spool directory how you prefer. Either with the Finder or with basic command line:

cp my_file.pdf /var/spool/my_printer