* Batch update to source names

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
User avatar
BakerJL75
Famous
Posts: 201
Joined: 14 Dec 2020 11:29
Family Historian: V7

Batch update to source names

Post by BakerJL75 »

I am working on updating all my sources to templated. I figured out how to query the records I want and/or make a list of them. All I want to do is add an "x" to the front of the short title. My guess is the search and replace plugin would do what I want, but I can't figure out the LUA pattern to use.

Thanks for any idea's
Thanks,
Jackie
User avatar
tatewise
Megastar
Posts: 28434
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Batch update to source names

Post by tatewise »

Presumably, the "x" is just to identify which records you want to update.
Have you considered simply putting them in a Named List?

In the Search and Replace plugin I guess that on the Extra Filters tab you have chosen Source Short (SOUR.ABBR) and on the Major Options tab selected a subset of Source Records (SOUR) so only those ones get changed.

The search term will be (.*) to capture everything and x%1 to replace with x and the captured text.
Note that it will only work for Source Records that have a Short Title.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Jane
Site Admin
Posts: 8518
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Batch update to source names

Post by Jane »

Another different option if you are making a list of sources to change you could simply save the result set as a named list and delete them from the list as you change them over.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
tatewise
Megastar
Posts: 28434
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Batch update to source names

Post by tatewise »

I said that?! :D
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Jane
Site Admin
Posts: 8518
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Batch update to source names

Post by Jane »

Sorry missed the suggestion
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
BakerJL75
Famous
Posts: 201
Joined: 14 Dec 2020 11:29
Family Historian: V7

Re: Batch update to source names

Post by BakerJL75 »

Thanks all. I want the X to show up in the source list so I don't accidentally use them again. I'll backup and try the search and replace
Thanks,
Jackie
User avatar
tatewise
Megastar
Posts: 28434
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Batch update to source names

Post by tatewise »

I'm not sure I understand what you mean by accidentally use them again.

It is very easy to differentiate old Generic Sources from new Templated Sources.
The former have a Generic Type field value and the latter have a Template field value.
Those fields are both listed in the Sources tab in the Records Window and in any Source selection dialogues.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
BakerJL75
Famous
Posts: 201
Joined: 14 Dec 2020 11:29
Family Historian: V7

Re: Batch update to source names

Post by BakerJL75 »

True. But if I'm in the source box on the property tab deciding if I need to cite an existing source or make a new one, it's hard to tell what the existing citation is without the x.
Citation.png
Citation.png (50.15 KiB) Viewed 2206 times
Now I can tell right away if it's an old citation I need to replace, or if it's a new one I can leave alone.

I should mention, I'm mostly a lumper. It has it's pro's and con's, but I've been a lumper for many years and it just works for me. So I often want to copy and paste a citation to reuse it.
Thanks,
Jackie
Post Reply