mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-05-15 18:54:28 +02:00
parent
762ef9e24e
commit
1d1ee16b73
|
@ -20,7 +20,7 @@ When you're happy with the shape you've drawn, press <kbd>Finish</kbd>. You will
|
|||
- **Website**: If you're describing a project, the project's main website would be suitable here.
|
||||
- **Subreddit**: Format it like `r/subreddit`.
|
||||
- **Discord**: Write the invite code, that the invite link without the `discord.gg/` part.
|
||||
- **Wiki**: The page title of [The r/place Wiki](https://place-wiki.stefanocoding.me/).
|
||||
- **Wiki**: The page title of [the r/place Wiki](https://place-wiki.stefanocoding.me/).
|
||||
|
||||
All fields but the name are optional. For example, a country flag doesn't necessarily need a description.
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ def set_flair(submission, flair):
|
|||
|
||||
print(f"{submission.id}: Processing...")
|
||||
|
||||
if submission.link_flair_text == "New Entry" or submission.link_flair_text == "Edit Entry" or True:
|
||||
if submission.link_flair_text == "New Entry" or submission.link_flair_text == "Edit Entry":
|
||||
|
||||
try:
|
||||
|
||||
|
@ -122,9 +122,9 @@ def set_flair(submission, flair):
|
|||
if submission_json:
|
||||
|
||||
if submission.link_flair_text == "Edit Entry":
|
||||
assert submission_json["id"] > 0, "Edit invalid because ID is tampered, it must not be 0 or -1!"
|
||||
assert submission_json["id"] != -1, "Edit invalid because ID is tampered, it must not be -1!"
|
||||
else:
|
||||
assert submission_json["id"] <= 0, "Addition invalid because ID is tampered, it must be 0 or -1!"
|
||||
assert submission_json["id"] == -1, "Addition invalid because ID is tampered, it must be -1!"
|
||||
|
||||
submission_json_dummy = {"id": submission_json["id"], "_reddit_id": submission.id, "_author": submission.author.name}
|
||||
|
||||
|
@ -137,7 +137,7 @@ def set_flair(submission, flair):
|
|||
assert validation_status < 3, \
|
||||
"Submission invalid after validation. This may be caused by not enough points on the path."
|
||||
|
||||
with open(f'{patches_dir}reddit-{submission.id}-{"-".join(submission["name"].split()).lower()}.json', 'w', encoding='utf-8') as out_file:
|
||||
with open(f'{patches_dir}reddit-{submission.id}-{"-".join(submission.name.split()).lower()}.json', 'w', encoding='utf-8') as out_file:
|
||||
out_file.write(json.dumps(submission_json, ensure_ascii=False))
|
||||
|
||||
count_success += 1
|
||||
|
|
Loading…
Reference in a new issue