Skip to content

Commit d748bf2

Browse files
authored
Merge pull request #21 from GOOD-AN/dev
合并 Dev
2 parents bae2baf + f91a9e0 commit d748bf2

29 files changed

+2540
-1446
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
__pycache__
2+
venv
3+
config.*
4+
log
5+
user_info
6+
exchange_list.json

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
<p align="center"><img alt="项目图标" src="./images/logo.png"></p>
1+
<p align="center"><img alt="项目图标" src="data/images/logo.png"></p>
22
<div align="center">
33
<a href="https://github.com/GOOD-AN/Mys-Exchange-Goods/releases/latest" target="_blank">
44
<img alt="最新发行版" src="https://img.shields.io/github/v/release/GOOD-AN/Mys-Exchange-Goods?logo=python&style=for-the-badge">
55
</a>
6-
<img alt="Python 版本要求" src="https://img.shields.io/badge/Python-3.6+-green.svg?longCache=true&style=for-the-badge">
6+
<img alt="Python 版本要求" src="https://img.shields.io/badge/Python-3.7+-green.svg?longCache=true&style=for-the-badge">
77
<img alt="GitHub CodeQL 代码检查" src="https://img.shields.io/github/actions/workflow/status/GOOD-AN/Mys-Exchange-Goods/codeql.yml?logo=github&style=for-the-badge">
88
<img alt="开源协议" src="https://img.shields.io/badge/License-mit-blue.svg?longCache=true&style=for-the-badge">
99
</div>
1010

1111
## 🖨️ 相关文档
1212
在使用前请务必阅读文档,若有疑问,请先查阅文档或者Issues里是否有相同的问题
1313

14-
* [使用说明](https://github.com/GOOD-AN/Mys-Exchange-Goods/wiki/运行方法)
15-
* [配置说明](https://github.com/GOOD-AN/Mys-Exchange-Goods/wiki/配置文件说明)
16-
* [更新日志](./docs/CHANGELOG.md)
17-
* [常见问题](https://github.com/GOOD-AN/Mys-Exchange-Goods/wiki/FAQ)
18-
* [关于项目](./docs/ABOUT.md)
14+
* 使用说明 [DOCS](./docs/运行方法.md)[WIKI](https://github.com/GOOD-AN/Mys-Exchange-Goods/wiki/运行方法)
15+
* 配置说明 [DOCS](./docs/配置文件说明.md)[WIKI](https://github.com/GOOD-AN/Mys-Exchange-Goods/wiki/配置文件说明)
16+
* 更新日志 [DOCS](./docs/CHANGELOG.md)
17+
* 常见问题 [DOCS](./docs/FAQ.md)[WIKI](https://github.com/GOOD-AN/Mys-Exchange-Goods/wiki/FAQ)
18+
* 关于项目 [DOCS](./docs/ABOUT.md)
1919

2020
## 💬 交流反馈
2121
请于[此页](https://blog.goodant.top/about/)下方的联系方式中交流 | **请优先使用QQ群**

config/default_config.ini

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,18 @@
22
name = Mys_Exch_Goods
33
env = local
44
branch = main
5-
version = 2.0.4
5+
version = 3.0.0
66

7-
[user_info]
8-
cookie =
9-
uid =
10-
address_id =
11-
game_uid =
7+
[update_setting]
8+
check_enable = true
9+
update_enable = true
10+
check_account_enable = true
11+
update_account_enable = true
1212

13-
[exchange_info]
14-
good_id =
15-
time = 0000-00-00 00:00:00
13+
[exchange_setting]
1614
thread = 3
1715
retry = 5
1816

19-
[check_network]
20-
enable = true
21-
interval_time = 15
22-
stop_time = 30
23-
2417
[notify]
2518
enable = false
2619

config/logging_config.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
日志配置
33
"""
44
log_config = {
5-
"version": 1.0,
5+
"version": 1,
66
"formatters": {
7-
"standard_out": {
7+
"simplify_output": {
88
"format": "%(message)s"
99
},
10-
"standard_file": {
10+
"full_output": {
1111
"format": "[%(asctime)s] MEG.%(levelname)s: (%(module)s) >>> %(message)s",
1212
"datefmt": "%Y-%m-%d %H:%M:%S %z"
1313
}
@@ -17,27 +17,42 @@
1717
"standard_console": {
1818
"class": "logging.StreamHandler",
1919
"level": "DEBUG",
20-
"formatter": "standard_out"
20+
"formatter": "simplify_output"
2121
},
2222
"standard_file": {
2323
"class": "logging.handlers.TimedRotatingFileHandler",
24-
"level": "INFO",
25-
"formatter": "standard_file",
24+
"level": "DEBUG",
25+
"formatter": "full_output",
2626
"filename": "log/default_log.log",
2727
"when": 'D',
2828
"interval": 1,
2929
"backupCount": 5,
3030
"encoding": "utf-8"
31+
},
32+
"debug_console": {
33+
"class": "logging.StreamHandler",
34+
"level": "DEBUG",
35+
"formatter": "full_output"
3136
}
3237
},
3338
"loggers": {
34-
"standard_logger": {
39+
"info_file_logger": {
3540
"handlers": ["standard_console", "standard_file"],
3641
"level": "INFO",
3742
"propagate": False
3843
},
39-
"debug_logger": {
44+
"debug_file_logger": {
45+
"handlers": ["standard_console", "standard_file"],
46+
"level": "DEBUG",
47+
"propagate": False
48+
},
49+
"info_console_logger": {
4050
"handlers": ["standard_console"],
51+
"level": "INFO",
52+
"propagate": False
53+
},
54+
"debug_console_logger": {
55+
"handlers": ["debug_console"],
4156
"level": "DEBUG",
4257
"propagate": False
4358
}
File renamed without changes.

docs/CHANGELOG.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# 更新日志
22

3+
## [3.0.0.230420 Alpha] - 2023-0420
4+
5+
### Added
6+
- 添加了对多账号多商品的支持
7+
- 添加了设置兑换商品直接添加兑换任务的功能
8+
9+
### Changed
10+
- 重构项目结构
11+
- 将定时任务修改为异步
12+
13+
### Removed
14+
- 移除了对网络延迟的检查
15+
16+
# 历史版本
17+
18+
<details>
19+
<summary>展开查看</summary>
20+
21+
## [2.0.5.230313 Alpha] - 2023-0313
22+
23+
### Changed
24+
- 将请求库由requests改为HTTPX
25+
- 兑换商品修改为异步
26+
27+
### Fixed
28+
- 修复创建目录报错
29+
330
## [2.0.4.221117 Alpha] - 2022-11-17
431

532
### Fixed
@@ -34,11 +61,6 @@
3461
- 项目目录重构
3562
- 优化部分功能逻辑
3663

37-
# 历史版本
38-
39-
<details>
40-
<summary>展开查看</summary>
41-
4264
## [1.1.2.221101 Alpha] - 2022-11-01
4365

4466
### Changed

docs/FAQ.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Q: 打开程序闪退
2+
**A:** 请在命令行内打开程序,并将报错或者发生的现象提交issue。
3+
4+
### Q: No such file or directory: ''
5+
**A:** 检查是否存在单引号内的文件,若存在,请将报错完整的提交issue。
6+
7+
### Q: cookie、address_id、good_id不知道怎么办
8+
**A:** 请仔细查看配置文件说明,可以通过程序获取并自动填写。
9+
10+
### Q: 有部分配置不知道怎么填写怎么办
11+
**A:** 请仔细查看配置文件说明,酌情修改。

docs/运行方法.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
### 直接运行
2+
按需求下载已打包压缩好的压缩文件(即将支持多系统),运行根目录的程序即可。[下载地址](https://github.com/GOOD-AN/Mys-Exchange-Goods/releases/latest)
3+
4+
### 源码运行
5+
**首先需在你的计算机上准备python程序,版本请大于3.6,若使用其余版本而无法运行,本项目不做任何解答**
6+
7+
#### 第一步、下载此项目
8+
`git clone git@github.com:GOOD-AN/Mys-Exchange-Goods.git`
9+
10+
#### 第二步、安装所需运行库
11+
`pip install -r requirements.txt`
12+
13+
#### (可选,因可通过程序配置)第三步、配置`config`文件夹内的配置文件
14+
[此说明](./配置文件说明.md)配置
15+
16+
#### 第四步、运行`main.py`
17+
`python main.py`

0 commit comments

Comments
 (0)