XML_image2svg
[ class tree: XML_image2svg ] [ index: XML_image2svg ] [ all elements ]

Source for file package.php

Documentation is available at package.php

  1. <?php
  2. /**
  3.  * Script to generate package.xml file
  4.  *
  5.  * Taken from PEAR::Log, thanks Jon ;)
  6.  */
  7. require_once 'PEAR/PackageFileManager.php';
  8. require_once 'Console/Getopt.php';
  9.  
  10. $version '1.0';
  11.  
  12. $notes = <<<EOT
  13. * fixed integration of HTML_Template_IT
  14. * various CS fixes
  15. EOT;
  16.  
  17. $description = <<<EOT
  18. The class converts images, such as of the format JPEG, PNG 
  19. and GIF to a standalone SVG representation. The image is being encoded 
  20. by the PHP native encode_base64() function. You can use it to get back 
  21. a complete SVG file, which is based on a predefinded, easy adaptable 
  22. template file, or you can take the encoded file as a return value, using 
  23. the get() method. Due to the encoding by base64, the SVG files will 
  24. increase approx. 30% in size compared to the conventional image.
  25. EOT;
  26.  
  27. $package = new PEAR_PackageFileManager();
  28.  
  29. $result $package->setOptions(array(
  30.     'package'           => 'XML_image2svg',
  31.     'summary'           => 'Image to SVG conversion',
  32.     'description'       => $description,
  33.     'version'           => $version,
  34.     'state'             => 'stable',
  35.     'license'           => 'PHP 2.02',
  36.     'filelistgenerator' => 'cvs',
  37.     'ignore'            => array('package.php''package.xml'),
  38.     'notes'             => $notes,
  39.     'changelogoldtonew' => true,
  40.     'simpleoutput'      => true,
  41.     'baseinstalldir'    => '/XML/image2svg/',
  42.     'packagedirectory'  => './',
  43.     'dir_roles'         => array('tests'              => 'test')
  44. ));
  45.  
  46. if (PEAR::isError($result)) {
  47.     echo $result->getMessage();
  48.     die();
  49. }
  50.  
  51. $package->addMaintainer('urs',  'lead',        'Urs Gehrig',      'urs@circle.ch');
  52.  
  53. $package->addDependency('HTML_Template_IT',        false'has''pkg'true);
  54.  
  55. if (isset($_GET['make']|| (isset($_SERVER['argv'][1]&& $_SERVER['argv'][1== 'make')) 
  56.     $result $package->writePackageFile();
  57. else {
  58.     $result $package->debugPackageFile();
  59. }
  60.  
  61. if (PEAR::isError($result)) {
  62.     echo $result->getMessage();
  63.     die();
  64. }

Documentation generated on Mon, 11 Mar 2019 15:38:20 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.