Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coderhs/scorer-rb
A ruby script to load latest score from cricinfo and show the score as system notifications
https://github.com/coderhs/scorer-rb
Last synced: about 2 months ago
JSON representation
A ruby script to load latest score from cricinfo and show the score as system notifications
- Host: GitHub
- URL: https://github.com/coderhs/scorer-rb
- Owner: coderhs
- Created: 2015-04-04T13:03:43.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-04-09T18:55:05.000Z (almost 8 years ago)
- Last Synced: 2024-10-27T17:07:02.528Z (3 months ago)
- Language: Ruby
- Size: 13.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# scorer.rb
Ruby implementation of scorer (https://github.com/alfie-max/scorer) to fetch live scores and send notification
## How to run the program
```sh
$ git clone https://github.com/coderhs/scorer-rb.git
$ cd scorrer-rb
$ bundle
$ ./scorer
```## Usage
### Basic
```
Usage:
./scorer
./scorer [Game Index]
./scorer [flags]flags
-d, --daemon=val tell the process to run as a daemon
-k, --kill kill the daemon process if its running
-l, --list list all the present matches
-h, --help help
```### Display all the matches for which score is available
Command
```sh
./scorer -l
```Result
``[Game Index]. [Match]`````sh
0. Australia Under-19s 242/7 * v England Under-19s 241/7
1. Sunrisers Hyderabad 163/8 * v Delhi Daredevils 167/4
2. Kings XI Punjab 123/5 * v Kolkata Knight Riders```
### Show score of particular game
Get the game index using command `./scorer -l`.
Command
```sh
./scorer 0
```### Show score of particular game as daemon
Get the game index using command `./scorer --daemon=[game_index]`.
Command
```sh
./scorer --daemon=2
```## To do
* Write test for the program
* Make the program installable as a ruby gem