Skip to content

Commit

Permalink
souriez
Browse files Browse the repository at this point in the history
  • Loading branch information
eya46 committed Sep 12, 2023
1 parent 9a92e80 commit 19f7b79
Show file tree
Hide file tree
Showing 52 changed files with 4,770 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ENVIRONMENT=dev
SUPERUSERS=["114514"]
COMMAND_START=["/", ""]
COMMAND_SEP=[" "]
RECORD_PRIORITY=99
RISK_CONTROL=true
SEARCH_LIMIT=2
6 changes: 6 additions & 0 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
HOST=0.0.0.0
PORT=5750
LOG_LEVEL=DEBUG
apscheduler_autostart=True

SUPERUSERS=["114514"]
2 changes: 2 additions & 0 deletions .env.prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
HOST=127.0.0.1
PORT=5750
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,29 @@
# DlsBot
提供校内服务

> 23/9/11号学校把我vpn ban了,懒得搞了
>
> 手动去敏 + 删除一堆没有的插件
>
> 各个插件时间跨度有点长,风格都不一样~
# 功能

- xfb
- - 实现查电费 充电费 电费表 ...
- atrust
- - 通过学校VPN做代理

# 部署
> 数据库用的是postgresql
>
> 到 db/__init__.py 修改下 link_db
>
> 当这个是个插件库吧,想要开发的话自己新建个bot
>
> 这个写的太乱了,不想重构了
```bash
poetry install
poetry run python bot.py
```
> 其实部署环境是全局pip...,poetry环境上传前才补的...
160 changes: 160 additions & 0 deletions all.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
aiocache==0.11.1
aiocqhttp==1.4.2
aiofiles==0.8.0
aiohttp==3.8.1
aiosignal==1.2.0
anyio==3.5.0
APScheduler==3.8.1
arrow==1.2.2
asgiref==3.4.1
async-timeout==4.0.1
asyncpg==0.25.0
attrs==21.2.0
Babel==2.9.1
backcall==0.2.0
backports.zoneinfo==0.2.1
beautifulsoup4==4.10.0
bidict==0.21.4
binaryornot==0.4.4
blinker==1.4
Brotli==1.0.9
certifi==2021.10.8
cffi==1.15.0
chardet==4.0.0
charset-normalizer==2.0.12
click==8.0.4
colorama==0.4.4
cookiecutter==1.7.3
cryptography==3.4.8
cycler==0.11.0
decorator==5.1.0
docopt==0.6.2
fastapi==0.73.0
Flask==2.0.3
Flask-BabelEx==0.9.4
Flask-Login==0.5.0
Flask-Mail==0.9.1
Flask-Paranoid==0.2.0
Flask-Principal==0.4.0
Flask-Security==3.0.0
Flask-SocketIO==5.1.1
Flask-WTF==1.0.0
fonttools==4.28.5
frozenlist==1.2.0
gevent==21.8.0
gino==1.0.1
greenlet==1.1.2
h11==0.12.0
h2==4.1.0
hpack==4.0.0
httpcore==0.14.7
httptools==0.3.0
httpx==0.22.0
hypercorn==0.13.2
hyperframe==6.0.1
idna==3.3
imageio==2.16.1
importlib-metadata==4.11.3
ipython==7.29.0
itsdangerous==2.1.0
jedi==0.18.0
jieba==0.42.1
Jinja2==3.0.3
jinja2-time==0.2.0
kaitaistruct==0.9
kiwisolver==1.3.2
ldap3==2.9.1
loguru==0.6.0
lxml==4.6.4
Markdown==3.3.6
MarkupSafe==2.1.0
matplotlib==3.5.1
matplotlib-inline==0.1.3
mitmproxy==7.0.4
msgpack==1.0.3
multidict==6.0.2
nb-cli==0.6.6
nonebot-adapter-cqhttp==2.0.0b1
nonebot-adapter-onebot==2.0.0b1
nonebot-plugin-apscheduler==0.1.2
nonebot-plugin-htmlrender==0.0.4.5
nonebot-plugin-test==0.3.0
nonebot2==2.0.0b2
numpy==1.21.4
opencv-python==4.5.4.60
packaging==21.3
parso==0.8.2
passlib==1.7.4
pickleshare==0.7.5
Pillow==8.4.0
pipreqs==0.4.11
playwright==1.19.1
poyo==0.5.0
priority==2.0.0
prompt-toolkit==3.0.28
protobuf==3.18.1
publicsuffix2==2.20191221
pyasn1==0.4.8
pycparser==2.21
pydantic==1.9.0
pydivert==2.1.0
pyee==8.1.0
pyfiglet==0.8.post1
Pygments==2.10.0
pygtrie==2.4.2
pymdown-extensions==9.3
pyncm==1.6.5.2
pyOpenSSL==20.0.1
pyparsing==2.4.7
pyperclip==1.8.2
python-dateutil==2.8.2
python-dotenv==0.19.2
python-engineio==3.14.2
python-markdown-math==0.8
python-slugify==6.1.1
python-socketio==4.6.1
pytz==2021.3
pytz-deprecation-shim==0.1.0.post0
PyYAML==6.0
qrcode==7.3.1
Quart==0.14.1
requests==2.27.1
rfc3986==1.5.0
ruamel.yaml==0.17.16
ruamel.yaml.clib==0.2.6
six==1.16.0
sniffio==1.2.0
sortedcontainers==2.4.0
soupsieve==2.3.1
speaklater==1.3
SQLAlchemy==1.3.24
starlette==0.17.1
text-unidecode==1.3
tinydb==4.7.0
toml==0.10.2
tomlkit==0.9.2
tornado==6.1
traitlets==5.1.1
typing-extensions==4.1.1
tzdata==2021.5
tzlocal==4.1
ujson==5.1.0
urllib3==1.26.8
urwid==2.1.2
uvicorn==0.17.6
watchgod==0.7
wcwidth==0.2.5
websocket==0.2.1
websockets==10.1
Werkzeug==2.0.3
win32-setctime==1.1.0
wordcloud==1.8.1
ws4py==0.5.1
wsproto==1.0.0
WTForms==3.0.0
yarg==0.1.9
yarl==1.7.2
zipp==3.7.0
zope.event==4.5.0
zope.interface==5.4.0
zstandard==0.15.2
44 changes: 44 additions & 0 deletions api/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
from datetime import datetime, timedelta
from typing import List

from nonebot.adapters.onebot.v11 import Message, MessageEvent
from nonebot.internal.params import Depends

from .pic import Txt2Img, to_pic, to_img


def split(txt, split_by=(" ", ",")) -> List[str]:
_temp = ""
_res = []

for _i in str(txt):
if _i in split_by:
if _temp == "":
continue
else:
_res.append(_temp)
_temp = ""
else:
_temp += _i
if _temp != "":
_res.append(_temp)
return _res


def get_args(message: Message):
return split(" ".join([str(i) for i in message if i.is_text()]))


def next_day(day: int):
return (datetime.now() + timedelta(days=day)).strftime('%Y-%m-%d %H:%M')


def next_minutes(minutes: int):
return (datetime.now() + timedelta(minutes=minutes)).strftime('%Y-%m-%d %H:%M')


def ArgList(*args, **kwargs):
async def _(event: MessageEvent):
return split(str(event.message), *args, **kwargs)

return Depends(_)
Binary file added api/data/font/qsz-lgy85.ttf
Binary file not shown.
Binary file added api/data/font/sarasa-mono-sc-regular.ttf
Binary file not shown.
Binary file added api/data/image/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added api/data/image/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 19f7b79

Please sign in to comment.