RootsWeb.com Mailing Lists
Total: 3/3
    1. Re: Using AWK to manipulate GEDCOM files
    2. Kenny McCormack
    3. In article <kg0kdh$e7a$1@speranza.aioe.org>, Tony Proctor <tony@proctor_NoMore_SPAM.net> wrote: ... >A scripting library could be useful, but I would never use one based simply >on a text-processing language. > >I mentioned XML, not because you wanted to use it but as an analogy. >Scripting manipulation of XML is usually done with XSLT, which for all its >faults and obfuscation deals with entities rather than text. I agree with (what I think is) your underlying point - which is that AWK is not a good tool for parsing a programing language. Yes, it can be done, and, yes, it has been done - but it is just not really the right tool. People will say that AWK can do "anything", and I suppose it is probably true that AWK can do anything that "standard C" can do - that is, as long as it is pure text manipulation and no system calls. You can do this, of course, by putting the whole program in the BEGIN block and completely ignoring the "pattern/action loop" - i.e., the real value and point of AWK. I once wrote a program to convert something in a programming language text. I started out doing it in AWK (thinking, "Oh, this will be easy - I just need to change this into that..."), and worked on it in AWK for quite a while before realizing it just wasn't the right tool. This was not an easy decision to make, but eventually, I gave up and re-did it in TXL, which worked very well and definitely *was* the right tool for the job. The hardest part was teaching myself TXL - which is no ordinary programmiing language (heh heh!). Once one understands what TXL is and how it works, doing stuff in it is pretty easy. I also agree with (whoever it was) the poster who wrote that feature-creep will eventually doom this project (writing a GEDCOM lib in AWK). -- "They shall be attended by boys graced with eternal youth, who to the beholder?s eyes will seem like sprinkled pearls. When you gaze upon that scene, you will behold a kingdom blissful and glorious." --- Qur'an 76:19 ---

    02/19/2013 07:49:31
    1. Re: Using AWK to manipulate GEDCOM files
    2. singhals
    3. Kenny McCormack wrote: > I also agree with (whoever it was) the poster who wrote that feature-creep > will eventually doom this project (writing a GEDCOM lib in AWK). That's one of the things wrong with GED -- people wanted it to do things it was /never/ intended to do, but developers of GEDStand "tweaked" the standard to allow each s/w developer to (a) meet the minimum standard while (b) getting 95% on moves between two users of the same program. People started complaining before the GEDStan developers got out of their hotel, because, hey, only 95%? Cheryl ahhh, yes, I am still trying to forget GedStan discussions!

    02/19/2013 03:08:25
    1. Re: Using AWK to manipulate GEDCOM files
    2. Steve Hayes
    3. On Wed, 20 Feb 2013 02:49:31 +0000 (UTC), gazelle@shell.xmission.com (Kenny McCormack) wrote: >In article <kg0kdh$e7a$1@speranza.aioe.org>, >Tony Proctor <tony@proctor_NoMore_SPAM.net> wrote: >... >>A scripting library could be useful, but I would never use one based simply >>on a text-processing language. >> >>I mentioned XML, not because you wanted to use it but as an analogy. >>Scripting manipulation of XML is usually done with XSLT, which for all its >>faults and obfuscation deals with entities rather than text. > >I agree with (what I think is) your underlying point - which is that AWK is >not a good tool for parsing a programing language. Yes, it can be done, >and, yes, it has been done - but it is just not really the right tool. >People will say that AWK can do "anything", and I suppose it is probably >true that AWK can do anything that "standard C" can do - that is, as long as >it is pure text manipulation and no system calls. You can do this, of >course, by putting the whole program in the BEGIN block and completely >ignoring the "pattern/action loop" - i.e., the real value and point of AWK. That may be so, but GEDCOM files are not a programming language, they are data files. XML files are also data files, and some have suggested that GEDCOM be replaced by XML files, and perhaps they may happen one day. But right now people still use GEDCOM files, and I think a lot could be done with AWK to look at the data in different ways, or to massage the files before importing them into another genealogy program. -- Steve Hayes from Tshwane, South Africa Blog: http://khanya.wordpress.com E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk

    02/19/2013 11:50:38