Skip to content

Commit

Permalink
add possibility to add manually
Browse files Browse the repository at this point in the history
  • Loading branch information
mbernasocchi committed May 9, 2018
1 parent dfd82ec commit 2196e97
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions qgis2to3/api2finder/manual_addition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"QGis": ["==Renamed== to Qgis"]
}
3 changes: 3 additions & 0 deletions qgis2to3/api2finder/matchesdict.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"ParametericLine": [
"==Removed=="
],
"QGis": [
"==Renamed== to Qgis"
],
"QgisGui": [
"==Renamed to== QgsGuiUtils"
],
Expand Down
9 changes: 9 additions & 0 deletions qgis2to3/api2finder/merge_duplicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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))

0 comments on commit 2196e97

Please sign in to comment.