@@ -0,0 +1,1615 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A#%0A# This script geopy to find the latitude and longitude%0A# of locations.%0A#%0A# Since we can not perform too much requests, this script%0A# stores the result of the requests in a text file.%0A%0Adef upperCaseFirstLetterName(gedcomFilename, outputFilename = None):%0A    import os%0A    import re%0A    def repl_func(m):%0A        %22%22%22process regular expression match groups for word upper-casing problem%22%22%22%0A        name = m.group(2)%0A        upperCaseName = ' '.join(%5Bn%5B0%5D.upper()+n%5B1:%5D.lower() for n in name.split()%5D)%0A        return m.group(1)+'/'+upperCaseName+'/'+m.group(3)%0A    gg = re.compile('(.*)%5C/(.*)%5C/(.*)',flags=re.UNICODE)%0A    lines = %5Bc.strip() for c in open(gedcomFilename, 'r', encoding='utf-8').readlines()%5D%0A    newLines = %5Bgg.sub(repl_func, line) for line in lines%5D%0A    if outputFilename is None:%0A        outputFilename = os.path.splitext(gedcomFilename)%5B0%5D+'_WithUpperCase.ged'%0A    open(outputFilename, 'w').writelines('%5Cn'.join(newLines))%0A%0Aif __name__ == '__main__':%0A    import argparse%0A    parser = argparse.ArgumentParser(%0A        description = 'This script changes the case of family name in a gedcom file')%0A    parser.add_argument('-g','--gedcom', type = str, default = 'my_gedcom_file.ged',%0A                       help = 'Gedcom filename')%0A    parser.add_argument('-o','--outputGedcom', type = str, default = None,%0A                       help='Optional output name. If not provided, a filename will be generated from the gedcom filename')%0A    args = parser.parse_args()%0A    upperCaseFirstLetterName(gedcomFilename = args.gedcom, outputFilename = args.outputGedcom)

Add script gedcomUpperCaseFirstLetterName