[cups.general] 'action' when a print job is received
Jerome Alet
alet at librelogiciel.com
Thu Nov 23 00:30:19 PST 2006
On Thu, Nov 23, 2006 at 03:17:42AM -0500, Peter Honegger wrote:
>
> Is there a way to execute a shell script when cups is receiving a
> print job (and perhaps again after the job is suceeded)?
Yes with CUPS 1.2.x
You can use the notification/subscription system.
See CUPS' documentation for details and for the list
of events you can subscribe your script to.
<shameless plug="on">
You could also download pkipplib from
http://www.pykota.com/software/ This is a pure Python library which
allows Python programs to interact with a CUPS server. This library
also include a command line tool to easily manage CUPS'
subscriptions without needing to manually edit CUPS' configuration
files. With this tool named pksubscribe you can easily install your
own script as a recipient for notification events, even if your
script is not written in Python (although to decode the event
you would need to link to CUPS' library in this case). A sample
notifier is also included in the tarball.
</shameless>
hth
Jerome Alet
More information about the cups
mailing list