Coder Social home page Coder Social logo

ericzhang-debug / ecust-electricity-statistics Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lxl66566/ecust-electricity-statistics

0.0 0.0 1.0 207 KB

华东理工大学(华理)电费统计

License: MIT License

JavaScript 80.80% Python 16.59% HTML 2.61%

ecust-electricity-statistics's Introduction

ecust-electricity-statistics

华东理工大学电费统计:拒绝一切不透明操作。通过 Github Actions 自动获取并记录每天的宿舍电量剩余,并通过PushPlus自动推送到微信端。

开始记录

  1. 华理信息办 - 微门户 - 电费充值 - 查询您的宿舍电量 - 复制链接。(本例中宿舍为随机选出)

复制链接

  1. 右上角 fork 仓库

fork

  1. 在 Code 界面下,点击 data.js ,将其删除。

删除 AbsoluteX 的数据

  1. Settings - Secrets and variables - Actions - New repository secret
  • Name 填写 URL,Secret 填写 第一步复制的链接

找到 Secrets 填写

  1. Settings - Actions - General 界面,拉到最下,选择 Workflow permissions 为 Read and write permissions

界面

选择权限

  1. Actions - enable them,然后在 AutoRecord 下点击 Enable workflow

image image

查看数据

Github Pages(推荐)

使用 Github Pages 构建。请确保您已获取到电量数据。

Settings - Pages - Deploy from a branch - 选中 main - Save

等待网站构建完毕后(约 1 min),刷新页面,点击 Visit site 即可查看数据。

image

图表

  1. 使用 git clone 或下载 zip
  2. 解压,双击打开 index.html 文件

生数据

直接点击 data.js 查看

PushPlus推送

启用推送

Settings - Secrets and variables - Actions - New repository secret

  • Name 填写 PUSH_PLUS_TOKEN,Secret 填写 你的PushPlus的TOKEN信息

若不启用该功能则无需填写

编辑“图表显示更多数据”

反注释main.py76行-77行,把你的链接替换此。

注意事项

fork 此仓库后请不要再次 sync fork,否则可能会造成数据丢失。若确实需要更新到最新版本,请自行备份data.js并使用 git 恢复数据。

ecust-electricity-statistics's People

Contributors

lxl66566 avatar ericzhang-debug avatar

Forkers

kevinsteward

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.