要想实现此仓库功能需要修改少量代码,若未曾了解过Python请不要复刻仓库
2023.10.9 The operation of new rules causes some functions to fail.
2023.4.27 Update free weather API expires and replaces Xinzhi Weather API. For details, please see the update log↓↓↓
This project has passed the Murphy safety inspection
General Public License v3.0 allows personal use, commercial use, patent authorization, copying, distribution, and modification, and the author does not bear any consequences of user use. But it has many limitations:
This project enables a single public account to send template information to multiple users
Fill in APP_ID
, APP_SECRET
, Template_ID
and WEATHER_API_KEY
of the official account into the Key table
User information files are stored in json files to achieve differentiated storage of user information and facilitate differentiated distribution.
开源平台也要保护好自己的名字资料
{
"data" : [
{
"user_name" : "用户1的名字" ,
"user_id" : "用户1的ID " ,
"born_date" : "用户1的出生日期(注意格式) " ,
"city" : "用户1城市"
},
{
"user_name" : "用户2的名字" ,
"user_id" : "用户2的ID " ,
"born_date" : "用户2的出生日期(注意格式) " ,
"city" : "用户2的城市"
}
]
}
The above is the basic structure. If you want to add a new user, you can add it between curly brackets ( {}
) in the following format ,
separated by
{
"user_name" : "用户2的名字" ,
"user_id" : "用户2的ID " ,
"born_date" : "用户2的出生日期(注意格式) " ,
"city" : "用户2的城市"
}
{{time.DATA}}
φ(゜▽゜* )♪{{name.DATA}}小盆友
坐标城市:{{city.DATA}}o(〃'▽'〃)o
当前天气:{{weather.DATA}} ヾ(≧▽≦ * )o
当前风向:{{wind.DATA}}( •̀ ω •́ )✧
今日温度:{{tem_low.DATA}}℃~{{tem_high.DATA}}℃ ( •̀ ω •́ )
庆祝自己在世界上第{{born_days.DATA}}天(❁´◡`❁)
距离下次生日还有{{birthday_left.DATA}}天╰( * °▽° * )╯
{{words.DATA}}
05-20
,2022-08-09
beijing
, tianjin
, jinan
Reference announcement: Another announcement on standardizing official account template messages - WeChat Open Community https://developers.weixin.qq.com/community/develop/doc/000a2ae286cdc0f41a8face4c51801
Due to the failure of the weather interface, replace the weather data API interface (seniverse.com)
Add APIKey to WEATHER_API_KEY
and fill in the Key table
Note that this update also needs to update the json file. Cities can only support prefecture-level cities and are fully spelled out.
{
"user_name" : "用户2的名字" ,
"user_id" : "用户2的ID " ,
"born_date" : "用户2的出生日期(注意格式) " ,
"city" : "用户2的城市" //只能支持地级市
}
This update will also update the WeChat template
{{head.DATA}}
{{time.DATA}}
φ(゜▽゜* )♪{{name.DATA}}小盆友
坐标城市:{{city.DATA}}o(〃'▽'〃)o
当前天气:{{weather.DATA}} ヾ(≧▽≦ * )o
当前风向:{{wind.DATA}}( •̀ ω •́ )✧
今日温度:{{tem_low.DATA}}℃~{{tem_high.DATA}}℃ ( •̀ ω •́ )
庆祝自己在世界上第{{born_days.DATA}}天(❁´◡`❁)
距离下次生日还有{{birthday_left.DATA}}天╰( * °▽° * )╯
{{words.DATA}}
{{end.DATA}}