#! /usr/bin/env python # -*- coding: ISO-8859-15 -*- # PyKota Print Quota Quote sender # # PyKota - Print Quotas for CUPS and LPRng # # (c) 2003, 2004, 2005 Jerome Alet # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. # # $Id$ # # import sys import os import pwd from pykota.tool import PyKotaTool, PyKotaToolError, crashed, N_ from pykota.pdlanalyzer import PDLAnalyzer, PDLAnalyzerError __doc__ = N_("""pykotme v%s (c) 2003, 2004, 2005 C@LL - Conseil Internet & Logiciels Libres Gives print quotes to users. command line usage : pykotme [options] [files] options : -v | --version Prints pykotme's version number then exits. -h | --help Prints this message then exits. -P | --printer p Gives a quote for this printer only. Actually p can use wildcards characters to select only some printers. The default value is *, meaning all printers. You can specify several names or wildcards, by separating them with commas. examples : $ pykotme --printer apple file1.ps file2.ps This will give a print quote to the current user. The quote will show the price and size of a job consisting in file1.ps and file2.ps which would be sent to the apple printer. $ pykotme --printer apple,hplaser