Giter Club home page Giter Club logo

geekbot's Introduction

GeekBot

企业微信机器人每日定时推送信息脚本。
也许是最有上班感觉的摸鱼神器!

目前支持如下插件:

  • 毒鸡汤文本(dujitang,每1小时推送)
  • v2ex 每日最新帖子(v2ex_latest,每天08:00推送)
  • v2ex 每日最热帖子(v2ex_hot, 每天18:00推送)
  • 彩云天气预报(caiyun_weather,每小时整推送)
  • ONE一个图文(one,每天08:20推送)
  • 早安心语(good_morning,每天 08:05)

配置

在项目的 settings -> Secrets 中添加 bot_api 字段,内容为企业群机器人webhook接口地址 可自行更改.github/workflows/*.yml配置文件,比如修改任务的执行时间

彩云天气配置

在项目settings->Secrets 中,添加:

  1. caiyun_key,为彩云API的开发者令牌(前往彩云天气开发者中心申请),或使用官方测试KEY(仅供测试):TAkhjf8d1nlSlspN
  2. caiyun_gps,为要获取的天气的GPS坐标,可在百度地图GPS获取页面获取后复制,多个GPS坐标请用|符号分割,地名在坐标后用@符号链接

caiyun_gps 格式如下:

111.22,333.44@地址1|444.55,555.66@地址2

早安心语配置

需要用到天行数据 接口,你需要自行前往注册登录,申请api后,得到一个key,设置到仓库的secrets中,名称为:good_morning_key

禁用插件

比如禁用毒鸡汤,则添加secrets->plug_dujitang_disabled=true

注意

cron 时间为美国时间,需要北京时间减去8小时设置。 比如你想在北京时间08:00运行,则需要设置(8-8=0)成:0 0 * * *

由于GitHub Actions容器启动耗时等限制,定时任务不一定能准时执行

开发文档

整理中..

  1. plugins 目录添加一个module_name.js插件,代码采用node.js编写,示例可以看看plugins/dujitang.js插件代码。
  2. 可以在本地测试代码(先设置一个bot_api环境变量,然后直接node plugins/module_name.js
  3. 测试没问题后,在.github/workflows/中添加plug_模块名.yml配置文件,代码参考plug_caiyun_weather.yml

如何使用

  1. fork 本项目到你的仓库
  2. 在仓库settings中添加secrets配置,比如bot_api为你的企业微信机器人webhook
  3. 点击你的项目的star按钮,会自动启动。

更多人性化的启动方法正在研究中。。。

geekbot's People

Contributors

im3x-dev 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.