Skip to content

Commit

Permalink
Merge pull request #1480 from placeAtlas/cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans5958 authored Jul 29, 2023
2 parents b3ba659 + 96da949 commit 5b0b148
Show file tree
Hide file tree
Showing 4 changed files with 145 additions and 107 deletions.
11 changes: 5 additions & 6 deletions tools/merge_out.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
for i, entry in enumerate(atlas_data):
atlas_ids[entry['id']] = i
id = entry['id']
if id.isnumeric() and int(id) > last_id and int(id) - last_id < 100:

if isinstance(id, int) and id > last_id and id - last_id < 100:
last_id = int(id)

patches_dir = "data/patches/"
Expand Down Expand Up @@ -74,7 +75,7 @@
if reddit_id in out_ids:
print(f"{filename}: Submission from {entry['id']} has been included! This will be ignored from the merge.")
continue
out_ids.append(reddit_id)
out_ids.append(str(reddit_id))
del entry['_reddit_id']

# This wouldn't work if it is an edit.
Expand All @@ -92,11 +93,9 @@
if isinstance(entry['id'], int) and entry['id'] < 1 or entry['id'] == '0':
last_id += 1
print(f"{filename}: Entry is new, assigned ID {last_id}")
entry['id'] = str(last_id)
elif isinstance(entry['id'], int):
entry['id'] = str(entry['id'])
entry['id'] = last_id
elif not is_permanent_file and entry['id'] not in out_ids:
out_ids.append(entry['id'])
out_ids.append(str(entry['id']))

if entry['id'] in atlas_ids:
index = atlas_ids[entry['id']]
Expand Down
2 changes: 1 addition & 1 deletion web/_js/main/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function buildObjectsList(filter, sort = defaultSort) {
entry.name.toLowerCase().includes(filter.toLowerCase())
|| entry.description?.toLowerCase().includes(filter.toLowerCase())
|| Object.values(entry.links).flat().some(str => str.toLowerCase().includes(filter))
|| entry.id === filter
|| entry.id.toString() === filter
)
})
document.getElementById("atlasSize").innerHTML = "Found " + atlasDisplay.length + " entries."
Expand Down
3 changes: 3 additions & 0 deletions web/all-authors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5560,3 +5560,6 @@ GDJosef
eri531
-Yox-
gh:Slymeball
Annilee_Rose2
gh:GeoDash897
wiev0
Loading

0 comments on commit 5b0b148

Please sign in to comment.