Coder Social home page Coder Social logo

zheckin's Introduction

zheckin

Build Status

ZheckIn 是 Zhihu 和 Check-In 的合并词,一个用于托管「知乎圈子」自动签到的程序。

介绍

本项目使用原生语言 Crystal 和嵌入式数据库 Sqlite3 开发,占用极低,部署方便。推荐直接使用官方服务(由作者提供),也可按照以下教程自行部署。

部署

  1. 创建 .env 文件,写入必要变量:

    ZHECKIN_ZHIHU_API_TOKEN="<Your_Zhihu_API_Token>"
    ZHECKIN_BASE_SECRET_KEY="<Secret_Key>"
    ZHECKIN_SCHEDULE_HOUR=0
    ZHECKIN_SCHEDULE_MINUTE=15

    变量说明:

    • ZHECKIN_ZHIHU_API_TOKEN: 知乎 Cookie 中的 "z_c0" 的值,用于认证身份(以下称“认证令牌”)。更多说明和提取方法请看登入页面
    • ZHECKIN_BASE_SECRET_KEY: 密钥,用于签名登录信息,它和 ZheckIn 内部帐号认证有关,和知乎的登录认证无关。通常使用较长的随机 Hash 字符串。
    • ZHECKIN_SCHEDULE_HOUR: 定时签到的时间(小时),24 小时制。
    • ZHECKIN_SCHEDULE_MINUTE: 定时签到的时间(分钟)。上面的模板内容指的是 00:15 定时签到。

    ZHECKIN_ZHIHU_API_TOKEN 变量中储存的认证令牌并不参与签到,它主要有两个目的:

    • 管理员身份凭证
    • 额外的 API 调用需要
  2. 创建 docker-compose.yml 文件:

    version: "3"
    
    services:
      server:
        image: bluerain/zheckin
        stdin_open: true
        ports:
          - 8080:8080
        environment:
          TZ: Asia/Shanghai
          ZHECKIN_ZHIHU_API_TOKEN: "${ZHECKIN_ZHIHU_API_TOKEN}"
          ZHECKIN_BASE_SECRET_KEY: "${ZHECKIN_BASE_SECRET_KEY}"
          ZHECKIN_SCHEDULE_HOUR: "${ZHECKIN_SCHEDULE_HOUR}"
          ZHECKIN_SCHEDULE_MINUTE: "${ZHECKIN_SCHEDULE_MINUTE}"
        restart: always

    注意,您不需要自行构建镜像,bluerain/zheckin 是已存在于 DockerHub 的官方镜像。TZ 变量表示时区,一般不需要修改。

  3. 启动服务:

    docker-compose up -d
  4. 使用 Nginx 或其它工具反代 8080 端口,亦或直接访问即可使用。

zheckin's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

linyuanlu

zheckin's Issues

改进前端体验

  • API 错误
    • 登入错误提示
    • 控制台内容加载错误提示
    • 设置页面 Properties 错误消息显示
  • 动画
    • 登入按钮动画
    • 控制台数据载入动画

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.