upaste-rs: 一个 Ubuntu Pastebin 的命令行程序


简介

UPaste-Rs 是一个命令行应用程序,允许您更快速的、直接在终端上创建 Paste

用法

1
2
3
4
5
6
7
8
9
10
11
upaste-rs [选项] [文本]

参数:
[文本] 将要提交的文本

Options:
-s, --syntax <SYNTAX> 语法高亮类型 [默认: text]
-e, --expiration <EXPIRATION> 过期时间 [默认: ]
-p, --poster <POSTER> Ubuntu Pastebin 用户名
-h, --help 查看帮助
-V, --version 查看版本

不指定文本时,将从系统默认编辑器输入

许可证

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
upaste-rs - A CLI Application for Ubuntu PasteBin
Copyright (C) 2024 XiaoDeng3386, Shirasawa-CN

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.

OneDisc: Discord 平台的 OneBot 实现


简介

OneDisc 是一个 Discord 平台的开源 OneBot 实现

在 Discord 上实现了 OneBot V11 / V12 标准,并做了一些拓展

理论支持连接 NoneBot2、koishi 等所有支持 OneBot V11 / V12 标准的框架

使用

快速开始

性能

内存占用约 70MB^1,稳定运行无报错

XDbot2 Cave API


请求地址

接口列表

随机回声洞

获取一个随机的回声洞内容,包括发送者和文本。

终结点 返回类型
/v1 application/jsontext/javascript

参数

参数 必须 说明
return 否(默认 json 返回类型(json/js
caveIdVar 回声洞ID常量名(默认cave_id
caveContentVar 回声洞内容常量名(默认cave_content
caveSenderVar 回声洞投稿者常量名(默认cave_sender

返回示例

请求:

1
https://caveapi.xdbot2.itcdt.top/v1

响应:

1
{"id":538,"sender":"IP:127.0.0.1","content":"风急天高猿啸哀,尚思为国戍轮台。夜兰卧听风吹雨,神里绫华入梦来\n\n—— 哔哩哔哩·UID506743561"}

请求:

1
https://caveapi.thisisxd.top/v1?return=js

响应:

1
2
3
const cave_id = "984"
const cave_content = "“皇上,奇变偶不变”\n“可以了可以了,我知道你要说啥了,去一下隔壁那旮沓,那里边一大堆穿越者,他们正在研究马克思主义,朕这边已经准备好改革开放了,你们赶紧研究研究怎么最快的切换到中国特色社会主义,赶紧”"
const cave_sender = "IP:127.0.0.1"

获取回声洞图片

获取一个指定ID的回声洞图片,以PNG格式返回。

终结点 返回类型
/v1/getImage image/png

参数

参数 必填 说明
id 图片ID(回声洞内容中的 [[Img:<图片ID>]]

返回示例

请求:

1
https://api.cave.xdbot2.itcdt.top/v1/getImage?id=1679146457.165848

响应:

图片

获取 API 版本

获取当前API的版本号,以纯文本格式返回。

终结点 返回类型
/v1/version text/plain

参数

返回示例

请求:

1
https://api.cave.xdbot2.itcdt.top/v1/version

响应:

1
v1.0.0-beta

IT Craft QCli


属性
仓库名 This-is-XiaoDeng/qcli
简介 能运行在 Linux TTY 中的第三方 QQ
许可证 GPL-3.0 license

README.md

一款能正常运行在 Linux TTY 中的第三方 QQ

搭建步骤

  1. 克隆仓库
  2. 安装 Python3
  3. 安装依赖库
  4. 修改程序配置
  5. 启动程序

提示:如果您不是Linux x86_64系统,需要您自行前往go-cqhttp官网下载对应系统的go-cqhttp并放入go-cqhttp/中!

许可证

IT Craft QCLI
Copyright (C) 2022 This is XiaoDeng

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

View on GitHub

XDChat Release 1.2.0


属性
项目名 XDChat
版本 Release 1.2.0
仓库 GitHub

简介

一个简单的跨平台聊天软件

依赖

  1. Python3
  2. rich

运行

1
2
3
4
git clone https://github.com/This-is-XiaoDeng/XDChat.git
cd XDChat
python3 -m pip install rich
python3 ./main.py

免责声明

禁止将 XDChat 用于违法违规用途,否则本人不会承担因此产生的任何责任

This-is-XiaoDeng/XDChat

PyPiSearch


项目名PyPiSearch
版本v1.0
GitHubThis-is-XiaoDeng/PyPiSearch

简介

这是一个 PyPi 搜索程序,一定程度上解决了 pip 不支持搜包的问题

依赖

  1. Python3
  2. rich
  3. requests

使用方法

1
2
3
git clone https://github.com/This-is-XiaoDeng/PyPiSearch.git
pip install rich requests
python3 main.py

温馨提示

  1. 程序启动后根据提示输入关键词并回车即可搜索
  2. 搜索速度由包数量和网速决定
  3. GitHub 上还提供了 Linux x86_64 的二进制可执行程序

This-is-XiaoDeng/PyPiSearch

HTTP for TCP


信息

HTTP for TCP 不实名使用frp软件开网站!
源代码 GitHub
版本 v1.0
许可证 MIT

使用方法

客户端

  1. 克隆仓库
  2. 安装依赖(pip install -r requirememts.txt
  3. 设置 config.json
  4. 启动客户端
  5. 使用浏览器访问开启的服务器

服务端

  1. 克隆仓库
  2. 安装依赖(pip install -r requirememts.txt
  3. 设置 config.json
  4. 启动服务端

XChat Server V1.2-beta


This-is-XiaoDeng/XChat

简介

版本:V1.2-beta

XChat Server 是软件 XChat 的服务端,可以让您在1分钟内拥有一个自己的 XChat 服务器。

依赖

  1. Python3
  2. rich

使用教程

  1. 安装依赖,打开 XChat Server
  2. 输入端口
  3. 完成

源代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
from rich.console import Console
import socket
import json
import threading
import time

console = Console()
threads = {}
messages = [
{"from":"Server","msg":"Server Started","time":time.time()}
]
threadList = []
users = {}

def handle(sock, addr):
global console, messages, threads, threadList, users
msgid = 0
username = ""

while True:
resp_data = {
"code":200,
"msg":"OK",
"data":{}
}

recv_data = sock.recv(1024)
try:
recv_data = recv_data.decode("utf-8")
recv_data = json.loads(recv_data)

if username != "":
if recv_data["mode"] == "getMsg":
try:
resp_data["data"]["messages"] = messages[msgid:]
msgid = messages.__len__()
except:
resp_data["data"]["messages"] = []
elif recv_data["mode"] == "sendMsg":
messages += [
{
"from":username,
"msg":recv_data["data"]["msg"],
"time":time.time()
}
]
console.log(f"[CHAT] <{username}> {recv_data['data']['msg']}")

elif recv_data["mode"] == "exit":
sock.close()
return 0

elif recv_data["mode"] == "getList":
userList = []
for t in threadList:
if threads[t].is_alive():
userList += [users[t].getName()]
resp_data["data"]["list"] = userList


else:
resp_data["code"] = 404
resp_data["msg"] = "Unkown mode"

elif recv_data["mode"] == "login":
username = recv_data["data"]["username"]
# threads[addr[1]].setName(username)
users[addr[1]] = username

else:
resp_data["code"] = 403
resp_data["msg"] = "Please Login First"


except Exception as e:
console.print_exception(show_locals=True)
resp_data["code"] = 500
resp_data["msg"] = "Internal Server Error"
resp_data["data"]["exception"] = str(e)

# 回复
resp_data = json.dumps(resp_data)
sock.send(resp_data.encode("utf-8"))



if __name__ == "__main__":
port = int(console.input("[blue]Port: "))

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(
(
"",
port
)
)
sock.listen(128)

console.log(f"Server started on 0.0.0.0:{port}.")

while True:
s, addr = sock.accept()
console.log(f"{addr[1]} connected to this server.")
threadList += [addr[1]]
users[addr[1]] = ""

threads[addr[1]] = threading.Thread(None, lambda: handle(s, addr))
threads[addr[1]].setDaemon(True)
threads[addr[1]].start()

XChat-CLI pre-1


温馨提示:本文可能已经过时

XChat Client CLI

版本:pre-1

依赖

  1. Python3(Tested 3.10.6)
  2. rich

简介

XChat 是一个简单好用的聊天软件,它(指原版,给改了不关我事熬)不会收集任何除必须外的用户信息

测试服务器

  • IP:124.222.63.135
  • Port:19180

源代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import socket
from rich.console import Console
import threading
import json
import time

console = Console()
sock = None
sockThread = None

def send(data):
global sock
sock.send(
json.dumps(data).encode("utf-8")
)

return json.loads(
sock.recv(1024).decode("utf-8")
)

def getMsg():
global sock, console
while True:
msg = send(
{
"mode":"getMsg",
"data":{}
}
)
try:
for m in msg["data"]["messages"]:
t = time.strftime(
"%H:%M:%S",
time.localtime(m["time"])
)

console.print(
f'[{t}]<[yellow]{m["from"]}[/]> {m["msg"]}'
)
except:
pass

if __name__ == "__main__":
console.print("[green]XChat CLI V1")
sock = socket.socket(
socket.AF_INET,
socket.SOCK_STREAM
)

sock.connect(
(
console.input("[yellow]IP: "),
int(console.input("[yellow]Port: "))
)
)

loginRecv = send(
{
"mode":"login",
"data":{
"username":console.input(
"[yellow]User: "
)
}
}
)

if loginRecv["code"] == 200:
console.print(
"[green]Server connected!"
)

sockThread = threading.Thread(
None,
getMsg
)
sockThread.start()

while True:
sendMsg = console.input("")
send(
{
"mode":"sendMsg",
"data":{
"msg":sendMsg
}
}
)