LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-14-2013, 12:03 PM   #4126
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled

Stats would be a great standalone (IMO), especially since it could be really easy to have a second terminal window/tab open on the stats app to make it easily checked during the course of the game, especially if you slide it to a different virtual desktop and have keybindings to easily swap between the desktops.
 
Old 06-14-2013, 02:38 PM   #4127
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
Just found another batch of videos for you: The MLB Fan Cave. I got a link in today's MLB.com Morning Lineup email. I have no idea where I heard about that newsletter but it's a nice way to get videos from the previous day's games that I may not have watched otherwise.
 
Old 06-14-2013, 03:02 PM   #4128
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by BostonPeng View Post
Just found another batch of videos for you: The MLB Fan Cave. I got a link in today's MLB.com Morning Lineup email. I have no idea where I heard about that newsletter but it's a nice way to get videos from the previous day's games that I may not have watched otherwise.
I'm going to pass on adding that one. It doesn't seem like they update it all that frequently. That query came back with 25 videos with most of them being from 2011.

I'm also going to look at the categories I've already added and see if I can scale it back to the ones that seem most relevant and leave the rest for mlb.com.

I'm okay with being less complete but more relevant and current.
 
Old 06-14-2013, 03:06 PM   #4129
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
Quote:
Originally Posted by daftcat View Post
I'm going to pass on adding that one. It doesn't seem like they update it all that frequently. That query came back with 25 videos with most of them being from 2011.

I'm also going to look at the categories I've already added and see if I can scale it back to the ones that seem most relevant and leave the rest for mlb.com.

I'm okay with being less complete but more relevant and current.
That's a good call. I just noticed they have what looks to be the new ad for the All-Star Game. As far as culling the overall list goes, that's not a bad idea anyway. They seem to be making it easier to discover the various videos they have so it makes sense to hit the video pages every now and then.
 
Old 06-14-2013, 03:29 PM   #4130
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by BostonPeng View Post
That's a good call. I just noticed they have what looks to be the new ad for the All-Star Game. As far as culling the overall list goes, that's not a bad idea anyway. They seem to be making it easier to discover the various videos they have so it makes sense to hit the video pages every now and then.
Originally, I was going to reproduce the video browser but then as there are categories all over the mlb.com and not just in the video section (as well as lots of categories that get updated seldom if at all), it has lost coherent order and flow. I've left the ones that get updated daily and moved as many of those towards the top as I could. Some of them I just guessed at relevance like All-Star game still seems like it might be more relevant than the Draft. I still have to implement the fetching of additional records so that someone interested in the draft could back to the older videos and watch the first round videos.

I checked in the changes if you want to see what's staying and what went. I also have instructions for adding new ones in MLBviewer/mlbConstants.py but that takes detective work with Firefox Web Console.
 
Old 06-14-2013, 07:18 PM   #4131
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Workaround for favorite team highlighting in stats for LA, Chicago, and New York teams in stats

Since MLBAM can't decide whether to use LA, LAN, or LAD for the Dodgers and similar aliases abound for the LA, Chicago, and New York teams, I have tried to standardize on what they call the file code. Stats however does not contain the file code. A temporary workaround to get favorite team highlighting working in stats is to just enter the two or three letter team code found in the Team column as a favorite. Stats is pretty much the only place where this will work.

A more permanent solution for me will be to remove all the aliases I have added to TEAMCODES and build a dynamic team_id to file code dictionary since team_id exists in the stats JSON. The second part of that is two lines of code. The first part will take some testing on my part to make sure that removing those aliases won't break anything else.

So adding 'favorite=la' and use_color=True will get the Dodgers highlighted in listings, scoreboard, and standings. Adding 'favorite=lad' will get Kershaw highlighted in ERA stats. (And just about every other stat once I implement sorting on other columns.)
 
Old 06-15-2013, 08:39 AM   #4132
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
It's surprising that they use so many different codes in so many different areas. I suspect it may be due to the fact that different people are responsible for different sets of data, but you'd think MLBAM would come up with a naming standard and enforcing it across everything the league codes. Unless they're specifically doing it to be a PITA on third-party devs, and I really hope that's not the case. Sometimes a third-party coder can come up with some amazing things, as we've seen with mlbviewer.
 
Old 06-21-2013, 07:24 PM   #4133
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Coming soon...

Stats standalone app is coming along nicely.

It has hitting and pitching leader boards (fielding will come later) with the ability to change the sort column, sort order, and league. It can be filtered to team. It can be changed from current season to all-time and the all-time view can be filtered to only active players (e.g. show me, of the active players, who has the most HR.) Each line of the stats is a player and so each player line can be expanded to career stats.

There are some things I have not yet figured out. All players are identified using a player_id but I have not figured out which query to use to look up a player_id by name.

There are some things not yet done that could be added later. There are rookie and milestone trackers, and triple crown leader boards which can be queried but I do not yet have the code for them. I also do not have displays past the OPS category for hitting or WHIP for pitching (e.g. the "Next Stats" categories on their website.) I don't have fielding stats. I don't have splits or postseason stats. I think I know how to get all of these, I just haven't added them in yet. Also, the career stats raw from the server have minor league stats. I remove these from display because it can get a bit confusing when there are only three letter team codes to display (like Buchholz' career stats is a mess with all his ups and downs and rehab stints. I may implement a toggle to show minors, majors, and both. While I'm at it, I could further add filters for career stats by team and by league. Or custom splits....

In other words, there is a ton that could go into the stats app that could have me coding through most of the next month (which is the month I have to pack my apartment for moving.) So instead of trying to do it all, I will likely release what I have now and let you guys tell me what you would like most.

I also realize that after the All-Star break, wildcard races are actually going to mean something which means a little more work needs to go into standings.

Last edited by daftcat; 06-21-2013 at 07:27 PM.
 
Old 06-24-2013, 11:21 AM   #4134
b0xii
LQ Newbie
 
Registered: Apr 2003
Distribution: Mint 15
Posts: 3

Rep: Reputation: 0
I'm not seeing Houston on the Standings view.
 
Old 06-24-2013, 12:29 PM   #4135
BostonPeng
Member
 
Registered: Jul 2009
Location: Boston, MA
Distribution: SolydK Testing + KDE 4.9.5
Posts: 113

Rep: Reputation: Disabled
Quote:
Originally Posted by b0xii View Post
I'm not seeing Houston on the Standings view.
I was able to see it at the bottom of the AL West, although I did have to scroll down in my usual terminal size. Here's a screenshot with a full screen terminal.

https://dl.dropboxusercontent.com/u/...0standings.png
 
Old 06-25-2013, 04:14 PM   #4136
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by b0xii View Post
I'm not seeing Houston on the Standings view.
Winning percentage is too low to be displayed.

Just kidding!

All screens will scroll down to the next screen of display. If you don't see something on the screen, keep arrowing down. It may be on the next screen or the screen after that.

Similarly, all lines are now properly limited horizontally depending on your terminal size. Assuming you are using an xterm that can be re-sized (and not a console session (e.g. Ctrl-Alt-F1), if it looks like there is data being truncated, try resizing the terminal. Most screens have already been optimized for 80 character displays. But the new stats app coming out soon will go off the edge of an 80 char display and so you will need to maximize or resize to something wider to see all the columns.

I haven't figured out a nice clean visual representation that more records appear on the next screen that doesn't break the look of the current status bar. I was thinking either a [ 1 of 30] indicator or perhaps simply [-more-]. But then it's a question of where to put it. It would get in the way on the left side where I have Status: information and if I put it on the far right, it pushes all the other indicators over and starts to look busy down there. Plus it's precious real estate to have empty if there aren't more records to display and, at least to me, it would look odd to have the other indicators shift to the left and then shift back to the right if I only use that space when there really are more records to display. Hmm... Quick google search reveals two options. I can go with a [Top], [Bot], or [All] to indicate first screen, last screen, and all records in current screen with maybe a [...] for when it's not Top, Bot, or All (more screens up and more screens down.) The other option is there are Unicode characters to draw an actual scrollbar. In typical mlbviewer fashion, I will probably end up implementing one or both options with a config variable to select "vim" style (top, bot, all), "scrollbar", or "none" (leave it the way it is.)

Last edited by daftcat; 06-25-2013 at 04:20 PM.
 
Old 06-25-2013, 04:53 PM   #4137
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Support for the scrollbar characters is actually pretty crude. It does an ASCII approximation which amounts to ^ for up and v for down. I will simply implement [Top], [Bot], [All], [...] with a config option to enable or disable it. There are a lot of screens to do that in and I haven't been coding much recently. Something for later when KC's season falls apart.
 
Old 06-26-2013, 10:54 AM   #4138
b0xii
LQ Newbie
 
Registered: Apr 2003
Distribution: Mint 15
Posts: 3

Rep: Reputation: 0
Got Houston to show up. Had to install a newer version. Thanks!

One more question...I've started following a few Milb teams. What is the proper syntax for adding multiple favorite teams? Comma separated or what?

Thank you for such a great program...loving it!
 
Old 06-27-2013, 12:12 AM   #4139
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by b0xii View Post
Got Houston to show up. Had to install a newer version. Thanks!

One more question...I've started following a few Milb teams. What is the proper syntax for adding multiple favorite teams? Comma separated or what?

Thank you for such a great program...loving it!
Oh yeah. New version is better anyway. It updates in real-time instead of once a day. Getting the data from mlb.com rather than a third-party source.

For favorites (minors or majors), it's multiple lines, one per a line.

Quote:
favorite=oma

favorite=fre

favorite=slc

favorite=kc

favorite=det
For majors, just type ./mlbplay.py without any arguments and it will spit out the current two or three letter codes (until MLB changes them again.)

For minors, you can find out the three letter codes from the 'z' key (look at the home and away codes.)

For the game, with the listing of:

Quote:
9:30 AM: Nashville Sounds at New Orleans Zephyrs (Archived)
The 'z' key debug is:

Quote:
getListings() for current_cursor:
({'home': u'noz', 'away': u'nas'}, datetime.datetime(2013, 6, 25, 9, 30), [(u'',
u'588', u'27909233', ''), (u'', u'556', u'27909233', '')], [], None, 'F', u'201
3/06/25/nasaaa-nozaaa-1', u'media_archive')
So Nashville is 'nas' and New Orleans is 'noz'.
 
1 members found this post helpful.
Old 06-28-2013, 07:00 PM   #4140
CCRS8
LQ Newbie
 
Registered: Apr 2010
Location: NC, USA
Distribution: Xubuntu
Posts: 29

Rep: Reputation: 1
Been a long while since I posted in this thread. Just wanted to check in and thank you again for all your work. I got a Roku for the TV right next to my computer, so I hadn't been using mlbviewer for a season or two. However, now that the Phillies are horrible, I've been watching a second, more competitive game in the browser while the Phils pathetically lose on the TV. Got sick of the "full screen" mode of the browser player not staying full screen in one monitor when I start doing something on my second monitor, so today I just checked out the most up-to-date version of mlbviewer and things are good again. Better than ever. Thanks!
 
  


Reply

Tags
help, install, installation, instructions, seek, vlc, windows



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mlb.com gameday audio stream statmobile Linux - Newbie 6 05-06-2008 10:16 PM
link dies intermittently-seemingly at random- between win<->linux not linux<->linux?? takahaya Linux - Networking 10 03-09-2007 10:37 PM
triple boot linux/linux/linux No Windows involved toastermaker Linux - Newbie 12 03-02-2006 10:40 PM
Redhat (rhel v2.1) bootup problem with linux (linux vs linux-up) namgor Linux - Software 2 06-24-2004 02:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration