/code-anti-addiction

编程防沉迷 pre-commit 插件

Primary LanguageShellMIT LicenseMIT

Code Anti-addiction

编程防沉迷 pre-commit 插件,每天只允许编码 8 小时。

使用方式

安装 pre-commit

pre-commit innstallation

pip install pre-commit

添加插件

repos:
- repo: git://github.com/x1ah/code-anti-addiction
  rev: v1.0.0
  hooks:
      - id: anti-addiction
        args:
            # 早上 10 点开始编码,晚上 19 点结束编码
            [-b 10, -e 19]

提交代码时检查

image image