Jump to content


Photo

Search and replace citations

Search and replace Citations Find everywhere

  • Please log in to reply
2 replies to this topic

#1 Jonathan589

Jonathan589

    Advanced Member

  • Members
  • PipPipPip
  • 73 posts

Posted 10 November 2016 - 02:44 PM

I do like Find Everywhere and Search and Replace. Is there a way of uniting these two tools to change citation references? Finding things is easy, although the print of uses of a reference is no help at all; it just lists that (say) 24 of a particular citation are Out There but not saying where. S&R is also easy but it only works on certain items.

 

I'm renaming the references to a set of sources and would like to be able to change the page ref inside the source. To be specific the source is 'OPR Dingwall' containing hundreds of references of the form '029_CH62/1_Bv_1684', each used maybe a couple of dozen times for different people, and I want to change them to a new reference '062/00 0010 0030'.

 

I still haven't bitten the bullet to become a SQL expert; is this what I need to do now?

 

Thanks

Jonathan



#2 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6268 posts

Posted 10 November 2016 - 09:31 PM

SQLite is not necessarily the best solution because it does not have a native regular expression replace function; it does have regular expression search but I think what you will need is the complementary replace function so that the search can match, parse and conditionally substitute. I would suggest that this might be more effectively done in an exported GEDCOM file with a text editor such as Notepad++ which supports regex search and replace.

 

However, you may find you need to write a script in it to carry out everything or that you need a higher level scripting language, possibly with a table lookup capability; that might imply using something that can work with a database so it might just as well be using SQLite for the lookup tables in which case it could operate directly on the RM database, too. So now you are looking at a SQLite manager with a scripting language or a high level programming language with a SQLite connection. This is a little beyond what I have dabbled in with Visual C# but that is one example. There are SQLite managers with scripting language, e.g., SQLite Expert Pro $99 has Lua and Pascal scripting.


Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#3 Jonathan589

Jonathan589

    Advanced Member

  • Members
  • PipPipPip
  • 73 posts

Posted 12 November 2016 - 09:24 AM

Thank you for your reply Tom. The basic text-replacement in a GEDCOM file works immediately just as you said. I'm experimenting with ways to do more than one replacement at a time and also to re-import the data without losing shared facts and so on. I've a programming family member so will work on him with your other suggestion.

 

Cheers, Jonathan