All Projects → rogerzhu → Nbash

rogerzhu / Nbash

Licence: mit
观看NBA比分直播,球员数据的命令行程序。

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Nbash

Nba Go
🏀 💻 The finest NBA CLI.
Stars: ✭ 3,634 (+1964.77%)
Mutual labels:  nba, cli
Nba Live
Watch NBA games in the terminal, the content in Chinese only.
Stars: ✭ 181 (+2.84%)
Mutual labels:  nba, cli
Mongotail
Command line tool to log all MongoDB queries in a "tail"able way
Stars: ✭ 169 (-3.98%)
Mutual labels:  cli
Discordrpcmaker
Cross-platform Discord Rich Presence Maker, WITH BUTTONS!
Stars: ✭ 165 (-6.25%)
Mutual labels:  cli
Ignite
Infinite Red's cutting edge React Native project boilerplate, along with a CLI, component/model generators, and more!
Stars: ✭ 13,296 (+7454.55%)
Mutual labels:  cli
Fpl
An asynchronous Python wrapper for the Fantasy Premier League API.
Stars: ✭ 169 (-3.98%)
Mutual labels:  cli
Nixpkgs Fmt
Nix code formatter for nixpkgs [[email protected]]
Stars: ✭ 171 (-2.84%)
Mutual labels:  cli
As Tree
Print a list of paths as a tree of paths 🌳
Stars: ✭ 167 (-5.11%)
Mutual labels:  cli
Firessh
free, cross-platform SSH terminal client for Firefox and Chrome
Stars: ✭ 173 (-1.7%)
Mutual labels:  cli
Devspace
DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
Stars: ✭ 2,559 (+1353.98%)
Mutual labels:  cli
Acutest
Simple header-only C/C++ unit testing facility.
Stars: ✭ 170 (-3.41%)
Mutual labels:  cli
Qoa
Minimal interactive command-line prompts
Stars: ✭ 2,007 (+1040.34%)
Mutual labels:  cli
Webfont
Awesome generator of webfont
Stars: ✭ 170 (-3.41%)
Mutual labels:  cli
Mailproxy
mailproxy is a simple SMTP proxy. It receives emails through an unencrypted, unauthenticated SMTP interface and retransmits them through a remote SMTP server that requires modern features such as encryption and/or authentication. mailproxy is primarily useful for enabling email functionality in legacy software that only supports plain SMTP.
Stars: ✭ 170 (-3.41%)
Mutual labels:  cli
Commander
🚀The framework to write type-safe and structured command line program easily in Swift.
Stars: ✭ 170 (-3.41%)
Mutual labels:  cli
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (-1.7%)
Mutual labels:  cli
Acli
Action Cable command-line client
Stars: ✭ 169 (-3.98%)
Mutual labels:  cli
Cloudexplorer
Cloud Explorer
Stars: ✭ 170 (-3.41%)
Mutual labels:  cli
Git History
Quickly browse the history of a file from any git repository
Stars: ✭ 12,676 (+7102.27%)
Mutual labels:  cli
Dnote
A simple command line notebook for programmers
Stars: ✭ 2,192 (+1145.45%)
Mutual labels:  cli

用命令行看NBA直播

如果你在Windows上运行

Windows对命令行的UI支持基本处于一个很不美观的状态,而我又想做一个尽量任何平台都能使用的程序,所以使用了一个我觉得是跨平台命令行python上最好的库了。但是即使是这样Windows上的显示远远不及其他平台,顶多处于一个凑合可用的状态,在这里只能先放低姿态,表示,我尽力了。

运行该程序的依赖项

如果想运行起这个程序,需要首先安装如下的库先:

pip3 install asciimatics
pip3 install requests
pip3 install BeautifulSoup4
pip3 install fake-useragent

或者直接运行以下命令安装:

pip3 install -r

运行方法,进入NBash.py所在目录,输入:

python3 ./NBash.py

这是什么

这是一个使用命令行就能实时显示当天NBA比赛的程序,包括对阵双方,比分以及进行时间,并且可以查看每场比赛的球员数据(~~特别适用于上班摸鱼~~)。目前所有直播信息以及数据都来自于虎扑,没错,我就是一名虎扑jr,后面我修改程序(虽然心中想每个数据源封装一个类,然后采用工厂模式,但手暂时还没有这么做),争取使用多种源,展示效果如下: nbalivecmd.gif

如果命令行宽度小于190个字符,那么,程序会显示一个缩减版的数据展示: 缩减版.png

为了最大限度的不骚扰数据源的服务器,特地加入逻辑,如果所有场次都结束了,那么就不再每隔几秒去扒数据了,就扒一次就可以了。

使用方法

  • 在比分页面,输入要查看的场次的序号,按下空格键,就可以进入相应的具体数据页面。
  • 在具体数据页面,按下空格键即可返回比分页面。
  • 按x键会退出程序。

未来的想法

  • [ ] 继续优化代码结构,可以更方便的切换不同的数据源
  • [ ] 目前虽然定义了诸如Game,Team,Player的类,但是还没有做具体的记录工作
  • [ ] 在优化速度的路上永不停歇
  • [ ] 分别在Windows和Mac平台上打包成可执行程序,方便一般用户使用
  • [ ] 修改任何bug以及反直觉使用的地方

Release Notes

1.0.0

  • 同时查看多场NBA比分直播
  • 输入要查看的场次,可以查看具体球员数据

1.1.0

  • 在具体数据页,增加每节比分

1.1.1

  • 优化下代码结构,目前重复代码过多
  • 增加领先一方比分彩色显示

1.2.1

  • 在深入认识了下asciimatics库后,重构了代码,解决了闪烁的问题
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].