RootsWeb.com Mailing Lists
Total: 3/3
    1. Re: Search and replace in one field
    2. Ed Morton
    3. On 2/17/2013 10:01 PM, Denis Beauregard wrote: > On Sat, 16 Feb 2013 08:19:55 +0200, Steve Hayes > <hayesstw@telkomsa.net> wrote in soc.genealogy.computing: > >> On Fri, 15 Feb 2013 18:48:58 -0600, Charlie Hoffpauir <invalid@invalid.com> >> wrote: >> >>> If Legacy won't let you do the replacement in the given name field, >>> then it gets more complicated, but still doable. In essence, you >>> create the GEDCOM from Legacy with the names unchanged, then do the >>> search/replace on the GEDCOM. The reason it's more difficult there is >>> because then you have to write some sort of macro the do the >>> replacement only on quote marks found in the name field. I did a few >>> macros similar to that using Word to process the GEDCOMs generated by >>> FTM back before RM wouldn't do the import directly. > > A less techie solution, but still using a GEDCOM file. > > Read your file with a spreadsheet (LibreOffice or Excel will do the > job). Be sure to have all the file in ONE column. > > Add a column and enter numbers from 1 to the the number of lines in > the file. In LibreOffice : Edit - Fill - Series > > Sort the file by the GEDCOM lines. > > Replace the fields you want to, as all the 1 NAME lines, for example, > will be in a continuous group. > > Sort by line numbers to get the original order. > > Remove the column with line numbers. > > Save as GEDCOM. > > > Denis > If someone would like to post some small set of representative sample input and expected output and describe the transformation you need, those of us at comp.lang.awk who don't know and don't care what GEDCOM, Legacy, etc. are might have something to contribute. Regards, Ed.

    02/17/2013 08:21:06
    1. Re: Search and replace in one field
    2. Ian Goddard
    3. Ed Morton wrote: > On 2/17/2013 10:01 PM, Denis Beauregard wrote: >> On Sat, 16 Feb 2013 08:19:55 +0200, Steve Hayes >> <hayesstw@telkomsa.net> wrote in soc.genealogy.computing: >> >>> On Fri, 15 Feb 2013 18:48:58 -0600, Charlie Hoffpauir >>> <invalid@invalid.com> >>> wrote: >>> >>>> If Legacy won't let you do the replacement in the given name field, >>>> then it gets more complicated, but still doable. In essence, you >>>> create the GEDCOM from Legacy with the names unchanged, then do the >>>> search/replace on the GEDCOM. The reason it's more difficult there is >>>> because then you have to write some sort of macro the do the >>>> replacement only on quote marks found in the name field. I did a few >>>> macros similar to that using Word to process the GEDCOMs generated by >>>> FTM back before RM wouldn't do the import directly. >> >> A less techie solution, but still using a GEDCOM file. >> >> Read your file with a spreadsheet (LibreOffice or Excel will do the >> job). Be sure to have all the file in ONE column. >> >> Add a column and enter numbers from 1 to the the number of lines in >> the file. In LibreOffice : Edit - Fill - Series >> >> Sort the file by the GEDCOM lines. >> >> Replace the fields you want to, as all the 1 NAME lines, for example, >> will be in a continuous group. >> >> Sort by line numbers to get the original order. >> >> Remove the column with line numbers. >> >> Save as GEDCOM. >> > > If someone would like to post some small set of representative sample > input and expected output and describe the transformation you need, > those of us at comp.lang.awk who don't know and don't care what GEDCOM, > Legacy, etc. are might have something to contribute. > Ed, the real problem here is that the entire GEDCOM format is grossly underspecced for the job it's now expected to do. It's supposed to be a format for exchange of genealogical information. Because various vendors have added features not in its original scope they've used various tricks to try to get GEDCOM to hold the data for those features and the different tricks don't play well with each other because the vendors didn't coordinate them. Add to that that the applications don't necessarily do exactly what the users want so some of them have adopted personal conventions in data use. The consequence here is that there seems to be a need to patch the data on its way from one vendor's application to another in order to convey what the user wants it to convey. In this particular case it seems to be the simple substitution of one string by another for which awk is overkill. Sed would be quite adequate. Not even in the greater scheme of things would awk be a solution. The whole thing is a kludge. What's really needed is to start again with a clean sheet (don't even retain the inadequate data model on which GEDCOM was built) and this time add extensibility into the list of requirements. -- Ian The Hotmail address is my spam-bin. Real mail address is iang at austonley org uk

    02/18/2013 03:04:56
    1. Re: Search and replace in one field
    2. J. Hugh Sullivan
    3. On Mon, 18 Feb 2013 03:21:06 -0600, Ed Morton <mortonspam@gmail.com> wrote: (deleted) My situation is not too difficult to explain. I have almost 7000 names in my genealogy program. When my provable line began many people were called by their middle names. I don't agree with the practice. I don't object to my first name. I just will not bow to people requiring first name, middle initial. I had rather make an issue of it. I use " marks to identify middle names of people who go by the middle name. My problem is switching from one genie program to another. The second reads the name in quotes as a nickname and shows it twice... James "Hugh" "Hugh" Sullivan. I need to convert the files to gedcom then search and replace the " with blank spaces. I would not transfer the files from the second program back to the first because of other problems. But I want the ability to use both programs. It seems like there should be a simple solution. And if I wasn't about to retire when computers became commonplace I probably would know how. It's not so much a life and death matter as me being frustrated because I have a problem I can't solve for myself - doesn't make for a happy camper. Hugh

    02/18/2013 09:20:43