GithubHelp home page GithubHelp logo

chatrebot's Introduction

使用

  1. 安装环境
    yum install redis
    yum install xdg-utils
    pip install -r requirements.txt
  1. 配置

    修改订阅任务 conf/task.py

    定义数组PROD_TASKS元素

    参数:
        time: 执行时间, 元组类型, 示例:
            每天执行一次(9点): (9, 0, 0)
            每小时执行一次(9:10, 10:10, 11:10, ...): ("*", 10, 0)

        name: 任务名称, 不能重复
        to: 接受用户和群组列表
        type: 任务类型, 可选值: text, joke, article
        kwargs: 任务参数

    文本任务kwargs:
        msg: 发送消息
        tpl: 模板, 默认: "[{time}]: {msg}", 字符串占位符只能包含time和msg

    文章任务kwargs:
        "subjects" : 订阅号文章
        "interval" : 最新发布的文章(interval秒)
        "topn": 发送文章最多数量
        "time_format": "%Y-%m-%d %H:%M:%S"
  1. 登陆
    a. python rebot.py
    b. 手机扫描二维码登录
    c. 按ctrl+c退出
  1. 启动
    nohup python rebot.py >/dev/null 2>&1 &
  1. 查看日志 logs/rebot.log

chatrebot's People

Contributors

imsilence avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar

Forkers

ilovecode2018

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.