* FTM to FH - Places/Media/Descriptions

Importing from another genealogy program? This is the place to ask. Questions about Exporting should go in the Exporting sub-forum of the General Usage forum.
Post Reply
User avatar
McHooty
Platinum
Posts: 34
Joined: 18 Jun 2021 09:10
Family Historian: V7
Location: North Lincolnshire, UK

FTM to FH - Places/Media/Descriptions

Post by McHooty » 13 Oct 2022 13:22

Afternoon All

In FTM 2017 I had photos of many buildings linked to Places with an accompanying description or comment.
My import to FH has correctly carried across the Places showing the number of links to Facts
Places.png
Places.png (164.01 KiB) Viewed 1374 times
, but the photos are not linked to the Place (but again, they are to Facts)
Churches.png
Churches.png (149.96 KiB) Viewed 1374 times
and the descriptions are listed as UDF's.
Descriptions.png
Descriptions.png (244.64 KiB) Viewed 1374 times
I could slowly sort this place by place, but I just wondered if there was a shortcut I could use.

Thanks in anticipation.
Michael Huteson

I may be getting older, but the hills aren't getting higher !

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FTM to FH - Places/Media/Descriptions

Post by tatewise » 13 Oct 2022 14:03

Is this related to the same Multimedia Import From FTM (19619) in Jul 2021?
There are two issues to resolve:
  1. Move Media from Facts to Places
    I notice that some Place records exist for both the Church and the Churchyard in the same location. Is that deliberate?
    The Media all seem to be for just the Church and never the Churchyard.
    It will need a custom Plugin to search through all Facts and move any linked Media to the associated Place record taking care not to duplicate any Media links. To what extent does the Title of the Media need to match the Place name?
    Is that Plugin something you could attempt or will you need it written for you?
    *
  2. Correct _TEXT UDF
    Assuming that is the only occurrence of the _TEXT tag then it is probably easiest to edit the GEDCOM file.
    Make sure you have a GEDCOM backup, although the automatic FH Snapshots should be OK.
    Close FH and use a plain text editor such as Notepad to check that the Media records are like this:
    0 @O14130@ OBJE
    1 FILE Media\Churches\St Andrew's Church, ...
    2 FORM jpg
    2 TITL St Andrew's Church, ...
    2 _TEXT The church had a clock ...

    If so then in Notepad replace 2 _TEXT with 1 NOTE throughout.
    However, if 2 _TEXT is not last after 2 FORM and 2 TITL then that won't work.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
McHooty
Platinum
Posts: 34
Joined: 18 Jun 2021 09:10
Family Historian: V7
Location: North Lincolnshire, UK

Re: FTM to FH - Places/Media/Descriptions

Post by McHooty » 13 Oct 2022 17:15

Hi Mike
Thanks for your response. This issue is not related to my previous enquiry.

Part 1
Places for Church & Churchyard is a conscious decision by me, and yes on the screenshot the media was just for the Church, but I've checked and it's not always the case.
The title of the media is a shortened version of the Place name. I've tried to be consistent in using 1st and 3rd parts of 5 part Place layout, but there may be aberrations.
Never written a plugin, but I may give it a go. I know where to come to for help if I need it.

Part 2
_TEXT UDF
I've had a look and unfortunately there is always a 1 _KEYS PICTURE entry after the 2_TEXT so it looks like a manual edit on that anyway
164155.png
164155.png (20.08 KiB) Viewed 1342 times
Worth an ask though.
Thanks for the suggestions
Michael Huteson

I may be getting older, but the hills aren't getting higher !

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FTM to FH - Places/Media/Descriptions

Post by tatewise » 13 Oct 2022 18:29

Part 2
The 2 _TEXT to 1 NOTE replacement is absolutely fine as it meets the criteria that I specified.
The order of 1 NOTE and 1 _KEYS is unimportant.

Part 1
For a first Plugin, this is a rather tricky adjustment, but see how you get on and I'll help as soon as I can.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
McHooty
Platinum
Posts: 34
Joined: 18 Jun 2021 09:10
Family Historian: V7
Location: North Lincolnshire, UK

Re: FTM to FH - Places/Media/Descriptions

Post by McHooty » 13 Oct 2022 18:35

Ok, that's good news at least. I can cope with that.
Just tested positive, so work on plugin is likely to be put on hold :(

Thanks
Michael Huteson

I may be getting older, but the hills aren't getting higher !

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FTM to FH - Places/Media/Descriptions

Post by tatewise » 17 Oct 2022 12:17

I've found time to write the Plugin needed to move those Fact Media to the Place records.

See attached Move Media From Fact To Place Version 0.1 Date 17 Oct 2022.

It relies on the Fact Media name and the Place name having the same first 9 characters, but that can be changed.
Once a Media record has been linked to the Place record any further identical Media are not linked.
The Media are deleted from the Facts.
It produces a Result Set of all the Place records and newly linked Media.

First try it on a copy of your Project to check it behaves correctly.
Attachments
Move Media From Fact To Place .fh_lua
Move Media From Fact To Place Version 0.1 Date 17 Oct 2022
(3.26 KiB) Downloaded 39 times
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
McHooty
Platinum
Posts: 34
Joined: 18 Jun 2021 09:10
Family Historian: V7
Location: North Lincolnshire, UK

Re: FTM to FH - Places/Media/Descriptions

Post by McHooty » 17 Oct 2022 18:53

Hi Mike

That's very generous of you.
I'll take a look over the next few days, and no doubt I'll learn something.

Thanks again
Michael Huteson

I may be getting older, but the hills aren't getting higher !

User avatar
McHooty
Platinum
Posts: 34
Joined: 18 Jun 2021 09:10
Family Historian: V7
Location: North Lincolnshire, UK

Re: FTM to FH - Places/Media/Descriptions

Post by McHooty » 17 Oct 2022 19:07

Oh, omitted to mention that 2_TEXT to 1NOTE worked perfectly.
As a matter of interest would something similar work to move a 2_DATE entry to the Media Record Date field ?
Michael Huteson

I may be getting older, but the hills aren't getting higher !

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FTM to FH - Places/Media/Descriptions

Post by tatewise » 17 Oct 2022 19:55

I would need to see some samples of the 2 _DATE fields in context just like you posted for the 2 _TEXT fields.
i.e. Snippets of the GEDCOM file for the Media records.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
McHooty
Platinum
Posts: 34
Joined: 18 Jun 2021 09:10
Family Historian: V7
Location: North Lincolnshire, UK

Re: FTM to FH - Places/Media/Descriptions

Post by McHooty » 19 Oct 2022 14:44

Hi Mike

Just to confirm that the plugin you kindly wrote for me works fine. Have had a good look at the Places and can't see any obvious anomalies.
Also had a look at the code and think it might have taken me a lot longer to get there myself :lol:

As for the 2_DATE question I have attached snips as requested.
OBJE.FILE._DATE.png
OBJE.FILE._DATE.png (135.24 KiB) Viewed 1094 times
Media 3.png
Media 3.png (195.76 KiB) Viewed 1094 times
153540.png
153540.png (40.2 KiB) Viewed 1094 times
Thanks
Michael Huteson

I may be getting older, but the hills aren't getting higher !

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: FTM to FH - Places/Media/Descriptions

Post by tatewise » 19 Oct 2022 17:54

From what you have posted, an edit to change each 2 _DATE to 1 _DATE should work OK.
Note that the underscore in _DATE is retained because the FH Media Date field is a GEDCOM extension too.
So only the 2 is changed to 1 to adjust the level.
Try and restrict the change to the Media 0 @O123@ OBJE records, although 2 _DATE is unlikely to occur elsewhere.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
McHooty
Platinum
Posts: 34
Joined: 18 Jun 2021 09:10
Family Historian: V7
Location: North Lincolnshire, UK

Re: FTM to FH - Places/Media/Descriptions

Post by McHooty » 20 Oct 2022 13:01

Notepad++ find and replace changed 14k+ :o
On loading FH a warning message indicated that 12 had been Excluded. Didn't take long to find that these already had a Date in place, so a quick amendment to the .ged solved this.

Thanks
Michael Huteson

I may be getting older, but the hills aren't getting higher !

Post Reply