Giter Site home page Giter Site logo

yatm's Introduction

Welcome to yatm 👋

Version License: MIT

yet another teachermate helper

Features

  • Multi-mode sign-in support: normal, GPS and QR code.
  • Sign in WITHOUT any assistance from your classmates
  • System-level notification support (test on windows 10 & macOS & gnome)
  • Active development
  • Docker support

Install

Simply download the latest release.

or you can build on your own.

yarn install
yarn build

Configuration

Edit your config.json first:

{
  "interval": 3000, // 签到检测轮询间隔,单位 ms
  "wait": 5000,     // 检测到签到后等待时长,单位 ms
  // 用于 GPS 签到(大概是 Google 坐标)
  "lat": 30.511227, // 纬度
  "lon": 114.41021, // 经度
  //剪贴板指令
  "clipboard": {
    "paste": "pbpaste",//paste不为空后openId将从剪贴板获得
    "copy": "echo {}|pbcopy"//仅在 copy 模式下启用,{} 将被替换为链接
  },
  "qr": { // 用于二维码签到
    "name": "张三", // 微助教用户名,判断签到是否成功
    // 模式
    //   terminal: 终端打印二维码,微信扫码
    //   plain: 终端打印签到URL,微信打开
    //   copy:同 plain,并复制到剪贴板
    "mode": "terminal",
  }
  "ua": "" // 建议使用自己的微信 UA
}

Usage

Get your openId

Get your openId from WeChat official account 微助教服务号. How?

Notice that openId will expire after thousands of requests or another entrace from WeChat.

Run the script

Run the script, then paste your openId into console:

yarn start

or with environments:

env OPEN_ID=${your openId} yarn start

For normal & GPS sign-in, the process is automatic. You don't need to care about anything.

If the openId is expired or invaild, you'll get a notification :)

For QR Code sign-in

Due to the limitation of WeChat API, things are quite different for QR code sign-in.

The script will subscribe the sign-in URL generated by teachermate's server, and print its corresponding QR code to the console when it updates.

You're expected to scan the QR code manually via WeChat from your console.

Attention that the script WILL EXIT INSTANTLY when success, because a QR scan via WeChat will causes the update of openId. You have to reacquire your new openId and run this script again!

Author

👤 maniacata

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

yatm's People

Contributors

maniaciachao avatar maxj2000 avatar

Stargazers

 avatar

Watchers

 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.