Jump to content


Photo

How to Replace characters in Place List ?


  • Please log in to reply
5 replies to this topic

#1 whomper

whomper

    Advanced Member

  • Members
  • PipPipPip
  • 242 posts

Posted 25 July 2009 - 11:42 PM

I imported a large d/base into its own file, and it has lots and lots of commas in the Place List (as discussed earlier and elsewhere). Single commas are to be expected in some places, but not leading the names. Also, doubles and triples are never expected, but appear in this base. I need to eliminate the doubles/triples anywhere, and to eliminate the singles when they lead a name (e.g.= , , New York).

I can replace the doubles/triples with singles (which would solve the problem when they appear inside Names, leaving a proper single); this also would change the leading multiples into singles but leave them in place at the lead.

How can I get rid of the leading singles?

I'm afraid that I'll have to Edit each name manually, but there sure are a lot! I thought about printing out a list of leading commas, which might give me inspiration; but I can't print only that list from the Place List menu.

Thoughts, anyone?

Thanks.

#2 kbens0n

kbens0n

    Advanced Member

  • Members
  • PipPipPip
  • 3459 posts

Posted 26 July 2009 - 04:02 AM

Thoughts, anyone?


You can export a full and complete GEDCOM of everyone in the database to a .GED file (Backup your database first) and then open it in a plain text editor and do this (or only the last replacement if the doubles and triples are done with RM4's Search & Replace):

EXAMPLE DATA
2 PLAC , Berks County, Pennsylvania, New York
2 PLAC , , Ireland, United Kingdom
2 PLAC , , , USA

replace:

2<space>PLAC<space><comma><space><comma><space><comma><space>

with:

2<space>PLAC<space>

then replace:

2<space>PLAC<space><comma><space><comma><space>

with:

2<space>PLAC<space>

then replace:

2<space>PLAC<space><comma><space>

with:

2<space>PLAC<space>

ETC.

Then re-import the GEDCOM to a new fresh database.

---
--- "GENEALOGY, n. An account of one's descent from an ancestor who did not particularly care to trace his own." - Ambrose Bierce
--- "The trouble ain't what people don't know, it's what they know that ain't so." - Josh Billings
---Ô¿Ô---
K e V i N


#3 whomper

whomper

    Advanced Member

  • Members
  • PipPipPip
  • 242 posts

Posted 26 July 2009 - 06:31 AM

That's a very good method! On first glance, it might appear quite complicated; but on second glance, it's pretty simple! I'd have to replace only one instance of each "swap-out".

I wonder how that replacement could be fit into RM's text editor. If we could just highlight portions of text which we want to replace, then have that extracted into it's own Replace With... window, it would cut down on lotsa time. And cutting out "middle men" (i.e., extra steps, or steps which need to be done outside of the program) would remove one or more chances of SNAFUing.

Still, I'm gonna try this and see how long it takes, just as a matter of research.

Thanks very much for this thought! I seem to channel my own possible solutions toward staying inside RM, rather than resorting to tools outside. Tunnel Vision...

#4 Laurie Nelson

Laurie Nelson

    Member

  • Members
  • PipPip
  • 28 posts

Posted 26 July 2009 - 09:14 PM

You can export a full and complete GEDCOM of everyone in the database to a .GED file (Backup your database first) and then open it in a plain text editor and do this (or only the last replacement if the doubles and triples are done with RM4's Search & Replace):
. . . .
Then re-import the GEDCOM to a new fresh database.

Ken, aren't there problems with data loss when exporting and re-importing a GEDCOM? I thought I had seen posts either here or in the mail list about this, but I'm not sure.
Laurie Nelson

#5 Romer

Romer

    Advanced Member

  • Members
  • PipPipPip
  • 2073 posts

Posted 26 July 2009 - 09:33 PM

My philosophy in any genealogy program is to do as much as possible within it and to resort to GEDCOM solutions only when you otherwise have to in order to accomplish something of importance. Whether an irrational fear or not, I'm always uneasy that something, however minor, might potentially be unintentionally modified or dropped.

#6 whomper

whomper

    Advanced Member

  • Members
  • PipPipPip
  • 242 posts

Posted 26 July 2009 - 10:13 PM

Just a couple of comments...
1. I can see where exporting a gedcom from one program into another (different) program might cause some data changes, even between different versions of the same program. But when we try to use the gedcom as a tool as described above, and limit it to working with the exact same program, I suspect there to be no data changes that we don't create ourselves - intentionally or inadvertantly.

2. I agree with Romer's opinion about having our program be as complete and as cooperative as possible, which is why these discussions are so good - as long as they are monitored by the PTB (Powers That Be), and that the PTB actually incorporate the desired features. Granted, I don't recognize all the benefits from some ideas, but that's not the issue (I'm not one of the PTB...).

I can't imagine that a text editor which already is incorporated into the program can't make the changes we discuss. And there is enough technical savvy "out there" to be learned and incorporated. There is a utility program which renames files, and offers opportunities to change strings based on occurances within a filename. It allows the changes to these initial "commas" to be made without exporting, etc. Now, if this sort of remedy could be incorporated into RM, it would allow such flexibility!