GithubHelp home page GithubHelp logo

github_check_push's Introduction

github_check_push

这是我用py写的在mac os系统下检查今日是否在github上提交过代码的脚本

想法来源

其实是每天都有在写代码的,只是经常性的就忘记来github上提交记录一下,久而久之,首页上的记录一片惨灰。 我可不想这样!我是很勤奋的程序员! 于是就有了这个,可以提示我今天是否提交过代码,可以提醒我去提交,如果已经提交过,还可以自己给自己一个萌萌哒的鼓励!。

实现

其实内部实现是比较粗糙的,就比如说timeout的情况也没能好好处理。 这个是主要用在mac os系统下的,每天的定时是使用了launchctl实现,而弹窗提醒是直接调用了apple script。 说白了其实就是:

  1. 使用requests给我的个人首页发请求,得到http返回的body之后,解析一下当日的rectdata-count是否为0
  2. 使用launchctl定时在每天的20:0022:30自动运行代码。

如果你也想有一个自己的提醒工具

  1. 你可以参照我的思路制作更加精致的py脚本
  2. 使用mac os的小伙伴记得使用launchctl而不是cron哦~,使用windows的小伙伴肯定有其他很多的办法的吧!
  3. 还可以为自己的弹框提示加声音!

Over

感谢。

github_check_push's People

Contributors

zjhch123 avatar

Watchers

James Cloos avatar  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.