Changeset 3436 for pkpgcounter/trunk/bin/pkpgcounter
- Timestamp:
- 10/06/08 00:22:07 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/bin/pkpgcounter
r564 r3436 1 1 #! /usr/bin/env python 2 # -*- coding: UTF-8 -*-2 # -*- coding: utf-8 -*- 3 3 # 4 4 # pkpgcounter : a generic Page Description Language parser … … 9 9 # the Free Software Foundation, either version 3 of the License, or 10 10 # (at your option) any later version. 11 # 11 # 12 12 # This program is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 15 # GNU General Public License for more details. 16 # 16 # 17 17 # You should have received a copy of the GNU General Public License 18 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. … … 71 71 -v | --version Prints pkpgcounter's version number then exits. 72 72 -h | --help Prints this message then exits. 73 74 -d | --debug Activate debug mode. 75 73 74 -d | --debug Activate debug mode. 75 76 76 -cCOLORSPACE, --colorspace=COLORSPACE 77 77 Activate the computation of ink usage, and defines the 78 78 colorspace to use. Supported values are 'BW' (Black), 79 79 'RGB', 'CMYK', 'CMY', and 'GC' (Grayscale vs Color). 80 'GC' is useful if you only need to differentiate 80 'GC' is useful if you only need to differentiate 81 81 grayscale pages from coloured pages but don't care 82 82 about ink usage per se. 83 83 84 84 -rRESOLUTION, --resolution=RESOLUTION 85 85 The resolution in DPI to use when checking ink usage. 86 86 Lower resolution is faster but less accurate. Default 87 87 is 72 dpi. 88 89 examples : 88 89 examples : 90 90 91 91 $ pkpgcounter file1.ps file2.escp2 file3.pclxl <file4.pcl345 92 92 93 93 Will launch pkpgcounter and will output the total number of pages 94 94 needed to print all the documents specified. 95 95 96 96 $ pkpgcounter --colorspace bw --resolution 150 file1.ps 97 97 98 98 Will output the percent of black ink needed on each page of 99 99 the file1.ps file rendered at 150 dpi. 100 101 %(__gplblurb__)s 100 101 %(__gplblurb__)s 102 102 103 103 Please e-mail bugs to: %(__authoremail__)s""" 104 104 105 if __name__ == "__main__" : 105 if __name__ == "__main__" : 106 106 if (len(sys.argv) >= 2) and (sys.argv[1] in ("-h", "--help")) : 107 107 print __doc__ % globals() 108 else : 108 else : 109 109 analyzer.main() 110 110