Giter Club home page Giter Club logo

hit-daily-report's Introduction

HIT-daily-report

基于Github Action的定时HIT疫情上报脚本,开箱即用。并提供邮件/微信提醒功能

感谢 @JalinWang 提供原始版本(用于深圳校区)

感谢 @billchenchina 提供的统一身份认证插件hitutil原始版本(本部)

手动疫情上报系统入口

使用方法

  • Fork仓库
  • 根据自身情况,修改上报数据包post_data.jsonc,默认为健康、位于非疫区、接种完所有疫苗的情况
  • 设置仓库的action secret,添加用户名HIT_USERNAME、密码HIT_PASSWORD、上报位置LOCATION和可选的通知用Secrets
  • 开启Action(详细步骤见后文)
  • 每天早上8:00(UTC 00:00)可自动定时运行。你可以根据后文内容,设置邮件或微信提醒

设置仓库的Secrets:

Name Value
HIT_USERNAME 统一身份认证账号 (学号)
HIT_PASSWORD 统一身份认证密码
LOCATION 上报地址。格式:(X国)XX省XX市XX区XXXX,如黑龙江省哈尔滨市南岗区哈尔滨工业大学。
API_KEY 可选。server酱推送的sckey, 或发送电子邮件的密码/Key
MAIL_TO 可选。电子邮件信息,格式"服务器[:端口[U]]:用户名(邮箱)"

添加Action Secret的步骤

Fork的仓库会默认关闭action的执行,需要在仓库设置里打开:

启用Action的步骤1 启用Action的步骤2

以上步骤都完工后可以手动运行一次工作流,验证是否可以正常工作

手动运行

上报情况提醒

为了防止脚本突然挂了等情况发生,可设置电子邮件或微信提醒。

电子邮件提醒

  1. 设定Secrets的MAIL_TO字段,格式服务器[:端口[U]]:用户名(邮箱),服务器域名和地址可参考这篇博客。如果不设置端口,则尝试使用默认。如果加'U'则不使用TLS。
  2. 设定Secrets的API_KEY为你的邮箱账户密码,或是SMTP对应的API_KEY。

微信提醒

微信提醒基于Server酱,但是貌似这个服务对免费用户有限额,所以为什么不用电邮提醒呢?

在Server酱中弄到API_KEY后填写到Secrets的API_KEY即可。

如果脚本挂了,或者你想修改一下上报地点什么的

post_data.jsonc里边是上报数据包的原始数据,修改之即可。

hit-daily-report's People

Contributors

ferdinandsu avatar demerzelsun12 avatar jalinwang avatar

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.