Giter Site home page Giter Site logo

wuhan-virus-bitbar-plugin's Introduction

武汉肺炎病患数据的 Bitbar 插件

长这样

前提

  • macOS
  • 安装了 Bitbar
  • 安装了 Python 3.x,并且 pip install requests

如何安装插件

  • 在电脑上打开 Bitbar,把本 repo 里的 wuhan.10s.py 放入 Bitbar 指定的插件文件夹中
  • 在状态栏中选中 Bitbar 的图标,点击刷新即可

一些客制化的小功能

刷新时间

  • 默认是 10 秒刷新一次。如果想修改成 1 小时刷新一次,把文件名中 wuhan.10s.py 改成 wuhan.1h.py 即可。

展示的省份

  • 默认展示确认患病人数最多的五个省份
  • 可以打开 wuhan.10s.py,在 targetProvinceName 中填入你想看的省份的名字
  • 除了默认展示的五个省份外,还可以在 additionProvinceName 中填入想额外关注的省份的名字

Q&A

数据源是哪里来的?

  • 来自丁香园的网页,插件每 10s 会刷新一次,去抓取丁香园网页的数据。丁香园的数据也会有一些延迟,但还是比较可靠的。

为什么我的电脑上看不到数据?

  • 需要确保自己电脑上是 Python 3.x
  • 把自己电脑上 Python 3.x 的路径替换掉 wuhan.10.py 开头的那一行 #!/usr/local/bin/python3
  • 脚本依赖 requests 模块,需要在终端中 pip install requests。如果是 macOS 预装的 Python 2.7,可能 pip 也不是和 Python 3.x 对应的 pip,需要确认好

wuhan-virus-bitbar-plugin's People

Contributors

anthonyeef 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.