SQl to concatenate citations with the same Source and Ancestor

Quote from Matthew Friend on 2024-03-18, 2:24 pmHi Folks:
I received a copy of my brothers tree last week. The source citations are very clutter because he has multiple citations for the same source. An example would be: the 1870 census for a particular ancestor. He has x3 source citations for that source that point to different 'places.' For example one is the weblink and data from ancestry. Then he has a different citation that has the weblink and data for familysearch. While some are duplicates, with some the citations are different but the source is the same for the different facts. Sorry if that sounds confusing, I have attached a screen shot. Some are duplicates, but most are not.
My question is: instead of having to go through many thousands of citations and manually merge some of the data from one citation into another is there a script that would limit by : 1. A specific source 2. limited to a specific ancestor and could add the weblinks to the citation weblink, concatenate the citations (maybe with a space in between), and add the media from the citation being deleted. The idea is I would like to keep all the weblinks (so in the example the weblinks to both ancestry and familysearch), keep all media (just add them to the citation media of the citation that will be kept) and merge or add the citation text to the original citation text.
Then for clean up all I would need to do is open the one revised citation, delete manually what I don't want, then save. I would be a lot quicker than copying and pasting back and forth...
If that doesn't make sense please let me know,
thanks,
Matthew
Hi Folks:
I received a copy of my brothers tree last week. The source citations are very clutter because he has multiple citations for the same source. An example would be: the 1870 census for a particular ancestor. He has x3 source citations for that source that point to different 'places.' For example one is the weblink and data from ancestry. Then he has a different citation that has the weblink and data for familysearch. While some are duplicates, with some the citations are different but the source is the same for the different facts. Sorry if that sounds confusing, I have attached a screen shot. Some are duplicates, but most are not.
My question is: instead of having to go through many thousands of citations and manually merge some of the data from one citation into another is there a script that would limit by : 1. A specific source 2. limited to a specific ancestor and could add the weblinks to the citation weblink, concatenate the citations (maybe with a space in between), and add the media from the citation being deleted. The idea is I would like to keep all the weblinks (so in the example the weblinks to both ancestry and familysearch), keep all media (just add them to the citation media of the citation that will be kept) and merge or add the citation text to the original citation text.
Then for clean up all I would need to do is open the one revised citation, delete manually what I don't want, then save. I would be a lot quicker than copying and pasting back and forth...
If that doesn't make sense please let me know,
thanks,
Matthew
Uploaded files:
Quote from thejerrybryan on 2024-03-18, 3:25 pmThat would be an extremely complicated SQLite script and I'm pretty sure that a script that does exactly what you need or close to what you need does not already exist.
But let me just make sure I understand the issue. Suppose instead of x3 you just have x2 citations for a specific census, one from ancestry and a similar one from familysearch. From ancestry you have a Weblink, an image, and footnote text. From familysearch, you have a Weblink, an image, and footnote text. You want to merge the two citations so that you have a single citation with two Weblinks, with two images, and with a single footnote that is a concatenation of the original two footnotes. And if there were three citations instead of two, you would merge all three together in the same manner. Is that about it?
That would be an extremely complicated SQLite script and I'm pretty sure that a script that does exactly what you need or close to what you need does not already exist.
But let me just make sure I understand the issue. Suppose instead of x3 you just have x2 citations for a specific census, one from ancestry and a similar one from familysearch. From ancestry you have a Weblink, an image, and footnote text. From familysearch, you have a Weblink, an image, and footnote text. You want to merge the two citations so that you have a single citation with two Weblinks, with two images, and with a single footnote that is a concatenation of the original two footnotes. And if there were three citations instead of two, you would merge all three together in the same manner. Is that about it?

Quote from Matthew Friend on 2024-03-18, 6:43 pmyes that sounds right. Then when I go to edit the persons citations I would have (for example) 10 source citations. Then there would be no copying and pasting back and forth of links, media, and citations. Eventually I would want to clean up the citation section if there is overlap in content but that could be just a quick highlight and delete. Having links in the weblinks to both (or all 3+) sources like ancestry/familysearch would be helpful for folks in the future that use my citations and that may have a subscription at one place or the other.
yes that sounds right. Then when I go to edit the persons citations I would have (for example) 10 source citations. Then there would be no copying and pasting back and forth of links, media, and citations. Eventually I would want to clean up the citation section if there is overlap in content but that could be just a quick highlight and delete. Having links in the weblinks to both (or all 3+) sources like ancestry/familysearch would be helpful for folks in the future that use my citations and that may have a subscription at one place or the other.