From: DDENNISON@... Date: 2007-04-18T02:23:24+09:00 Subject: Re: text processing library Hi, Since you are describing a lot of what I do (but not in Ruby), I thought I might point you here for some ideas: http://www.unidex.com/overview.htm Essentially, that link describes a flat-file parser that reads a XML definition of the layout. You might want to use that and model your own schema to accomplish something similar in Ruby. Best Regards, Dan "Stephen Smith" <4fires@gmail.com > To ruby-talk@ruby-lang.org (ruby-talk 04/17/2007 11:12 ML) AM cc Subject Please respond to Re: text processing library ruby-talk@ruby-la ng.org @Botp, That's right up my alley... Here's where I'm headed. Since CSV file structure is a bit like vanilla icecream, I'd like to provide a file structure with more complexity or "flavor" as an input, along with some CSV'd data. That way I can read in the structure and the data separately and get my data out in the format I want. My inspiration is deBabelizer, but also now simply some kind of String#pack. On 4/17/07, Pe�a, Botp wrote: > > From: Stephen Smith [mailto:4fires@gmail.com] : > # go from csv to > # batch file automagically, and just writing a one-off for this one file > # format seems like a total waste of time. > # There are a bizillion of these formats out there, and I have > # to imagine > # spooning csv files into yet another format is pretty common. > # I'm wondering > # if Ruby already has a batch file library, something like > # text-format.rb only > # more useful? > > just in case you'd want to start anew, try getting some ideas fr > 1. http://www.devsource.com/article2/0,1895,1928561,00.asp > 2. http://fastercsv.rubyforge.org/ > > kind regards -botp > > > . This message and any attachments contain information from Union Pacific which may be confidential and/or privileged. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited by law. If you receive this message in error, please contact the sender immediately and delete the message and any attachments.