Re: [PROPOSAL] File_IMC

From: Date: Thu, 25 Sep 2003 23:56:08 +0000
Subject: Re: [PROPOSAL] File_IMC
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-22048@lists.php.net to get a copy of this message
Zitat von Paul M Jones <pmjones@ciaweb.net>: > Hi, Jan, > > > It would be great to have such a package in PEAR if it's complete and > > well > > designed. I know from my own experience that it is no trivial task to > > properly parse these different formats, even if they look that similar, > > without too much redundant code. > > You are correct; although it looks like it should be easy, it is very > difficult to parse the vCard and vCal formats. Without having the time to look at your code in depth: one thing that bit me recently was the fact that different characters have to be escaped in different vCard versions, so that you need to retrieve the version before you actually start to parse the value fields. > However, I believe we have the worst part of it behind us -- that is, > the line parser that splits individual lines into their component > parts: group, type-definition, parameters, and line-value (which may be > structured, repeated, or both). That code is already in > Contact_Vcard_Parse, which File_IMC will make use of to parse IMC > files. (Incidentally, you will see the level of our commitment to > commenting in the Contact_Vcard packages; the detailed comments make a > difficult process more easy to understand.) > > Of course, now we need to parse the individual parts of the various IMC > event types, but that becomes an issue of returning results in an > appropriate structure. Contact_Vcard has an uses extensible structure > that lends itself to this kind of work (basically a multiple-depth > associative array). Yeah, that's the only sensible way to return the parsed data. Btw, will you support multiple cards, events per file? > > I'd happily drop our imc code if yours prove to be more mature. > > Meanwhile > > you might want to take a look at it to steal some inspiration or code > > snippets. > > We are always open to building on the work of others, since we are > basically lazy and want glory without effort. ;-) Can you point us to > some sources? http://cvs.horde.org/cvs.php/horde/lib/Data.php http://cvs.horde.org/cvs.php/horde/lib/Data http://cvs.horde.org/cvs.php/horde/lib/iCalendar.php http://cvs.horde.org/cvs.php/horde/lib/iCalendar > We'll count this as positive feedback. Thanks. :-) Yes, of course. :-) Jan. -- http://www.horde.org - The Horde Project http://www.ammma.de - discover your knowledge http://www.tip4all.de - Deine private Tippgemeinschaft

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