Skip to content

hdsong2/xihe-scripts

Repository files navigation

Xihe-scripts

本仓库提供了一组用于操作xihe数据的脚本,包括以下内容:

脚本 描述
whitelist.py 添加白名单
promotion_generator.py 添加活动信息

依赖

  • python 3.12.3+
  • openpyxl 3.1.5
  • pymongo 4.8.0

安装

pip install -r requirements.txt

配置

配置mongo连接信息

config.ini

[test.mongo]
# 用户名
rwuser =
# 密码
password =
ip =
port =
#
database =
# ca文件,未使用值为空
cafile = 

[prod.mongo]
# ...

使用方法

添加白名单

单条添加

usage: whitelist.py manual [-h] -u USERNAME [-t TYPE] --start_time START_TIME --end_time END_TIME [--enabled ENABLED]

insert account manually

options:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        xihe account
  -t TYPE, --type TYPE  allowed module
  --start_time START_TIME
                        timestamp like "2024-06-12 09:27:00"
  --end_time END_TIME   timestamp like "2024-06-12 09:27:00"
  --enabled ENABLED     open or block permission [true/false]

批量添加

usage: whitelist.py batch [-h] -f FILENAME

insert accounts in batch

options:
  -h, --help            show this help message and exit
  -f FILENAME, --filename FILENAME
                        the excel of whitelist

批量添加文件模板请使用这里

添加活动信息

usage: promotion_generator.py [-h] -f FILENAME

options:
  -h, --help            show this help message and exit
  -f FILENAME, --filename FILENAME
                        the excel of promotions

批量添加文件模板请使用这里

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages