From c96e645f5d242e59d61ad906bf23c2d573af65ef Mon Sep 17 00:00:00 2001 From: "yakumo.izuru" Date: Fri, 12 May 2023 01:17:25 +0000 Subject: [PATCH] Attempt to make data_limit configurable Signed-off-by: Izuru Yakumo git-svn-id: file:///srv/svn/repo/chen/trunk@21 32723744-9b23-0b4a-b1da-9b2e968f9461 --- COPYING | 18 +++--------------- README.org | 5 ++--- config.ini.default | 1 + main.py | 10 +++++----- 4 files changed, 11 insertions(+), 23 deletions(-) diff --git a/COPYING b/COPYING index a8d379a..5aabf52 100644 --- a/COPYING +++ b/COPYING @@ -1,16 +1,4 @@ -Discordian Public License (DPL) +Freedom License v1 (2023年05月11日) -All Rites Reversed Ⓚ (3188) (czar) -All Rites Reversed (ĸ) 3189 Aoi K. - -Permission is hereby granted, to any person obtaining a copy of this -material without restriction, including but not limited the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the material, subject to the following conditions: - -YOU AGREE THAT THERE IS NO GODDESS BUT GODDESS AND SHE IS YOUR GODDESS & -THAT THERE IS NO ERISIAN MOVEMENT BUT THE ERISIAN MOVEMENT AND IT IS THE -ERISIAN MOVEMENT. - -HAIL ERIS! -FIVE TONS OF FLAX \ No newline at end of file +全く無限的自由です。 +It's infinite freedom. diff --git a/README.org b/README.org index d96be4e..38c9050 100644 --- a/README.org +++ b/README.org @@ -1,8 +1,7 @@ #+TITLE: Chen XMPP bot -#+AUTHOR: Aoi K. +#+AUTHOR: Izuru Yakumo -XMPP bot to preview links and file contents. This may be identified as [[https://gt.kalli.st/czar/angel][angel]]'s -younger sibling. +XMPP bot to preview links and file contents. Shikigami of the Shikigami of the Gap Youkai * Configuration copy the =config.ini.default= to =.config.ini= and set your variables accordly diff --git a/config.ini.default b/config.ini.default index c8348a8..72c2e28 100644 --- a/config.ini.default +++ b/config.ini.default @@ -3,3 +3,4 @@ jid = chen@example.com password = b0TPA55W0rD nick = Chen autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com +upload_data_size = 100000000 \ No newline at end of file diff --git a/main.py b/main.py index 20f36f1..5b87279 100644 --- a/main.py +++ b/main.py @@ -17,7 +17,7 @@ parser = "html.parser" user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:10.0)" " Gecko/20100101 Firefox/10.0" accept_lang = "en-US" -data_limit = 100000000 # 100MB +data_limit = upload_data_size # 100MB headers = { "user-agent": user_agent, @@ -31,6 +31,7 @@ block_list = ( "0.0.0.0", "youtu.be", "www.youtube.com", + "youtube.com", ) req_list = ("http://", "https://") html_files = ("text/html", "application/xhtml+xml") @@ -174,10 +175,8 @@ class ChenBot(ClientXMPP): async def update_info(self): vcard = self.plugin["xep_0054"].make_vcard() - vcard["URL"] = "https://gt.kalli.st/novaburst/chen" - vcard[ - "DESC" - ] = "Chen is a self-proclaimed little sister of Angel. Her master is Ran Yakumo whose master is Yukari Yakumo" + vcard["URL"] = "https://git.chaotic.ninja/yakumo.izuru/chen" + vcard["DESC"] = "Shikigami of the Shikigami of the Gap Youkai" vcard["NICKNAME"] = "Chen" vcard["FN"] = "Chen" asyncio.gather(self.plugin["xep_0054"].publish_vcard(vcard)) @@ -224,6 +223,7 @@ if __name__ == "__main__": password = config["chen"]["password"] nick = config["chen"]["nick"] autojoin = config["chen"]["autojoin"].split() + upload_data_size = config["chen"]["upload_data_size"] bot = ChenBot(jid, password, nick, autojoin=autojoin) bot.connect()