From 2196e97ae563747c66f4913e456e4e62254fbdc5 Mon Sep 17 00:00:00 2001 From: Marco Bernasocchi Date: Wed, 9 May 2018 13:58:52 +0200 Subject: [PATCH] add possibility to add manually --- qgis2to3/api2finder/manual_addition.json | 3 +++ qgis2to3/api2finder/matchesdict.py | 3 +++ qgis2to3/api2finder/merge_duplicates.py | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100644 qgis2to3/api2finder/manual_addition.json diff --git a/qgis2to3/api2finder/manual_addition.json b/qgis2to3/api2finder/manual_addition.json new file mode 100644 index 0000000..43dd476 --- /dev/null +++ b/qgis2to3/api2finder/manual_addition.json @@ -0,0 +1,3 @@ +{ + "QGis": ["==Renamed== to Qgis"] +} \ No newline at end of file diff --git a/qgis2to3/api2finder/matchesdict.py b/qgis2to3/api2finder/matchesdict.py index 01c1ffc..554e609 100644 --- a/qgis2to3/api2finder/matchesdict.py +++ b/qgis2to3/api2finder/matchesdict.py @@ -29,6 +29,9 @@ "ParametericLine": [ "==Removed==" ], + "QGis": [ + "==Renamed== to Qgis" + ], "QgisGui": [ "==Renamed to== QgsGuiUtils" ], diff --git a/qgis2to3/api2finder/merge_duplicates.py b/qgis2to3/api2finder/merge_duplicates.py index 8e20f5f..fa8ee84 100644 --- a/qgis2to3/api2finder/merge_duplicates.py +++ b/qgis2to3/api2finder/merge_duplicates.py @@ -3,6 +3,11 @@ newdict = {} +# load manual addition dict +with open('./manual_addition.json', 'r') as f: + manual_addition = json.load(f) + + print('merging duplicates') with open('matches.txt', 'r') as f: for l in f: @@ -19,5 +24,9 @@ else: newdict[k] = [v] print('creating python dict file') + +newdict.update(manual_addition) + with open('matchesdict.py', 'w') as f: f.write('matches = ' + json.dumps(newdict, indent=4, sort_keys=True)) +