From a0cc6b8897137fe8ef344990062edc00c3e8f39e Mon Sep 17 00:00:00 2001 From: lza_menace Date: Fri, 4 Dec 2020 10:57:34 -0800 Subject: [PATCH] add cli helper for posting memes to boards --- suchwow/app.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/suchwow/app.py b/suchwow/app.py index f6d4afd..7a32cf3 100644 --- a/suchwow/app.py +++ b/suchwow/app.py @@ -92,6 +92,16 @@ def post_new_memes(): post_discord_webhook(post) return +@app.cli.command("post_meme") +@click.argument("post_id") +def post_new_memes(post_id): + post = Post.get(id=post_id) + if not post.to_reddit: + make_post(post) + if not post.to_discord: + post_discord_webhook(post) + return + @app.cli.command("reddit_random") def reddit_random(): # run every 8 hours