Code Monkey home page Code Monkey logo

dailymorning_star's Introduction

DailyMorning

给庆宝的每日早安

2024.02.04: 简化了说明文档,增加了农历书写规范
2023.11.15:添加了**的时区,解决了时区导致的天数不对的问题
2023.11.13:修复了每日金句中文&英文显示不全,但是需要更新推送模板(或许有更优雅的解决方式)
2023.08.14:修复了因为header的问题导致词霸请求无响应
2023.05.07:可以使用的新模板
2023.05.06:目前有个折中方案,大家可以自行参考,欢迎改进完成的友友提出Pull request。{{xxxx.Data}} 前必须加可读文字。如:1. {{xxxx.Data}}
2023.05.04:非常抱歉的通知大家,因为微信改版原因,暂时无法发送自定义颜色的文字了
2023.02.15:迄今运行稳定,若配置过公众号模板的配置后直接运行。后续会持续维护
2023.02.11:因为是Github的服务器,所以不准时是很正常的。建议时间提前以及避开拥挤时间段(整点/半点)
2022.12.09:修复了因为Python版本导致的运行失败,小伙伴们可以重新Fork一下,记着给Star

请复制以下模板:

今日:{{date.DATA}}
城市:{{city.DATA}}
天气:{{weather.DATA}}
最低气温: {{min_temperature.DATA}}
最高气温: {{max_temperature.DATA}}

我们已经贴贴了{{love_day.DATA}}天💝
💌{{birthday1.DATA}}
💌{{birthday2.DATA}}

今天也要乖乖的多喝水哦(^▽^)

👋每日金句
☀{{note_en.DATA}}{{note_en2.DATA}}
☀{{note_ch.DATA}}{{note_ch2.DATA}}

################### 为了怕小伙伴们直接运行,我做了脱敏处理###################

需要修改的,直接Fork到自己的仓库,修改config的里面的参数就行。
APP_ID: 公众平台 appID
APP_SECRET: 公众平台 appSecret
TEMPLATE_ID: 模板 ID
USER_ID: 接收人的 OpenID 多个用换行分隔
BIRTHDAY: 倒数日(原生日),换行分隔,见更新说明。格式如 05-20,1999-11-04;如果是农历生日,r-月份-日期 (2000-11-22)
START_DATE: 正数日期,格式:2008-08-08
CITY: 城市,不要加市,准确到地级市。比如:北京、天津、广州、承德


具体可以移步 https://github.com/rxrw/daily_morning 寻找几个关键参数

VX模板如下
{{date.DATA}}
城市:{{city.DATA}}
天气:{{weather.DATA}}
最低气温: {{min_temperature.DATA}}
最高气温: {{max_temperature.DATA}}
今天是我们恋爱的第{{love_day.DATA}}天❤❤❤
{{birthday1.DATA}}
{{birthday2.DATA}}
今天也要乖乖的多喝水~(^▽^)
{{note_en.DATA}}
{{note_ch.DATA}}

效果如图 7DD39B07860A54664A542CE7202B8E9D

按下图,创建模板,设置变量,把微信公众平台上的各种字符串按说明创建到 GitHub -> Settings -> Secrets -> Actions 中。 71bf9d11a876d23ef0f0728645a8ba0 381e8ee4a7c5ec6b8c09719f2c7e486 1

启用自己项目下的 Action! 30a5b1b2b06ba4a40a3d8ef01652409

dailymorning_star's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dailymorning_star's Issues

请大佬看看这是怎么回事呜呜

Run python3 main.py
python3 main.py
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.11.3/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.3/x64/lib
sh: 1: pause: not found
获取access_token失败,请检查app_id和app_secret是否正确
Error: Process completed with exit code 1.

linux 目录执行命令错误

  1. 定时任务
    python3 /root/DailyMorning_Star-main/main.py
    推送消息失败,请检查config.txt文件是否与程序位于同一路径

修复如下:
import os
os.chdir(os.path.dirname(os.path.abspath(file)))

这个如何设置农历呀老哥

生日1,修改名字为对应需要显示的名字,如果生日为农历,在最前面加上r即可

"birthday1": {"name": "dd", r"birthday": "1999-08-20"},

出现了错误

1683271027249

今天的运行状况变成了这样。。 测试发现只要在模板的参数前加上中文就可以正常显示,但是文字的颜色一直是失效的 这是git的问题还是微信那边出问题了?

已解决 -- 北京时间8点前运行,日期不准

没错,又是我,打扰了,如何解决8点前运行得到的时间和星期不准的问题,由于在8点前运行获取到的是国际时间,还在前一天,就导致了不准,有没有好的方法?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.