[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SpeechIO-85] storing substitutions in a flat file instead ofa hash



How about a CSV format, with single quoted fields?  There are even CSV modules
for Perl, but CSV (with the quotes) would be fairly simple to parse given
a regex.

Or a three line approach?

---------
abbrv
expansion string all on one line -- use \n for embedded metacharacters

next-abbrv
expansion string all on one line -- use \n for embedded metacharacters

---------

with a blank inbetween each line -- this would potentialy be the easiest.
simplest to process, very simple to edit, etc...

k

------------------------------------------------------------------------------
"From a certain point onward there is no longer any turning back. That is the
point that must be reached." 
    -- Kafka
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

On Wed, 11 Aug 1999, Darxus wrote:

> 
> I think that it is not good to expect users to directly edit a hash.  I'd
> like to change /etc/speechd.sub to a flat file.  Any thoughts on how we
> should delimit it ?
> 
> We could do fixed width fields, where the 1st X columns are the key, and
> the rest are the value.  Or we could do a delimited file, but then what do
> we use for the delimiter ?
> 
> I'd prefer not to use fixed width, because that puts a limit on how long
> the key can be (although it would be good to keep them down, I'd rather
> not hardcode that limit).
> 
> Think comma delimited would work ?
> 
> I suppose, if somebody wants to have a comma in a string, there's probably
> a way to escape it out....
> 
> Could use any character... colins, tabs, etc.  Actually, tabs might be
> really good....
> 
> __________________________________________________________________
> PGP fingerprint = 03 5B 9B A0 16 33 91 2F  A5 77 BC EE 43 71 98 D4
>             darxus@op.net / http://www.op.net/~darxus
>                          Far Beyond Reason
> 
> 

---
** (debug) Blackmail[61444] would have rejected this message for 1 reasons. **