All Projects → Anthonyeef → covid-19-bitbar-plugin

Anthonyeef / covid-19-bitbar-plugin

Licence: other
Bitbar plugin for covid-19 data.

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to covid-19-bitbar-plugin

Mr.Holmes
🔍 A Complete Osint Tool
Stars: ✭ 307 (+213.27%)
Mutual labels:  python-script
check nextcloud
Nagios/Centreon plugin for nextcloud serverinfo API (https://github.com/nextcloud/serverinfo)
Stars: ✭ 22 (-77.55%)
Mutual labels:  python-script
py-problems-solutions
Implementations of various problems using Python. Dynamic Programming, BackTracking & Sorting algorithms 💻
Stars: ✭ 20 (-79.59%)
Mutual labels:  python-script
heroku-flask-template
A simple, fast and easy-to-deploy Heroku ready flask web app template written in Python.
Stars: ✭ 26 (-73.47%)
Mutual labels:  python-script
Constole
Scan for and exploit Consul agents
Stars: ✭ 37 (-62.24%)
Mutual labels:  python-script
PyStalker
Python script to see you what your friends are doing on Codeforces!
Stars: ✭ 12 (-87.76%)
Mutual labels:  python-script
FunUtils
Some codes i wrote to help me with me with my daily errands ;)
Stars: ✭ 43 (-56.12%)
Mutual labels:  python-script
unbound-dns-firewall
DNS-Firewall Python script for UNBOUND
Stars: ✭ 23 (-76.53%)
Mutual labels:  python-script
bitbar-php
PHP formatter for BitBar plugins
Stars: ✭ 65 (-33.67%)
Mutual labels:  bitbar-plugin
tgcf
The ultimate tool to automate custom telegram message forwarding. Live-syncer, Auto-poster, backup-bot, cloner, chat-forwarder, duplicator, ... Call it whatever you like! tgcf can fulfill your custom needs.
Stars: ✭ 378 (+285.71%)
Mutual labels:  python-script
m3u8-downloader
Download the ts files according to the given m3u8 file.
Stars: ✭ 21 (-78.57%)
Mutual labels:  python-script
Awesome Python Scripts
🚀 Curated collection of Awesome Python Scripts which will make you go wow. Dive into this world of 360+ scripts. Feel free to contribute. Show your support by ✨this repository.
Stars: ✭ 198 (+102.04%)
Mutual labels:  python-script
IoT
A repository dedicated to IoT(internet of things ) and python scripts
Stars: ✭ 24 (-75.51%)
Mutual labels:  python-script
molenc
MolEnc: a molecular encoder using rdkit and OCaml.
Stars: ✭ 14 (-85.71%)
Mutual labels:  python-script
cthulhu
Cthulhu is a simple python CLI application that streams torrents directly from various sources.
Stars: ✭ 26 (-73.47%)
Mutual labels:  python-script
my-libs-and-samples
☕️ Automated scripts for improving coding mood(Python/Shell)
Stars: ✭ 25 (-74.49%)
Mutual labels:  python-script
Spydan
A web spider for shodan.io without using the Developer API.
Stars: ✭ 30 (-69.39%)
Mutual labels:  python-script
HashExploit
HashExpoit is Great Tool For Cracking Hash
Stars: ✭ 17 (-82.65%)
Mutual labels:  python-script
ghstats
Python script to obtain GitHub Release download count and other statistics.
Stars: ✭ 31 (-68.37%)
Mutual labels:  python-script
bitbar-chunkwm skhd
A simple bitbar for chunkwm/skhd.
Stars: ✭ 22 (-77.55%)
Mutual labels:  bitbar-plugin

新冠病患数据的 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 刷新一次。

全国的数据为什么跟其他平台不大一致?

  • 新浪的接口会返回一个来自国家卫健委统计的全国数据,但这个数据变化不那么频繁,一天更新一次。
  • 各省份的数据会稍微更新更加及时一些。
  • 展示的策略是这样:先优先展示卫健委的全国数据。同时也会计算各省份的数据,如果加和超过了卫健委的数据,说明是各省份的数据更 新鲜 一些了。此时用各省份加和拿到的数据来做全国数据的展示。
  • 这也和丁香园的策略大体保持一致。可以见 #13 的讨论。

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

  • 需要确保自己电脑上是 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,需要确认好

我也想提交其他语言的版本

  • 可以新提一个 PR,放入到新增的 other-languages 目录下
  • 注意:需要提交脚本 + 安装说明(简单的 README)

我想了解多一些类似的插件

  • 可以查看少数派的这篇文章
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].