From 34bc80d31dd8dda76ef725d551ef7cd46ab00287 Mon Sep 17 00:00:00 2001 From: miteruzo Date: Fri, 30 Aug 2024 08:27:55 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=AF=E3=81=98=E3=81=BE=E3=82=8A=E3=81=AE?= =?UTF-8?q?=E5=A4=A7=E5=9C=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ .gitmodules | 4 ++++ account.sample.py | 2 ++ ai | 1 + main.py | 26 ++++++++++++++++++++++++++ 5 files changed, 36 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 account.sample.py create mode 160000 ai create mode 100644 main.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1f7df8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/__pycache__ +/account.py +/connection.py diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..1fd27f6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "ai"] + path = ai + url = https://git.miteruzo.com/miteruzo/nizika_broadcast + branch = main diff --git a/account.sample.py b/account.sample.py new file mode 100644 index 0000000..09aca97 --- /dev/null +++ b/account.sample.py @@ -0,0 +1,2 @@ +USER_ID = 'deerjika-bot.bsky.social' +PASSWORD = 'xxxxxxxx' diff --git a/ai b/ai new file mode 160000 index 0000000..28f16ec --- /dev/null +++ b/ai @@ -0,0 +1 @@ +Subproject commit 28f16ec1d6c0efa3fbb70190c203a361ba4b91a0 diff --git a/main.py b/main.py new file mode 100644 index 0000000..b42f583 --- /dev/null +++ b/main.py @@ -0,0 +1,26 @@ +import time +import sys + +from atproto import Client + +from ai.talk import Talk +import account + + +def main () -> None: + api = Client () + + api.login (account.USER_ID, account.PASSWORD) + + while True: + api.send_post (Talk.main ('今Twitterに何か投稿するなら何て書く? ' + '投稿する内容だけを引用符などでくくらず' + 'そのまま出力して')) + + time.sleep (3600) + + pass + + +if __name__ == '__main__': + main (*sys.argv[1:])