Could you please consider the writing of a Perl script which would enable me (and many others) to convert a non standard GEDCOM file to a standard format acceptable for registration by the Personal Ancestral File system?

I use REUNION as my genealogy program, but it uses Windows based characters, whereas the standard format for genealogy data (GEDCOM) transfer uses ASCII, and a strict format that REUNION does not conform with, I have just recently found out.

GEDCOM is a simple text file, with a specific data structure. Every line has a header, consisting of a number, a space and a 4 characte standard identifier. Each set of data commences with the number 0 (zero)
The main amendments to be done are for every occurrence:
HEAL is changed to NOTE Medical:
HIST is changed to NOTE Biography:
EDUC is changed to NOTE Educated:
RESI is changed to NOTE Resided:
OCCU is changed to NOTE Occupation:

The main problem is in the following:

After each Source identifier 0 @Snnn@ SOUR, each line of the REUNION GEDCOM source data is to be modified as follows:

The first line 1 NAME data......... has to be changed to 1 TITL;

The second 1 NAME data......... has to be changed to 1 TEXT;

The third and subsequent 1 NAME data......... has to be changed to 2 CONT ( extra lines only required if more than 2 lines before the next 0 @Snnn@ SOUR;

The text file has something like 30,000 lines, a bit too many to do manually. There are 400 sources, each starting with 0 SOUR @Snnn@;

If you can assist, I would greatly appreciate it, but I will understand if you cannot.

I can send a sample GEDCOM file to examine.
My kind regards,
Joe

Townsville, Australia

Edit: chipmunk 2001-07-07


In reply to Converting GEDCOM files by Joes

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.