i added so much that its hard to remember what i added.
This commit is contained in:
+14
-8
@@ -1,7 +1,13 @@
|
||||
from praw import models
|
||||
def py_print(*args: str):
|
||||
print("Py -", " ".join(args))
|
||||
|
||||
py_print("Importing external modules...")
|
||||
|
||||
import emoji
|
||||
import sys
|
||||
|
||||
py_print("Importing internal modules")
|
||||
|
||||
import bot as botPy
|
||||
import data
|
||||
import reddit
|
||||
@@ -11,22 +17,22 @@ def main():
|
||||
sys.stdout.reconfigure(encoding="utf-8")
|
||||
|
||||
bot = botPy.Bot()
|
||||
print("Reading data...")
|
||||
py_print("Reading data...")
|
||||
data.read_data(bot)
|
||||
|
||||
check_emoji = emoji.emojize(":check_mark_button:")
|
||||
cross_emoji = emoji.emojize(":cross_mark:")
|
||||
|
||||
print("Fetching posts...")
|
||||
py_print("Fetching posts...")
|
||||
posts = reddit.fetch_posts_with_flair(bot, "Original Art")
|
||||
|
||||
print("Evaluating posts...\n\n")
|
||||
py_print("Evaluating posts...\n\n")
|
||||
for post in posts:
|
||||
media = reddit.has_media(post)
|
||||
media_urls = "\n ".join(media[3])
|
||||
|
||||
print(
|
||||
f"{post.title}",
|
||||
py_print(
|
||||
f"\n{post.title}",
|
||||
f"\n {post.shortlink}"
|
||||
f"\n {check_emoji if media[0] else cross_emoji} Media ({media[1]}) [{media[2]}]",
|
||||
f"\n {media_urls}\n"
|
||||
@@ -48,5 +54,5 @@ def main():
|
||||
data.write_data(bot)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
py_print("Running main()...")
|
||||
main()
|
||||
Reference in New Issue
Block a user