mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-11-09 19:46:13 +01:00
Merge branch 'master' into master
This commit is contained in:
commit
4cdfa5d832
2 changed files with 5 additions and 3 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
failcount = 0
|
||||
successcount = 0
|
||||
totalcount = 0
|
||||
|
||||
jsonfile = open("../web/atlas.json", "r", encoding='utf-8')
|
||||
existing = json.load(jsonfile)
|
||||
|
@ -73,10 +74,11 @@
|
|||
text = "\n".join(lines)
|
||||
try:
|
||||
outfile.write(json.dumps(json.loads(text))+",\n")
|
||||
successcount += 1
|
||||
except json.JSONDecodeError:
|
||||
failfile.write(text+",\n")
|
||||
failcount += 1
|
||||
print("written "+submission.id+" submitted "+str(round(time.time()-submission.created_utc))+" seconds ago")
|
||||
successcount += 1
|
||||
totalcount += 1
|
||||
|
||||
print(f"\n\nSuccess: {successcount}\nFail: {failcount}\nPlease check manual_atlas.txt for failed entries to manually resolve.")
|
||||
print(f"\n\nSuccess: {successcount}/{totalcount}\nFail: {failcount}/{totalcount}\nPlease check manual_atlas.txt for failed entries to manually resolve.")
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
if (len(sys.argv) > 1):
|
||||
path = sys.argv[1]
|
||||
|
||||
json.load(open(path))
|
||||
json.load(open(path, "r", encoding='utf-8'))
|
||||
|
||||
print("JSON is valid")
|
Loading…
Reference in a new issue