* Bulk import of Pictures and Documents

Questions about using and managing media in FH
Post Reply
User avatar
bssmith
Gold
Posts: 12
Joined: 26 Jul 2021 02:38
Family Historian: V7
Location: Fairfax County, Virginia

Bulk import of Pictures and Documents

Post by bssmith »

I have a library of ~12,000 images which are all keyworded (within Photo Supreme, my media management tool) with the name(s) of individuals associated with that image. Examples: the names of ten people in a single family photo, or the names of two people referenced in a book (where I have the PDF source).

I want to associate relevant Pictures and Documents with the individuals I have entered within FH7. But (understatement of the year!) I'd prefer not to drag-and-drop 12,000 images into their respective individuals' Media window. It would actually be worse than that = a multiple of those 12,000 drag-and-drops, as most of these items are associated with more than one person. I (think I) know that what's being added at this point within FH7 is a link or pointer to the original. I do not want to move any of the originals into my FH7 project.

Each person's tag is unique, and the record for each individual within FH7 is unique (if I use the Unique ID, probably the best choice here).

Can I somehow turn all of this manual work into a single bulk import?

In this example, a single image with four tagged individuals might be listed within a CSV file as follows (scroll right to see all columns):

Code: Select all

WIN-imageName  WIN-imageLocation                           PSu-imageTag                           FH-UUID
8326-020       "G:\items - 8000 series sbcg\8326-020.tif"  "Joseph Jefferson Griffin (b 1874)"    DEF4982176C4EE49B362C2BAAE7E12451009
8326-020       "G:\items - 8000 series sbcg\8326-020.tif"  "Maude Elma McCollum (b 1879)"         E6344F1F8B90BD4E9F955C3E6E4454880A42
8326-020       "G:\items - 8000 series sbcg\8326-020.tif"  "Robert Elmo Griffin (b 1900)"         994559C08C9AA3449D521A2578C22C5FF781
8326-020       "G:\items - 8000 series sbcg\8326-020.tif"  "Gladys Griffin (b 1905)"              0B0BEEF7F10CA342938009D9EAD5B61C639E
After this example import, the name of the newly-created single Media record would be the string in the WIN-imageName column. The Media panel for each of the four individuals would reflect a pointer to the new Media record.

I know that the relative order of Media records associated with any individual is important re some reports, and I can manually move the "preferred" image into the first slot.

And for a related stretch goal:

I see a couple of threads (viewtopic.php?f=32&t=21497&p=133763#p133763 and viewtopic.php?f=32&t=12761 ) indicating that IPTC keyword tags are not recognized/imported into the Keywords field of the Media record within FH7. All of my tags are XMP-based, so I would be out of luck anyway. But perhaps this could also be a bulk upload step, where I supply all the keywords in a (different? or the same?) CSV and those keywords are then mapped into the Keyword field of the targeted item's Media record within FH7.

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

Re: Bulk import of Pictures and Documents

Post by tatewise »

Yes, that all sounds quite feasible by writing a custom plugin.
The plugin would read the CSV file into a table and probably use the columns as follows:
Use the WIN-imageName to create a Media record and link it to the WIN-imageLocation.
Then scan through the Individual records and for each FH-UUID link it to the desired Media record(s).

See FHUG Knowledge Base Getting Started Writing Plugins and then all the other Plugins topics. If you need any specific advice then just ask. Maybe in the Plugin Technical Support & Development forum.

There is a Flexible CSV Importer published plugin but won't support what you require.
It does not support the creation of Media records linked to Media files.
It uses Custom Id instead of UUID to identify Individual records.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
bssmith
Gold
Posts: 12
Joined: 26 Jul 2021 02:38
Family Historian: V7
Location: Fairfax County, Virginia

Re: Bulk import of Pictures and Documents

Post by bssmith »

Thanks, Mike!

This will be a good opportunity for me break into Lua. Adding to my project list for next year.

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

Re: Bulk import of Pictures and Documents

Post by tatewise »

I've had another look at the Flexible CSV Importer and it can probably be extended for your purposes.

It already allows Source records to be created, with subsidiary fields, and link them to an Individual record.
So it should be feasible to allow Media records to be created, with subsidiary fields such as File and Form, and link them to an Individual record.

It already allows Individual records to be identified by Record Id or Custom Id, so should be feasible to add UUID.

However, I don't think I'll find time to investigate in detail until the new year.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
bssmith
Gold
Posts: 12
Joined: 26 Jul 2021 02:38
Family Historian: V7
Location: Fairfax County, Virginia

Re: Bulk import of Pictures and Documents

Post by bssmith »

That's great news, Mike, thanks.

I appreciate you considering extending your Flexible CSV Importer to meet this use case, when time permits sometime after the New Year.

Doesn't get me off the hook ;) for developing some level of Lua fluency, though, so I will work on that regardless.

-- Ben
User avatar
bssmith
Gold
Posts: 12
Joined: 26 Jul 2021 02:38
Family Historian: V7
Location: Fairfax County, Virginia

Re: Bulk import of Pictures and Documents

Post by bssmith »

Mike,

Time spent during this past holiday week has demonstrated to me that I still have a ton of cleanup work to perform (RM > FH) before I can focus on this bulk import question.

So please treat this possible Flexible CSV Importer mod with the exceptionally low priority it deserves. I'll come back to this thread once I can productively work on this issue.

Thanks!
-- Ben
Post Reply