Menu

Adding country to all places

Help
Ivo Mans
2004-06-06
2004-07-04
  • Ivo Mans

    Ivo Mans - 2004-06-06

    In my Gedcom (over 3000 people) most places are entered without a country. Only places outside the Netherlands (less than 100) have a country information. This results in an unlogic list of locations.

    Since I wish to avoid manual changing all records I would like to create a script that adds "the Netherlands" to all records (or rather all records not ending in a certain list of countries).

    I'm doupting about writing a script to add the information direct in the .GED file or otherwise a script that uses the CGI interface.

    Who can advise about advantages (or not) using CGI interface?
    Or anybody perhaps already made such a script?

    Ivo.

     
    • Boudewijn Sjouke

      Hi Ivo,

      What is exactely what you want to do? Is it a one time operation? In my opinion it might be as simple as changing PLAC space with PLAC space Netherlands in an editor. Or am I missing something?

      Boudewijn.

       
      • Ivo Mans

        Ivo Mans - 2004-06-06

        Boudewijn,
        It's close to that simple, except that there is already a local place mentioned behind PLAC and it should get a ", Netherlands" behind it. I'm sure I could get it done easily modifyng the GED file direct, but I'm curious how well the CGI interface could handle this for me.
        Ivo.

         
    • Daniel Kionka

      Daniel Kionka - 2004-06-06

      If you are serious about writing a CGI program, you could help add it to the GDBI BK editor.  The goal is to emulate Brother's Keeper, and one of the (many) missing features is to globally change locations.

      It is not exactly what you want.  It changes specific locations instead of appending to a pattern.  But it would be very useful.

       
      • Ivo Mans

        Ivo Mans - 2004-06-06

        Daniel,
        I agree it would be very handy to have features available for globally editing locations. And I might enhance my script to achieve something like that, since that would be my next interest after having the country set up properly.
        Do I understand it right that the GDBI BK editor is fully Java? Personally I'm more of a PHP-programmer.
        Ivo.

         
        • Daniel Kionka

          Daniel Kionka - 2004-06-06

          Yeah, GDBI is all Java.  I don't get much help from the PGV crowd.  I guess they have something against compiling.

           
    • Mark Hattam

      Mark Hattam - 2004-06-06

      something like a GREP for

      Search for
      1 PLAC (.+)\n

      Replace with
      1 PLAC \1, Netherlands\n

      could do

      Then you just have the 100 or so non ,Netherlands ones to revert.

      Mark

       
    • Ivo Mans

      Ivo Mans - 2004-06-06

      Since I didn't here a good reason for starting experimenting with the CGI interface I just wrote a PHP script to edit places direct in the GED file.
      Works fine for me: both appending a string or replacing a string for either all or a selection of places.

      If anybody is interested: let me know and I'll work on it a bit further to make the user interface better understandable.

      Ivo.

       
      • Thomas Gail Haws

        I think it would be a great idea to have a repository of little phpGedView utilities like the script you just wrote.  Would John and Roland be interested in adding a third-party utilities or Add-ons page to the PGV web site?  Ivo could spiff his up and offer it to the public as a place names search and replace.

        Tom

         
    • John Finlay

      John Finlay - 2004-06-07

      I think that the best place for something like this is during the validate gedcom stage of importing.
      We add a text box to the optional section that allows you to add something to all of places in your gedcom. 

      The script should also check if the place already has a country in it by cross-referencing it against a list of valid countries.  This would prevent duplicate countries.

      --John

       
    • Hans Smedema

      Hans Smedema - 2004-06-18

      Our family tree suffers from the same place name list problem. I made a RFE (#975381), which proposes a solution during the input of these place names. Which is to add an seperate country input text field.

       
      • Ivo Mans

        Ivo Mans - 2004-07-04

        Hans,
        I just uploaded my script to my website, so that you (and others) could try it for these kind of cases. Please read the warnings on my website carefully before installing the script.
        The address: http://www.mans-manik.com/, click on 'Gedcom edit'.

        Ivo

         

Log in to post a comment.