Coder Social home page Coder Social logo

cedricblondeau / world-cup-2018-cli-dashboard Goto Github PK

View Code? Open in Web Editor NEW
545.0 11.0 33.0 2.81 MB

โšฝ๐Ÿ† World Cup 2018 CLI dashboard: watch matches in your terminal.

Home Page: https://www.npmjs.com/package/world-cup-cli-dashboard

License: MIT License

JavaScript 98.13% Dockerfile 1.87%
worldcup2018 nodejs dashboard cli terminal soccer react blessed react-blessed worldcup

world-cup-2018-cli-dashboard's Introduction

Check out the 2022 dashboard: cedricblondeau/world-cup-2022-cli-dashboard.

โšฝ๐Ÿ†


World Cup 2018 CLI Dashboard Build Status

screenshot

forthebadge forthebadge forthebadge

Run it in docker ๐Ÿณ

Pull it from Docker Hub:

docker pull cedricbl/world-cup-2018-cli-dashboard && \
docker run -ti -e TZ=America/Toronto cedricbl/world-cup-2018-cli-dashboard

Replace America/Toronto with your actual timezone. This image is for amd64 arch only.

Or build it:

Want to build this image from a Dockerfile instead? Or do you want to run this dashboard on a non-amd64 arch, let's say arm? On a Raspberry Pi?

docker build -t world-cup-2018-cli-dashboard github.com/cedricblondeau/world-cup-2018-cli-dashboard && \
docker run -ti -e TZ=America/Toronto world-cup-2018-cli-dashboard

Install using npm or yarn

NPM:

npm install -g world-cup-cli-dashboard

Yarn:

yarn global add world-cup-cli-dashboard

Requires NodeJS 6+.

Usage

POST_NOTIFICATIONS=0 wc2018
  • Use โฌ…๏ธ and โžก๏ธ keys to navigate through different different matches.
  • Set POST_NOTIFICATIONS to 1 to enable native notifications when receiving new match events such as goals, cards or substitutions (won't work in Docker).

How does it work?

Data is sourced from the awesome worldcup.sfg.io. Matches get updated each 30 seconds. Groups get updated each 2 minutes.

Terminal interface built with react-blessed.

FAQ

Q: Data is not showing up?

If an API call fails, we log a debug message. Press F12 to see the debug console, some helpful messages may show up (a 503 or a 429 HTTP code for instance).

Development

git clone https://github.com/cedricblondeau/world-cup-2018-cli-dashboard
cd world-cup-2018-cli-dashboard
yarn install
USE_FIXTURES=1 yarn start

Set USE_FIXTURES to 0 to use the actual API in dev.

Contributions are very welcome.

LICENSE

MIT

world-cup-2018-cli-dashboard's People

Contributors

cedricblondeau avatar dependabot[bot] avatar gaumala avatar pedromazala avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

world-cup-2018-cli-dashboard's Issues

Compatibility for macOS Terminal

Hello, I would like to know if this could also be used on the macOS Terminal, and how would you recommend installing it?

Thank you.

Installed using NPM. Doesn't work. Appears to be a few commits behind what I see on Github

I'm using Ubuntu 16.04

donnie@blacklodge:~$ node -v v4.2.6

Installed like so...

donnie@blacklodge:~$ sudo npm install -g world-cup-cli-dashboard โ–„ โ•ขโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ•Ÿ WARN engine [email protected]: wanted: {"node":">=6"} (current: {"node":"4.2.6","npm":"3.5.2"}) /usr/local/bin/wc2018 -> /usr/local/lib/node_modules/world-cup-cli-dashboard/bin/wc2018 /usr/local/lib โ””โ”€โ”€ [email protected]

ERROR OCCURS ON STARTUP

`
donnie@blacklodge:~$ wc2018
/usr/local/lib/node_modules/world-cup-cli-dashboard/dist/format.js:93
function getFormattedDatetime(match, displayMinuteIfLive = false) {
^

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/usr/local/lib/node_modules/world-cup-cli-dashboard/dist/components/GroupList/GroupDetails/GroupDetails.js:15:15)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

`

THEORIES:

I examined the format.js file to see if I could track down the syntax error.

vim /usr/local/lib/node_modules/world-cup-cli-dashboard/dist/format.js
Haven't corrected it yet, but I did notice that my format.js file looks a bit different than the current version on Github. Perhaps the latest version has not been pushed out to the npm repositories?

"exec format error"

Hi there,

Thanks for your dashboard.
When I was trying to run it on my Raspberry Pi 3b, it popped an error like:
standard_init_linux.go:190: exec user process caused "exec format error"

Would you please kindly help and check? thank you.

I'm seeing the wrong scores...

I just installed the app, and it looks pretty cool. But I'm seeing the wrong scores...

$ npm -v
5.6.0
$ node -v
v8.11.3
$ cat /etc/fedora-release
Fedora release 28 (Twenty Eight)

screenshot_2018-06-25_15-34-02
screenshot_2018-06-25_15-33-48

Send notifications

Hi, I've been using this tool to "watch" the game at work, and it's great! Thanks for publishing it!

Since I'm a little busy I can't stare at the terminal all morning, so I was wondering if would be possible to use something like node-notifier to send desktop notifications on important events like goals or bookings. Maybe it could be hidden behind an environment variable like the display emojis feature since probably some people don't want notifications.

I could try sending a pull request if you think this would be useful. I've been looking through the codebase a little to get an idea of how to implement this. I think that currently it just scrapes some website every 30 seconds or so, collects the new data and re renders everything. I guess that I would need to keep a list of past events and generate a new event list before rendering again. If the lists differ then a notification should be posted. What do you think?

Wrong results

Shows KSA-EGY as 1-1 after full time, when in fact it was 2-1

It does mention both KSA goals in the details, though.

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.