Simple accounting filter/backend (With Perl or another script language)

Nayco anonymous at easysw.com
Fri Jun 11 06:44:59 PDT 2004


'llo, all !

I'm trying to write a perl script to incorporate as a backend or filter to do simple page accounting (...And no, Pykota doesn't fit my needs ;-)) to a MySql database.
While exctracting command line parameters (To get the owner, number of pages, printer name, document names, etc...) as well as environnement variables, isn't too hard, It can't get to stream properly the print data from STDIN to STDOUT, neither redirect the data to the actual backend for the printer.

Does Cups chains backend as needeed, or does it use only one, and that one's got to call the next backend himself ?

I'm aware that my backend's got to react properly when called without any parameter, to announce the printer it handles, but I don't really know what to announce (Well, I read the doc, saw about the "devicetype, device, name, fullname" line, but what if I don't know what will be the final printer, if different backends are to be used, etc... I tried to read Pykota's code (the backend part), but I don't konw Python, so I sometimes can only guess what's done...

Thanks for helping me.




More information about the cups mailing list