235

hockey results with a familiar feel

Get your NHL results directly to your terminal.

For decades, 235 has been part of a morning routine for countless Finnish hockey fans. This project has been inspired by the work done by YLE Tekstitv team in providing hockey fans NHL results each night and morning.

Release notes

Install:

- with Rust

cargo install nhl-235
// To run it with 235 instead of nhl-235:
ln -s ~/.cargo/bin/nhl-235 /usr/local/bin/235

- from Github

Download binaries from GitHub

Usage:

These examples use 235 as the command name. If you have just installed it without aliasing or creating symbolic link as shown in install section, you need to call it with nhl-235.

Default

235
$ 235
Washington      - Buffalo          so 4-3
Backström      16 Staal          12
Dowd           24 Cozens         30
Vrana          33 Sheahan        33
Carlson        65

Pittsburgh      - NY Rangers       1-0
Crosby         14
        

With default options, green score means the game has ended and white that it's still on-going. Teal is regular goal and purple means overtime or shootout winner. The number after scorer's name is the minute of the goal.

--nocolors

235 --nocolors
$ 235 --nocolors
Washington      - Buffalo          so 4-3
Backström      16 Staal          12
Dowd           24 Cozens         30
Vrana          33 Sheahan        33
Carlson        65

Pittsburgh      - NY Rangers       1-0
Crosby         14
            

Running 235 with --nocolors disables printing the color codes to the terminal and everything is default-colored for the terminal.

This also happens if printing into anything else than standard output, for example piping into a file or another program.

--highlight

You can highlight your favorite players by creating a .235.config file in your home directory. Each line in the file must be a single last name to be highlighted.

Example .235.config:

Vrana
Crosby

Once run with --highlight option, those players will be shown in yellow.

235 --highlight
$ 235 --highlight
Washington      - Buffalo          so 4-3
Backström      16 Staal          12
Dowd           24 Cozens         30
Vrana          33 Sheahan        33
Carlson        65

Pittsburgh      - NY Rangers       1-0
Crosby         14
                    

This makes it easier for you to see if your favorite players scored.

If --nocolors is enabled, --highlight does nothing.

--stats

from version 1.3.0 onwards, see release notes.

You can gain more stats of favorite players by creating a .235.config file in your home directory. Each line in the file must be a single last name to be shown.

Example .235.config:

Vrana
Crosby

Once run with --stats option, those players' stats will be shown below the game summary if they gain any goals or assists.

235 --stats
$ 235 --stats
Washington      - Buffalo          so 4-3
Backström      16 Staal          12
Dowd           24 Cozens         30
Vrana          33 Sheahan        33
Carlson        65

(Vrana 1+1)


Pittsburgh      - NY Rangers       1-0
Crosby         14

(Crosby 1+0)
                    

Can be used with --highlight in which case the stats line will be highlighted too.

If no players are defined in $HOME/.235.config, this option does nothing.

--version

235 --version
1.2.1

Outputs the current version.

--help

235 --help
nhl-235 1.2.1
Display live or previous NHL match results on command line

Homepage: https://hamatti.github.io/nhl-235/

Open source under MIT license

USAGE:
    nhl-235 [FLAGS]

FLAGS:
    -h, --help
            Prints help information

        --highlight
            Highlight players based on $HOME/.235.config file. 
            If --nocolors is enabled, does nothing

        --nocolors
            Disable terminal colors

        --version
            Current version

Prints help information about current version, description of the software and information about options.

Source code

235 is published as an open source software with MIT license.

You can find the source code from https://github.com/hamatti/nhl-235/.

Feel free to open issues in GitHub if you find bugs or have feature ideas.

Acknowledgements

This software uses peruukki/nhl-score-api for its data.

Development of 235 has been a grateful recipient of the Futurice Open Source sponsorship program in 2021-2022.