-
Notifications
You must be signed in to change notification settings - Fork 91
配置文件详细介绍
Rockytkg edited this page Nov 24, 2024
·
2 revisions
欢迎来到 AutoMoGuDingCheckIn 项目的配置文件介绍页面。本页面将详细说明如何配置项目的 JSON 文件,以便顺利运行自动打卡功能。
AutoMoGuDingCheckIn 是一个为工学云用户提供自动打卡解决方案的工具,支持多用户、自定义位置、消息推送等功能。通过合理配置,用户可以实现自动签到、报告提交及消息通知等功能。
配置文件为 JSON 格式,包含多个设置项,主要分为以下几个部分:
- 用户信息
- 打卡设置
- 报告设置
- AI 设置
- 推送通知设置
- 设备信息
"user": {
"phone": "工学云手机号",
"password": "工学云密码"
}
- phone: 工学云手机号,确保号码正确无误。
- password: 工学云密码,注意区分大小写。
"clockIn": {
"location": {
"address": "打卡地点的详细地址",
"latitude": "打卡地点的纬度",
"longitude": "打卡地点的经度",
"province": "所在省份",
"city": "所在城市",
"area": "所在区域"
},
"imageCount": 0,
"description": ["打卡备注"]
}
- address: 打卡地点的详细地址,确保信息准确。
- latitude: 打卡地点的纬度。
- longitude: 打卡地点的经度。
- province: 所在省份。
- city: 所在城市。
- area: 所在区域。
- imageCount: 打卡时需要上传的图片数量,默认为0。
- description: 打卡备注列表,随机抽取一条作为备注。
"reportSettings": {
"daily": {
"enabled": false,
"imageCount": 0
},
"weekly": {
"enabled": true,
"imageCount": 0,
"submitTime": 4
},
"monthly": {
"enabled": false,
"imageCount": 0,
"submitTime": 29
}
}
- daily.enabled: 是否启用每日报告(true 或 false)。
- daily.imageCount: 每日报告中需要上传的图片数量。
- weekly.enabled: 是否启用每周报告(true 或 false)。
- weekly.imageCount: 每周报告中需要上传的图片数量。
- weekly.submitTime: 提交时间(以小时为单位,范围为0-23)。
- monthly.enabled: 是否启用每月报告(true 或 false)。
- monthly.imageCount: 每月报告中需要上传的图片数量。
- monthly.submitTime: 提交时间(默认为29号)。
"ai": {
"model": "gpt-4o-mini",
"apikey": "API密钥",
"apiUrl": "https://api.openai.com/"
}
- model: AI 模型名称(可根据需求修改)。
- apikey: API 密钥,确保无误。
-
apiUrl: API 地址,通常为
https://api.openai.com/
。
"pushNotifications": [
{
"type": "Server",
"enabled": true,
"sendKey": "your_key"
},
{
"type": "SMTP",
"enabled": true,
"host": "smtp服务地址",
"port": 465,
"username": "发件人邮箱",
"password": "smtp密码",
"from": "发件人名称",
"to": "收件人邮箱"
}
]
- type: 推送通知的类型(如 Server、PushPlus 等)。
- enabled: 是否启用该推送通知(true 或 false)。
- sendKey/token: 相应的密钥或令牌。
- channel: 对于 AnPush,填写通道 ID,多个用英文逗号隔开。
- to: 根据官方文档获取的接收者信息。
- host: SMTP 服务地址。
- port: SMTP 服务端口,通常为 465。
- username: 发件人邮箱地址。
- password: SMTP 密码。
- from: 发件人名称。
"device": "{brand: TA J20, systemVersion: 17, Platform: Android, isPhysicalDevice: true, incremental: K23V10A}"
- device: 设备信息,使用工具获取。
以下是一个完整的示例配置文件:
{
"config": {
"user": {
"phone": "13800138000",
"password": "your_password"
},
"clockIn": {
"location": {
"address": "四川省 · 成都市 · 高新区 · 在科创十一街附近",
"latitude": "34.059922",
"longitude": "118.277435",
"province": "四川省",
"city": "成都市",
"area": "高新区"
},
"imageCount": 0,
"description": [
"今天天气不错",
"今天天气很好",
"今天天气不太好"
]
},
"reportSettings": {
"daily": {
"enabled": false,
"imageCount": 0
},
"weekly": {
"enabled": true,
"imageCount": 0,
"submitTime": 4
},
"monthly": {
"enabled": false,
"imageCount": 0,
"submitTime": 29
}
},
"ai": {
"model": "gpt-4o-mini",
"apikey": "sk-osdhgosdipghpsdgjiosfvinoips",
"apiUrl": "https://api.openai.com/"
},
"pushNotifications": [
{
"type": "Server",
"enabled": true,
"sendKey": "your_key"
},
{
"type": "SMTP",
"enabled": true,
"host": "smtp服务地址",
"port": 465,
"username": "发件人邮箱",
"password": "smtp密码",
"from": "发件人名称",
"to": "收件人邮箱"
}
],
"device": "{brand: TA J20, systemVersion: 17, Platform: Android, isPhysicalDevice: true, incremental: K23V10A}"
}
}
将图片放置在 images
目录,运行时会自动随机抽取指定数量的图片进行提交。
支持的推送方式包括:
配置完成后,您可以通过以下命令运行项目:
python main.py
本项目采用 Apache 2.0 许可。详细信息请参阅 LICENSE 文件。
如有任何疑问或需要支持,请通过提交 issue 与我们联系。
感谢您使用 AutoMoGuDingCheckIn!希望这份配置文件介绍对您有所帮助。