]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - tools/products.php
Import CUPS v1.7.1
[thirdparty/cups.git] / tools / products.php
diff --git a/tools/products.php b/tools/products.php
deleted file mode 100644 (file)
index 9c2e743..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/php -f
-<?php
-
-$fp     = popen("zgrep '^\\*Product:' /Library/Printers/PPDs/Contents/Resources/*.gz", "r");
-$files  = array();
-$maxlen = 0;
-
-while ($line = fgets($fp, 1024))
-{
-  $data = explode(":", $line);
-  if (array_key_exists($data[0], $files))
-    $files[$data[0]] ++;
-  else
-    $files[$data[0]] = 1;
-
-  $data = explode("\"", $line);
-  if (strlen($data[1]) > $maxlen)
-    $maxlen = strlen($data[1]);
-}
-
-pclose($fp);
-
-arsort($files);
-
-$current_count = 0;
-$current_files = 0;
-
-foreach ($files as $file => $count)
-{
-  if ($current_count == 0)
-    print(basename($file) . "  => $count products\n");
-
-  if ($count != $current_count)
-  {
-    if ($current_count != 0)
-      print("$current_files PPDs with $current_count products.\n");
-
-    $current_count = $count;
-    $current_files = 1;
-  }
-  else
-    $current_files ++;
-}
-
-if ($current_count != 0)
-  print("$current_files PPDs with $current_count products.\n");
-
-print("Maximum length of Product string: $maxlen\n");
-
-?>