Attempt to make data_limit configurable
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/chen/trunk@21 32723744-9b23-0b4a-b1da-9b2e968f9461
This commit is contained in:
parent
b30214b8a3
commit
c96e645f5d
18
COPYING
18
COPYING
@ -1,16 +1,4 @@
|
|||||||
Discordian Public License (DPL)
|
Freedom License v1 (2023年05月11日)
|
||||||
|
|
||||||
All Rites Reversed Ⓚ (3188) (czar) <czar at kalli dot st>
|
全く無限的自由です。
|
||||||
All Rites Reversed (ĸ) 3189 Aoi K. <koizumi dot aoi at chaotic dot ninja>
|
It's infinite freedom.
|
||||||
|
|
||||||
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
|
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
#+TITLE: Chen XMPP bot
|
#+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
|
XMPP bot to preview links and file contents. Shikigami of the Shikigami of the Gap Youkai
|
||||||
younger sibling.
|
|
||||||
|
|
||||||
* Configuration
|
* Configuration
|
||||||
copy the =config.ini.default= to =.config.ini= and set your variables accordly
|
copy the =config.ini.default= to =.config.ini= and set your variables accordly
|
||||||
|
@ -3,3 +3,4 @@ jid = chen@example.com
|
|||||||
password = b0TPA55W0rD
|
password = b0TPA55W0rD
|
||||||
nick = Chen
|
nick = Chen
|
||||||
autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
|
autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
|
||||||
|
upload_data_size = 100000000
|
10
main.py
10
main.py
@ -17,7 +17,7 @@ parser = "html.parser"
|
|||||||
user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:10.0)"
|
user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:10.0)"
|
||||||
" Gecko/20100101 Firefox/10.0"
|
" Gecko/20100101 Firefox/10.0"
|
||||||
accept_lang = "en-US"
|
accept_lang = "en-US"
|
||||||
data_limit = 100000000 # 100MB
|
data_limit = upload_data_size # 100MB
|
||||||
|
|
||||||
headers = {
|
headers = {
|
||||||
"user-agent": user_agent,
|
"user-agent": user_agent,
|
||||||
@ -31,6 +31,7 @@ block_list = (
|
|||||||
"0.0.0.0",
|
"0.0.0.0",
|
||||||
"youtu.be",
|
"youtu.be",
|
||||||
"www.youtube.com",
|
"www.youtube.com",
|
||||||
|
"youtube.com",
|
||||||
)
|
)
|
||||||
req_list = ("http://", "https://")
|
req_list = ("http://", "https://")
|
||||||
html_files = ("text/html", "application/xhtml+xml")
|
html_files = ("text/html", "application/xhtml+xml")
|
||||||
@ -174,10 +175,8 @@ class ChenBot(ClientXMPP):
|
|||||||
|
|
||||||
async def update_info(self):
|
async def update_info(self):
|
||||||
vcard = self.plugin["xep_0054"].make_vcard()
|
vcard = self.plugin["xep_0054"].make_vcard()
|
||||||
vcard["URL"] = "https://gt.kalli.st/novaburst/chen"
|
vcard["URL"] = "https://git.chaotic.ninja/yakumo.izuru/chen"
|
||||||
vcard[
|
vcard["DESC"] = "Shikigami of the Shikigami of the Gap Youkai"
|
||||||
"DESC"
|
|
||||||
] = "Chen is a self-proclaimed little sister of Angel. Her master is Ran Yakumo whose master is Yukari Yakumo"
|
|
||||||
vcard["NICKNAME"] = "Chen"
|
vcard["NICKNAME"] = "Chen"
|
||||||
vcard["FN"] = "Chen"
|
vcard["FN"] = "Chen"
|
||||||
asyncio.gather(self.plugin["xep_0054"].publish_vcard(vcard))
|
asyncio.gather(self.plugin["xep_0054"].publish_vcard(vcard))
|
||||||
@ -224,6 +223,7 @@ if __name__ == "__main__":
|
|||||||
password = config["chen"]["password"]
|
password = config["chen"]["password"]
|
||||||
nick = config["chen"]["nick"]
|
nick = config["chen"]["nick"]
|
||||||
autojoin = config["chen"]["autojoin"].split()
|
autojoin = config["chen"]["autojoin"].split()
|
||||||
|
upload_data_size = config["chen"]["upload_data_size"]
|
||||||
bot = ChenBot(jid, password, nick, autojoin=autojoin)
|
bot = ChenBot(jid, password, nick, autojoin=autojoin)
|
||||||
|
|
||||||
bot.connect()
|
bot.connect()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user