Remove Text_Highlighter-based highlighter
authorChuck Hagenbuch <chuck@horde.org>
Sat, 2 Oct 2010 21:06:47 +0000 (17:06 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 2 Oct 2010 21:06:47 +0000 (17:06 -0400)
framework/devtools/horde-highlight.php [deleted file]
framework/devtools/package.xml

diff --git a/framework/devtools/horde-highlight.php b/framework/devtools/horde-highlight.php
deleted file mode 100755 (executable)
index 9f9f603..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!@php_bin@
-<?php
-/**
- * This script highlights various source files on the console.
- *
- * Copyright 2004-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package  devtools
- * @author   Jan Schneider <jan@horde.org>
- */
-
-if (!isset($argv[1])) {
-    echo "Usage: highlight.php SOURCE_FILE [HIGHLIGHTER]\n";
-    exit;
-}
-
-require_once 'Text/Highlighter.php';
-require_once 'Text/Highlighter/Renderer/Console.php';
-
-/* File to highlight. */
-$file = $argv[1];
-
-/* Optional highlighter. */
-if (isset($argv[2])) {
-    $type = $argv[2];
-} else {
-    /* Try autodetecting. */
-    $map = array('cpp' => 'CPP',
-                 'css' => 'CSS',
-                 'diff' => 'DIFF', 'patch' => 'DIFF',
-                 'dtd' => 'DTD',
-                 'js' => 'JAVASCRIPT',
-                 'pl' => 'PERL',
-                 'php' => 'PHP',
-                 'py' => 'PYTHON',
-                 'sql' => 'SQL',
-                 'xml' => 'XML');
-    $ext = strtolower(substr($file, strrpos($file, '.') + 1));
-    if (isset($map[$ext])) {
-        $type = $map[$ext];
-    } else {
-        $type = 'PHP';
-    }
-}
-
-$hl = Text_Highlighter::factory($type);
-$hl->setRenderer(new Text_Highlighter_Renderer_Console());
-
-echo $hl->highlight(file_get_contents($file));
index a93ee99..e148161 100644 (file)
@@ -34,9 +34,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
  </notes>
  <contents>
   <dir name="/">
-   <file name="horde-highlight.php" role="script">
-    <tasks:replace from="@php_bin@" to="php_bin" type="pear-config"/>
-   </file>
    <file name="horde-merge.php" role="script">
     <tasks:replace from="@php_bin@" to="php_bin" type="pear-config"/>
    </file>
@@ -55,7 +52,6 @@ http://pear.php.net/dtd/package-2.0.xsd">
  </dependencies>
  <phprelease>
   <filelist>
-   <install name="horde-highlight.php" as="horde-highlight.php" />
    <install name="horde-merge.php" as="horde-merge.php" />
    <install name="horde-rev-cmp.sh" as="horde-rev-cmp.sh" />
   </filelist>