{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3" ], "description": "nhlv - NHL stream viewer\n========================\n\n`nhlv` is a command-line interface to the NHL.tv service. It's primary purpose is to allow you to view game\nstreams on linux, including live streams with a valid NHL tv/gamecenter subscription. It also allows you to\nview game status, results and schedules, stream highlights (recap and condensed games), and filter results\nbased on favourite teams.\n\nFeatures:\n\n* stream or record live or archived NHL games (requires NHL.tv subscription)\n* show completed game highlights (condensed or recap) (no subscription required)\n* display game schedules for given day or number of days\n - option to show or hide scores\n* filter display based on favourite teams\n* show standings\n\n\nThis project is inspired from the MLB baseball [MLBviewer](https://github.com/sdelafond/mlbviewer) project,\nalthough it differs in that it does not provide an interactive interface (that may be added in future releases). \n\nThis package requires a valid NHL.tv subscription in order to view live or archived games. It is also subject\nto local blackout restrictions. However, if you don't have a subscription you can still view game recaps or\ncondensed games.\n\n\nSample console output:\n\n````\n 2017-12-28 | Score | State | Feeds\n-----------------------------------------------------------------|-------|-----------|------------\nLive Games: | | |\n19:30: Boston Bruins (BOS) at Washington Capitals (WSH) | 3-3 | End OT | away, french, national\n21:00: Toronto Maple Leafs (TOR) at Arizona Coyotes (ARI) | 3-2 | 11:40 2nd | away, home\n22:00: Chicago Blackhawks (CHI) at Vancouver Canucks (VAN) | 0-1 | 11:26 1st | away, national\n22:00: Vegas Golden Knights (VGK) at Los Angeles Kings (LAK) | 0-0 | 20:00 1st | national\n----- | | |\n22:30: Calgary Flames (CGY) at San Jose Sharks (SJS) | | | away, home\n19:30: Montr\u00e9al Canadiens (MTL) at Tampa Bay Lightning (TBL) | 1-3 | Final | away, french, home\n19:30: Philadelphia Flyers (PHI) at Florida Panthers (FLA) | 2-3 | Final | away, home\n\n````\n\nStandings output:\n\n````\n ====== Division ====== W OT L P Streak\n --- Eastern - Metropolitan ---\n1 x-Washington Capitals 46 7 25 99 [L1]\n2 x-Pittsburgh Penguins 45 6 28 96 [W2]\n3 Columbus Blue Jackets 44 6 29 94 [OT1]\n4 Philadelphia Flyers 39 14 25 92 [W1]\n5 New Jersey Devils 41 9 28 91 [W1]\n6 Carolina Hurricanes 35 11 33 81 [L1]\n7 New York Rangers 34 9 36 77 [W1]\n8 New York Islanders 32 10 37 74 [L2]\n --- Eastern - Atlantic ---\n1 x-Boston Bruins 49 11 17 109 [W2]\n2 x-Tampa Bay Lightning 52 4 22 108 [W1]\n3 x-Toronto Maple Leafs 47 7 25 101 [L1]\n4 Florida Panthers 39 8 30 86 [L1]\n5 Detroit Red Wings 30 11 38 71 [W3]\n6 Montr\u00e9al Canadiens 28 12 38 68 [L1]\n7 Ottawa Senators 27 11 40 65 [L1]\n8 Buffalo Sabres 25 12 41 62 [W1]\n --- Western - Central ---\n1 x-Nashville Predators 50 11 17 111 [L1]\n2 x-Winnipeg Jets 48 10 20 106 [W1]\n3 Minnesota Wild 43 10 25 96 [L1]\n4 St. Louis Blues 43 6 29 92 [L1]\n5 Colorado Avalanche 42 8 28 92 [W1]\n6 Dallas Stars 40 8 31 88 [W1]\n7 Chicago Blackhawks 32 10 37 74 [L1]\n --- Western - Pacific ---\n1 y-Vegas Golden Knights 50 7 22 107 [W2]\n2 San Jose Sharks 44 10 25 98 [L2]\n3 Los Angeles Kings 43 8 28 94 [OT1]\n4 Anaheim Ducks 40 13 25 93 [W1]\n5 Calgary Flames 36 10 33 82 [W1]\n6 Edmonton Oilers 34 6 39 74 [L3]\n7 Vancouver Canucks 30 9 40 69 [W4]\n8 Arizona Coyotes 28 11 40 67 [W1]\n````\n\nThis project incorporates some code modified from the following projects: \n\n* https://github.com/eracknaphobia/plugin.video.nhlgcl (Kodi plugin)\n* https://github.com/NHLGames/nhl.py\n\n\n## Pre-Requisites:\n\n`nhlv` requires the following software to be installed and configured:\n\n* python \n - python v3 (tested with 3.6) \n* python modules (installed by `pip install`):\n - [requests](http://python-requests.org/) module \n - [python-dateutil](https://dateutil.readthedocs.io/en/stable/) module\n - [python-lxml](http://lxml.de/) module\n* [streamlink](https://streamlink.github.io/)\n* a video player. Either `vlc` or `mpv` is recommended.\n - Note: player can be specified via config file. If player is not on the system path you may need to\n setup the full path in the config file.\n\nThis software is tested under linux. It should work under Windows or Mac with the pre-requisites installed,\nbut may require minor tweaks (bug reports are welcome).\n\n\n## 1. Installation\n\n### Via pip\n\nThis project is on the Python Package Index (Pypi) at [nhlv](https://pypi.org/project/nhlv), and can be\ninstalled using `pip`.\n\n1. Run `pip install nhlv`\n2. Run `nhlv --init` to create a configuration directory and populate the `config` file\n with defaults and the required MLB.tv username and password. See the next section for more details.\n\n### Archlinux\n\nInstall `nhlv` via the AUR.\n\nThis software is tested under linux. It should work under Windows or Mac with the pre-requisites installed, but may require minor tweaks.\n\n\n\n\n## 2. Configuration\n\nAfter installing, run:\n\n nhlv --init\n\nThis will create the initial config file/directory and populate it with the prompted NHL.tv username and password.\nThe `config` file will be located at `$HOME/.config/nhlv/config`. Directories are created if necessary.\n\nOther properties in the config file are documented in the file itself. If you want to stream live or archived\ngames then you must provide valid login credentials (if you don't have NHL.tv you can still see scores and\nwatch highlights).\n\nSome properties you may want to set in the `config` file:\n\n* `username`: NHL.tv account username\n* `password`: NHL.tv account password\n* `use_rogers`: set to true if your NHL streaming account goes through Rogers\n* `favs`: a comma-separated list of team codes which:\n - 1) are highlighted in the game data, and \n - 2) are used for the default filter in the `-o/--filter` option (to show only the favourite team(s))\n* `scores`: a boolean specifying whether or not you want to see scores in the game information. Warning: spoilers!\n* `resolution`: the stream quality (passed in to streamlink). Use '720p_alt' for full HD at 60 frames/sec.\n - options are: 'worst', '224p', '288p', '360p', '504p', '540p', '720p', '720p_alt', 'best'\n\n\n## 3. QUICKSTART\n\nHere's a quick overview of the most common usage options:\n\n nhlv # show today's schedule/scores\n nhlv -t wpg # play today's Jets game, either live (if in-progress), or from the start (if archived)\n nhlv --recaps # play all of today's recaps\n nhlv --standings # show current standings\n\n\n\nHelp is available by running:\n\n nhlv --help # short help\n nhlv --usage # view full documenation\n\n\n## 4. Default Behaviour: Show Schedule/Scores\n\nRunning `nhlv` by itself shows you the status of today's games, including scores (unless you've configured to hide scores by default).\n\n### Scores/No-Scores\n\nThe `scores` option in the config file controls whether or not scores are shown. If false then no scores are\nshown. Scores are also not shown before a feed is launched.\n\nYou can temporarily override the config file using either `-s/--scores` or `-n/--no-scores` options.\n\n\n\n#### Usage note: shortening option arguments:\n\nIn general, you can shorten the long option names down to something unique. \n\nFor example, rather than having to type `--yesterday` you can shorten it right down to `--y`.\nHowever, you can one shorten `--tomorrow` down to `--to` since there is also the `--team` option which matches\nup to `--t`.\n\n\n### Dates and Filters\n\nSee the sections below on Dates and Filters for more information on specifying dates and filtering output based on\nleague, division, favourites, or arbitrary teams.\n\n\n> Note on Arguments\n> \n> Frequently used arguments have both a long form with double-dash `--` argument and a short form which uses a single dash `-`. \n> \n> For the long form arguments, you can shorten any option name down to the shortest unique value. For example,\n> rather than having to type `--yesterday` you can shorten it right down to `--y`. However, you can only\n> shorten `--tomorrow` down to `--to` since there is also the `--team` option (which makes `--t` non-unique).\n\n\n## 5. Watching a Live or Archived Game\n\nWatching a game is triggered by the `-t/--team TEAM` option. With this option the game stream (live or\narchived) is launched for the given team. \n\nWhen passing `-t/--team TEAM` option, the stream is launched for the given team. By default the local feed\nfor the given team is chosen - i.e., it will follow the home/away feed appropriate for the team so that you\nget the local team feed. You can override the feed using the `-f/--feed` option. This works for either live\ngames or for archived games (e.g. if you use the `--date` option to select an earlier date).\n\nExample:\n\n nhlv --team wpg # play the live jets game\n nhlv --yesterday -t wpg # play yesterday's jets game (see below for options on specifying dates)\n\n\n### Feed Selection\n\nBy default the local feed for the given team is chosen - i.e., it will follow the home/away feed appropriate\nfor the given team so that you get the team's local feed if available. You can override the feed using the\n`-f/--feed` option. This works for either live games or for archived games (e.g. if you use the `--date`\noption to select an earlier date).\n\n nhlv --team wpg --feed away # choose the away feed (assuming Winnipeg is the home team, you will get the\n # opposing team's feed)\n\n\n### Specifying Stream Start Location\n\nFor an in-progress game, the stream will join the live game at the current time. Use either `--from-start` or\nthe `--inning` option to override this behaviour.\n\nFor an archived game, the stream will start from the beginning.\n\n#### Start from Offset\n\nFor both live and archived games you can start from an offset time provided via the `--offset` option.\nThe offset is provide in form `HH:MM:SS`. Example:\n\n nhlv -t wpg --offset 01:00:00 # start today's Jets game an hour into the game\n\n\n## 6. Record/Fetch\n\n\nIf you pass the `-f/--fetch` option, instead of launching the video player, the selected stream is saved to\ndisk. The stream is named to convention: `---.ts`.\n\n- Live games have extension `.ts`, highlight games are `.mp4`\n\nExample: `2017-12-27-edm-wpg-national.ts`.\n\nIf your player supports it, you can select the stream to fetch, then manually launch your video player at a\nlater time while the stream is being saved to file. \n\nExample:\n\n nhlv --team wpg --fetch # fetch the live jets game to disk. Most players let you view while downloading\n # Most video players allow you to view while downloading\n\n\n## 7. Highlights: Recap or Condensed Games\n\nPlaying the game highlight is triggered by using the `-f/--feed` option. The `recap` or `condensed` feeds show\nup after a game has ended. To watch the highlight, specify one of those feeds along with the team name in the\n`-t/--team` option.\n\nExample:\n\n nhlv --team wpg -f condensed\n nhlv --team wpg -f recap\n\nNOTE: You don't need login credentials to play highlights.\n\n\n### Playing Multiple Game Recaps (for a given day)\n\nThe `--recaps` option lets you select a batch of game recaps to watch for a given day.\nThis option shows game recaps either for all games or for a selected set of teams (using a filter).\nIf no argument is given to `recaps` then no filter is applied.\n\nUsage:\n\n --recaps ?filter? : filter is optional, if not supplied then all games are selected\n\nExamples:\n\n nhlv --recaps # show all available game recaps for today's games\n nhlv --yesterday --recaps # show all available game recaps for yesterday's games\n nhlv --yesterday --recaps central # show available game recaps for yesterday's games\n # in the Central division\n nhlv --yesterday --recaps wpg,ott # show game recaps for yesterday's Winnipeg, Ottawa games\n nhlv --yesterday --recaps wpg,ott --fetch # same as above but save to disk instead of view\n\n\n## 8. Specifying Dates\n\nYou can specify the date to view using one of the following:\n\n -d|--date yyyy-mm-dd # specific date\n --yesterday (or --yes) # shortcut to yesterday\n --tomorrow (or --tom) # shortcut to tomorrow\n\nFor listing game data only (doesn't make sense for viewing), you can specify a number of days using the\n`--days DAYS` option. Use this to show a schedule. It's useful with the `--filter` option to filter based on\nfavourite team(s).\n\n\n## 9. Filters\n\nYou can filter the schedule/scores displays using the `-o/--filter` argument. \nThe filter argument allows you to provide either a built-in filter name or a comma-separated list of team codes.\n\nThe filter option has the form:\n\n -o/--filter ?filter? : where ?filter? is optional, and is either \n a 'filter name' or a comma-separated list of teams\n\n> Note: -o is used as the short form because -f is taken. mnemonic: -o -> 'only'\n\n> Note: Aside from the `--filter` command, other command arguments accept the same 'filter' string.\n> For example `--linescore ?filter?` and `--recaps ?filter?`\n\n\n### Built-in Filters\n\nIf `?filter?` is not given then the built-in filter `favs` is used. `favs` is a filter which you can define \nin the config file to list your favourite team(s).\n\nOther built-in filters are available which group teams by league and division. The filter names are:\n\n* `east`, `atlantic`, `metropolitan` (Eastern Conference, Atlantic division, Metropolitan division)\n* `west`, `central`, `pacific` (Western Conference, Central division, Pacific division)\n\nUsing one of the above filter names will include those selected teams in the output.\n\n\n### Ad-hoc Filters\n\nYou can also use any comma-separated list of team codes for a filter.\n\nExamples:\n\n --filter wpg # single team filter\n --filter wpg,ott,van # multiple team filter\n -o wpg,ott,van # same as above using shorter `-o` form\n\nNote: Do not use spaces between commas unless you encapsulate the list in quotes.\n\n\n## 10. Standings\n\nYou can display standings via the `--standings [category]` option. This option displays the given standings category then exits.\n\nYou can also specify a league or division filter via `-o/--filter`.\n\nStandings categories:\n\n* all\n* division [default]\n* conference\n* wildcard\n* league\n* postseason\n* preseason\n\nBy default, the division standings are displayed for today's date. \nYou can add the `-d/--date yyyy-mm-dd` option to show standings for any given date.\n\nYou don't have to specify the full standings category, it will match any substring given. e.g. `--standings d`\nwill match division or `--standings wild` will match wildcard.\n\nYou can also use the `-o/--filter` option to narrow down what is displayed. e.g. `--standings division --filter ale`\n\n\n## 11. Examples\n\nNote: the common options have both short and long options. Both are shown in these examples.\n\n\n### Live Games\n\n nhlv --team wpg # play the live jets game. The feed is chosen based on jets being home vs. away\n nhlv -t wpg --feed national # play live game, choose the national feed\n nhlv -t wpg --feed away # play live game, choose the away feed. If jets are the home team this would choose\n # the opponent's feed\n\n#### Archived Games\n\n nhlv --yesterday -t wpg # play yesterday's jets game\n nhlv --date 2017-12-27 -t wpg # watch the jets beat the oilers #spoiler\n\n#### Highlights\n\nUse the `--feed` option to select the highlight feed (`recap` or `condensed`):\n\n nhlv --yesterday -t wpg --feed condensed # condensed feed\n nhlv --yesterday -t wpg -f recap # recap feed\n\nYou can also use the `--recaps` option to show highlights for games on given day.\nThis will show all chosen recaps, one-by-one until finished. A highlight reel.\n\n\n### Fetch\n\nIn these examples the game is saved to a file (.ts or .mp4) in the current directory.\n\n nhlv --team wpg --fetch\n nhlv --yesterday -t wpg -f recap --fetch # fetch yesterday's recap\n\n### Using `--days` for Schedule View\n\n nhlv --days 7 # show schedule for upcoming week\n nhlv --days 7 --filter # show schedule for upcoming week, filtered on favourite teams (from config file)\n nhlv --days 7 --filter --favs 'wpg,ott' # show schedule filtered on favourite teams (from option)\n\n#### Standings\n\n nhlv --standings # display division standings\n nhlv --standings div -o central # display central division standings\n nhlv --standings conference # display conference standings\n nhlv --standings conf -o west # display western conference standings\n nhlv --standings league # display overall league standings\n nhlv --standings all # display all regular season standings categories\n\n nhlv --standings --date 2015-01-01 # display division standings for Jan 1, 2015", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kmac/nhlv", "keywords": "", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "nhlv", "package_url": "https://pypi.org/project/nhlv/", "platform": "", "project_url": "https://pypi.org/project/nhlv/", "project_urls": { "Bug Reports": "https://github.com/kmac/nhlv/issues", "Homepage": "https://github.com/kmac/nhlv", "Source": "https://github.com/kmac/nhlv" }, "release_url": "https://pypi.org/project/nhlv/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Command-line interface to streaming NHL games (requires NHLV.tv subscription), game schedule and scores", "version": "0.0.1" }, "last_serial": 4578804, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d5ca2e5ba89319a53ef1fe4abba66408", "sha256": "95c8152fe98981988e174c3beec0a223af9f941effc0bb8633c0cf05f8af79d6" }, "downloads": -1, "filename": "nhlv-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d5ca2e5ba89319a53ef1fe4abba66408", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51357, "upload_time": "2018-12-10T04:50:23", "url": "https://files.pythonhosted.org/packages/1d/a4/6372498c92661deb14ad826b5498a2838d24b94c273f6372c0128a425d5d/nhlv-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d5ca2e5ba89319a53ef1fe4abba66408", "sha256": "95c8152fe98981988e174c3beec0a223af9f941effc0bb8633c0cf05f8af79d6" }, "downloads": -1, "filename": "nhlv-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d5ca2e5ba89319a53ef1fe4abba66408", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 51357, "upload_time": "2018-12-10T04:50:23", "url": "https://files.pythonhosted.org/packages/1d/a4/6372498c92661deb14ad826b5498a2838d24b94c273f6372c0128a425d5d/nhlv-0.0.1.tar.gz" } ] }