Re: RFC : CSV conversion framework

From: Date: Fri, 12 Sep 2008 14:53:10 +0000
Subject: Re: RFC : CSV conversion framework
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50751@lists.php.net to get a copy of this message
Tristan, Though I don't have a need for it, this is a cool application. If you create a proposal, people can provide more comments on the code and give you a better idea whether or not it would be accepted into PEAR. Mike On Wed, 2008-09-10 at 12:34 +0200, Tristan Rivoallan wrote: > hi, > > I coded a tiny CSV conversion framework for personal use, and i'm > willing to release it to the community. Would it be interesting to > have it as a PEAR package ? > > Concept : a converter is given a csv conversion strategy instance and > uses it to convert the file. > > Example : > > // First parameter defines the csv file columns names > $converter = new CsvConverter(array('first_name', 'last_name', > 'email')); > > // Convert to HTML > $html_filepath = $converter->convert('/some/file.csv', new > CsvToHtmlConversionStrategy()); > > // Convert to PDF > $pdf_filepath = $converter->convert('/some/file.csv', new > CsvToPdfConversionStrategy()); > > Those are simplified examples. Real world usage (i use it to generate > printable index cards out of an excel product backlog) can be seen at > > http://github.com/trivoallan/csvconverter/tree/master/bin/generate-scrum-cards.php‚èÛr > `ȃž£ú  > > The code is currently available at > http://github.com/trivoallan/csvconverter > > If this code draws any interest, i'll happily turn it into a pear > package. File_CSV_Converter ? > > regards, > > tristan > > -- > http://www.mazemod.org > http://www.musiqueapproximative.net >

« previous php.pear.dev (#50751) next »