From bfa4bc4799f3dfb4c49fd069741af2b54f29fa02 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Mon, 14 Apr 2025 03:29:22 -0700 Subject: add maimai dx support --- .env.template | 1 + rasis.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.env.template b/.env.template index ee0dbe3..f300eb4 100644 --- a/.env.template +++ b/.env.template @@ -1,2 +1,3 @@ SHARKEY_KEY= SHARKEY_INSTANCE= +HASH_FILE_PATH= diff --git a/rasis.py b/rasis.py index ca8018b..b719527 100644 --- a/rasis.py +++ b/rasis.py @@ -8,7 +8,7 @@ import os load_dotenv() -HASHED_NEWS_FILES = "hashes.txt" +HASHED_NEWS_FILES = os.environ.get("HASH_FILE_PATH") def generate_queued_posts() -> list: def news_already_hashed(line: str) -> bool: @@ -56,8 +56,11 @@ def generate_post_content(post_data: dict) -> str: game = "SOUND VOLTEX" tags = "#sdvx #soundvoltex #bemani" elif "CHUNITHM" in post_data["identifier"]: - game = "CHUNITHM JPN" + game = "CHUNITHM (JPN)" tags = "#chunithm" + elif "MAIMAIDX" in post_data["identifier"]: + game = "maimai DX (JPN)" + tags = "#maimaidx" content = f"📰 {game} - {post_data['date']}\n\n" if post_data["type"] is not None: content = content + f"[{post_data['type']}] " @@ -96,4 +99,4 @@ if __name__ == "__main__": queued_posts = generate_queued_posts() for post in queued_posts: content = generate_post_content(post) - post_on_fedi(content) + post_on_fedi(post) -- cgit v1.2.3