7 ms·
Playball – Watch MLB games from a terminal
- joshmn 1y agoThis is nice. MLB has a surprisingly nice API for accessing things like this. (I misinterpreted "watch" completely different (post history will reflect why))
- fred_is_fred 1y agoNow that is an understatement.
- throwaway314155 1y ago> I misinterpreted "watch" completely different (profile bio) > I’m Josh; from Minnesota Say no more.
- hbcondo714 1y agoYeah, you can see the statsapi.mlb.com endpoints in the files of the features folder.
- Covzire 1y agoThat's awesome, now if it would integrate with Plex somehow...
- CamperBob2 1y agoThe obvious next step is to train a model to turn these detailed updates into realistic live-action video. Of course, the obvious step after that is for MLB to shit a brick and shut down the API.
- altairprime 1y agoPerhaps not posting the “here’s how to destroy a nice thing” ideas, which makes them more widely known and thus more likely to be created by someone, would help reduce the incidences of “nice thing destroyed”. That next step towards destruction is never quite as obvious to everyone as you think. Sure, a few people have probably thought of it, but odds are they won’t do anything about it. Sharing them widely like this is like leading a flash mob to hold up lightning rods in a thunderstorm and saying “it would be such a shame if lightning struck one of us”.
- RankingMember 1y ago> The obvious next step is to train a model to turn these detailed updates into realistic live-action video. Wasn't obvious to me- sounds like you've got an idea that might be fun to pursue.
- samrus 1y agoThat video would be such slop. It wont be as fun as watching an actual pitch/hit. Also the fun baseball stuff, the kind jomboy covers, wont ever be in the video because its not in the feed
- vunderba 1y agoWhen I first read the description of this project I actually assumed that it was using ASCII in the terminal to recreate the current state of the game...
- boomboomsubban 1y agoIt would be neat to recreate early radio, where a broadcaster would get a play-by-play over the wire and then announce it as if watching it, complete with sound effects. It was one of Ronald Reagan's early jobs.
- nonethewiser 1y agoThat is an interesting idea. And that sounds quite doable. Not sure about TOS but would be a natural fit as a twitch channel.
- k2enemy 1y agoIt seems like MLB themselves have been experimenting with this. On their website, they have a feature called "gameday" that animates the game. For a while now they've had a 2d view, but now they also have a 3d view that you can switch to. It is buggy as hell, but neat that you can move around the field and watch player movement off the ball. But there are a ton of glitches, like players getting frozen or duplicated, batters, umps, and catchers getting swapped (funny to see the ump at bat), and mixups with mount visits. In time, I can imagine this as a great way to watch though. Especially for novice players and fans learning the game and trying to figure out things like who should back up which throws in which situations etc.
- intrikate 1y agoWhy would they shit a brick over people using data to ask a computer to generate videos of... a game they already captured video of?
- iancmceachern 1y ago"Just because you can, doesn't mean you should" - Everyone's favorite chaotician
- jackmu 1y agothis is so cool! was it hard building a tui? i see you're even using react in there
- grantseltzer 1y ago'Watch' isn't the correct word.
- UberFly 1y agoYea I agree. Pretty loose usage of the term. More like "Watch MLB stats change in a terminal window".
- vunderba 1y agoNeat. I always envision that fans of a particular sports franchise use these text descriptions to reconstruct the game in their minds in the same way that people who play blindfold chess [1] do. [1] https://en.wikipedia.org/wiki/Blindfold_chess https://en.wikipedia.org/wiki/Blindfold_chess
- vmilner 1y agoIt would be funny to reverse generate Stratomatic card picks and dice rolls from the real data.
- airstrike 1y agoThis is both really awesome and a perfect explanation for why I find baseball so incredibly boring to watch
- naet 1y agoI love plaintextsports for baseball already. Baseball is a game that serializes to text very well (and radio) vs other sports. Bringing it to the terminal is cool too.
- nonethewiser 1y agoYeah Im just now realizing how the baseball scoring conventions are basically a DSL for a baseball game. There is a standardized way for expressing what happens in a game. I wonder if this has been leveraged in any interesting programs. here is an example inning: K | 6-3 | BB | 2B (RBI, R1-H) | F8
- 72736379 1y agoThere's a standardized way to express what is happening in the game too- you'll often hear on the radio and television broadcasts the play that just happened using numbered positions on the field. 1 is pitcher, 2 is catcher, 3 is first baseman, 4 is second, 5 is third, 6 is shortstop, etc. so you'll hear something like "6-4-3 double play" which means the ball was fielded by the shortstop (6), thrown to the second baseman (4) for the first out, then to the first baseman (3) for the second one. Makes it easy to visualize the game if listening on the radio.
- hoistbypetard 1y agoWhen I coach my youth teams, I always list their positions by number. I derive some minor benefit from doing that, but I'm also hoping that by having them learn the position numbers, it will make it easier for them to enjoy audio broadcasts of baseball games. There's a special kind of fun in listening to those.
- nonethewiser 1y agoI think we are saying the same thing. This is the same as scoring the game they are just saying it out loud. Maybe my example didnt pick the most illustrative details.
- aidenn0 1y ago
- nonethewiser 1y agoTotally anecdotal, but there are people who literally get paid to watch games and record what happens at every step. I used to have that job. This is how MLB, ESPN etc. have live updates which powers stuff like this.
- re 1y agoThere are also fans who record what happens in baseball games purely for their own enjoyment. https://en.wikipedia.org/wiki/Baseball_scorekeeping https://en.wikipedia.org/wiki/Baseball_scorekeeping https://www.reddit.com/r/BaseballScorecards/ https://www.reddit.com/r/BaseballScorecards/ https://www.reddit.com/r/baseball/comments/1lzpwrq/reasons_i_love_keeping_score_while_watching/ https://www.reddit.com/r/baseball/comments/1lzpwrq/reasons_i... / https://www.reddit.com/r/baseball/comments/68qdm9/people_who_keep_score_at_games_why_do_you_do_it/ https://www.reddit.com/r/baseball/comments/68qdm9/people_who...
- iancmceachern 1y agoI see these folks at giants games sometimes, they usually have a little mini golf pencil and a clipboard or something.
- aidenn0 1y agoI helped someone extract data from one of those old DOS personal-database software programs. He had recorded every scorecard from every game he went to for many years. Each year had its own floppy disk.
- jackconsidine 1y agoWhat an awesome project at just the right time. I love baseball and I love that the hacker culture seems to love baseball too. I read that part of baseball's decline from the premiere American sport was due to its outdated revenue model (strict reliance on ticket sales). The NFL in 80s really embraced TV and reached more fans and here we are. MLB has been recently way ahead of the curve on streaming (MLB.tv, AWS StatCast etc). I hope projects like this contribute to baseball regaining popularity
- spike021 1y agoI just wish MLB and its broadcasters weren't pushing gambling so hard. It's ridiculous and bringing so much toxicity to the sport.
- nonethewiser 1y agoI fully support sports gambling being legal but holy shit, the legalization of sports gambling in the USA had such a terrible effect on sports coverage. I have not watched the MLB in a while so I don't know specifically what you are talking about but I can imagine.
- Jeremy1026 1y agoThere is an ad for a sports book on screen no less than 50% of a broadcast, not including ad breaks, for the majority of teams. Either it's an ad behind home plate, a jersey patch, the broadcasters themselves reading the latest odds, or a combination of those and more. It is absolutely insane.
- hoistbypetard 1y agoI was just having this conversation with friends a few days ago. We do still watch games, but we all used to also watch sports news/talk shows (e.g. morning pre-football coverage, SportsCenter, and the like) and most of us have stopped. Some of the shows are now exclusively focused on betting. I'm all for consenting adults to be able to legally place wagers at outlets that are not swindling them, or offering the kinds of loans that could get a person's legs broken. But I'm so tired of ALL THE COVERAGE being about betting. It was more fun when the coverage was mostly sports, and Al Michaels had to sneak in the odd mention of what the point spread was for a game he was broadcasting. Even my friends who enjoy gambling don't like the media coverage of it. I guess we're not a representative sample.
- jimt1234 1y agoThis is great! Thanks! Years ago, I wrote something based on this same premise, mostly just to experiment with Golang: https://github.com/jimt1234/mlbcli https://github.com/jimt1234/mlbcli
- nonethewiser 1y agoThis is very cool. I like it.
- alargemoose 1y agoThis is great. I’m working on something similar for tracking college football games from the terminal. Right now it just shows a List of active games with minimal navigation. lots of great inspiration.
- dredmorbius 1y ago"Your Web browser is Ronald Reagan." -- Neal Stephenson <https://www.azquotes.com/quote/783529 https://www.azquotes.com/quote/783529> <https://hackneys.com/docs/in-the-beginning-was-the-command-line.pdf https://hackneys.com/docs/in-the-beginning-was-the-command-l...> (PDF) (Play-by-play...)
- Anaminus 1y agoThe lock file is 12 times larger than the entire source. git clone -q https://github.com/paaatrick/playball.git cd playball echo $(du -bs package-lock.json | cut -f1) / $(du -bs src | cut -f1) | bc -l
- rootcage 1y agoHow can we extend this to NFL or NBA?
- ascagnel_ 1y agoGridiron football would probably work well for something like this: each play has a line of scrimmage, yards gained or lost, and a summary of the play (eg: from their own 47 yard- line, QB#3 threw a lateral to RB#8 with 3:08 remaining in the third quarter and gained 2 yards and was brought down by DT#10). Most importantly, there are defined "plays" that run from snap to down, which means you can summarize it. NBA play would be very different and very difficult, because there are no defined plays, only possessions. It'd include relative locations on the floor (lane, 2pt area, 3pt area), list of players who touched the ball, and what the outcome was (2pt, 3pt, turnover, out-of-bounds, etc).
- Slothrop99 1y agoThey have this (with a slight delay) on NFL.com and ESPN. Not sure if there's a public API for it tho.
- xrd 1y agoI think a browser extension could be used to pull the content from the live stats stream as a good starting point.
- Player6225 1y agoI saw it mentioned elsewhere in these comments, but plaintextsports.com is my goto for live sportsball stats
- deleted 1y ago[deleted]
- axbolduc 1y agoFor others interested in the space there are a couple of other MLB TUI programs out there. mlbt: https://github.com/mlb-rs/mlbt https://github.com/mlb-rs/mlbt gomlb (self plug): https://github.com/AxBolduc/gomlb https://github.com/AxBolduc/gomlb I also know of NBA CLI (https://github.com/dylantientcheu/nbacli https://github.com/dylantientcheu/nbacli) for the NBA but last I checked it was having issues with changes to the NBA API.
- kleinmatic 1y agoMLBT is terrific. Seems better than playball. I like having it open on a second screen.
- reaperducer 1y agoWould love to see this as a Telnet or SSH service so I don't have to install npm for something I might only use once. EDIT: Nevermind, I found one downthread: https://github.com/mlb-rs/mlbt https://github.com/mlb-rs/mlbt
- stack_framer 1y agoVery cool. I may just cancel my Fubo subscription and switch to this (Fubo has the glitchiest, buggiest, slowest video player I've ever seen)!
- dang 1y agoRelated: Playball: Watch MLB games from the comfort of your own terminal - https://news.ycombinator.com/item?id=37591070 https://news.ycombinator.com/item?id=37591070 - Sept 2023 (1 comment) Playball: Watch MLB games from the comfort of your own terminal - https://news.ycombinator.com/item?id=21653981 https://news.ycombinator.com/item?id=21653981 - Nov 2019 (42 comments)
- gregjw 1y agoI wonder how easy it would be to adapt this to work for NPB/Japanese Baseball.
- some_guy_nobel 1y agoThis is awesome. One of the great outcomes of the datafication of baseball is the timely availability/accessibility of game info.
- maxlin 1y agoI fully expected this to play sports streams in terminal with the pixels converted to ASCII kind of like passing ffmpeg thru caca lol
- canthonytucci 1y agoBeautiful. Does something similar exist for f1? Or soccer?
- Whatarethese 1y agoLights out and away we go. Max Verstappen wins the Grand Prix!
- striking 1y agoSure, there's a few live text commentaries e.g. https://www.motorsport.com/f1/live-text/f1-azerbaijan-gp-live-commentary-and-updates-race-1125651/1125652/ https://www.motorsport.com/f1/live-text/f1-azerbaijan-gp-liv... . Not quite in a standard format, though...
- pfych 1y agoI was just thinking about this for F1 - someone mentioned plaintextsports but it doesn't seem like F1 is there. Already thinking about the ways you could represent a race with a text[^1], could be a very interesting project but not sure if there's any APIs. [^1]: Baseball for example: https://news.ycombinator.com/item?id=45453733 https://news.ycombinator.com/item?id=45453733
- empath75 1y agoEspn has a feed of soccer events (cards, shots, goals, etc), but that doesn't give you anything close to a complete state-of-the-game in the way that baseball scoring does. I did a tour of an MLS stadium yesterday and the tour guide was showing some of the equipment the players wear during the game and the _teams_ actually have a moment by moment read out of exactly where all all the players are on the field and what they are doing, where contact is made on the ball, their heart rate and lots of other stuff, and the ball itself has electronics in it in some leagues, so it actually _is_ possible to completely reconstruct a game from a data feed. Just that the feed isn't public.
- gorgoiler 1y agoOne word: Cricket One of the many standout features of a sport that already includes: - being famous for taking five days to play and often ending in a drawer; - where a major component of play is the nature and timing of the ball falling apart; and - where regular fielding positions have names like silly mid on, third man, cow corner, and square leg, …is that since time immemorial cricket has had a symbiotic relationship with another deeply weird pastime, the art of cricket scoring, namely the erudite process of keeping track of the score: https://preview.redd.it/englands-first-innings-scoresheet-v0-db7s2wmdocdb1.jpg?width=640&crop=smart&auto=webp&s=222afc257f8474dffb6afb06954cd30918866f42 https://preview.redd.it/englands-first-innings-scoresheet-v0...
- khernandezrt 1y agoThis might be how I get my dad into computers
- dmackerman 1y agoThis is really cool! Would it be possible to fork this and do it for the NBA?
- rafaele 1y agoMaybe? ESPN has an unofficial API: https://github.com/pseudo-r/Public-ESPN-API https://github.com/pseudo-r/Public-ESPN-API
- sixothree 1y agoIf this interests you, then maybe you will find undercut-f1 interesting too. https://github.com/JustAman62/undercut-f1 https://github.com/JustAman62/undercut-f1
- deleted 1y ago[deleted]
- matt3210 1y agoTitle: "Read MLB games from a terminal"
- dec0dedab0de 1y agothis is pretty cool, though I wish it were for football... or animated in ascii art. Maybe like the old intellivision baseball game. I wonder if the datasource is ok with being polled directly like that. I hope they don't start trying to stop it.
- awsanswers 1y agoI love this, it feels like something that should have always existed. great job