Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm experimenting with a new configuration option called "favorite".
The idea is that it's often difficult for me to pick out my team in all the listings so it would be nice if there was a way to make my team always standout. One such way to do that is to underline the listings for any team that's listed as "favorite".
Another way to do that is to use colors. One drawback of using colors is that you have to initialize a foreground/background pair of colors. So, I'd likely have to provide you with an option for both foreground and background colors so you can match your xterm display. If you're using a color outside the range of curses 8 basic colors, you're just going to have to pick a color from the 8 and it's going to look funny against the rest. Of course, this is something of the idea of having it stand out in the first place. If you use transparency, it's not going to be transparent.
So here are some options to consider:
1. No colors. Of course, I can also add a "use_color" config file option that defaults "favorite" to underline if use_color is false. This is how I've currently implemented it.
2. 8 basic colors by name and have foreground_color and background_color applied globally while a favorite_color would be used as the foreground_color for listings with your favorite team(s).
EDIT: Originally thought I could define colors using RGB codes but so far, I haven't been able to get it to work.
One thing I can see happening with color support is that you could extend the color behavior to status codes, e.g. make the listings a different color (not just bold) for In Progress games, Archived Games, not yet started, and condensed game available.
So the big question is, do you guys even want colors or do you think this might pollute the interface?
Do you want times to prepend the matchups or keep it the way it is?
Prepend example:
Code:
10:05 AM: San Francisco Giants at Chicago Cubs (Archived)
10:07 AM: New York Yankees at Toronto Blue Jays (Archived)
12:55 PM: Arizona Diamondbacks at Philadelphia Phillies (Archived)
12:55 PM: Colorado Rockies at New York Mets (Archived)
12:55 PM: Minnesota Twins at Detroit Tigers (Archived)
4:05 PM: Baltimore Orioles at Boston Red Sox
4:05 PM: Chicago White Sox at Texas Rangers
4:05 PM: Cincinnati Reds at Milwaukee Brewers
4:05 PM: St. Louis Cardinals at Pittsburgh Pirates
4:05 PM: Tampa Bay Rays at Cleveland Indians
You can try both changes in a private release (e.g. this will be 0.1alpha7pvt and the pvt means I offer no support on this release other than the couple of features I'm playing with in this release.)
I haven't fully implemented the color support. It's hardcoded to blue but if you search for COLOR_CYAN in mlbviewer.py, you can change COLOR_BLACK and COLOR_CYAN to any of the following:
I changed COLOR_BLUE to COLOR_CYAN in the private release because it is easier to read against a black background.
You also need to add a favorite line that uses the teamcodes (the same teamcodes that audio_follow uses but audio_follow and favorite do not have to have the same values.)
For me, that would look like:
Code:
use_color=True
favorite=la
favorite=kc
If you omit use_color or set it to False or 0, then your favorite teams will be underlined.
Let me know if you like either the colors option and/or the prepending times. Personally, I like prepending the times because it's easier to see them and it makes the text line up nicely.
Remember, this is a private release for evaluation only. No support will be offered on this release. If you like the changes, vote for them and if I get enough positive feedback, I'll check them into the svn tree.
Im new to linux, but I have been trying to get mlbviewer to work here. I know this is going to sound really stupid, but after I have installed it by python setup.py install how do I actually run it?
Im new to linux, but I have been trying to get mlbviewer to work here. I know this is going to sound really stupid, but after I have installed it by python setup.py install how do I actually run it?
Type 'mlbviewer.py' (without the quotes.) The first time you run it, it will create a config file. Make sure you edit that config file for your MLB.tv username and password and video_player preference. Run that same command again and you should get a listings screen after a couple of seconds. Now you're good to go.
Review the INSTALL and README files for more information about installation and the usage.
[root@Hertz ~]# cd /home/Alex/Download/mlbviewer-0.1alpha7
[root@Hertz mlbviewer-0.1alpha7]# ls
build INSTALL LICENSE.txt MLBviewer mlbviewer.py README setup.py test
[root@Hertz mlbviewer-0.1alpha7]# mlbviewer.py
Traceback (most recent call last):
File "/usr/bin/mlbviewer.py", line 3, in <module>
from MLBviewer import MLBSchedule
File "/usr/lib/python2.5/site-packages/MLBviewer/__init__.py", line 14, in <module>
from mlbtv import MLBSchedule
File "/usr/lib/python2.5/site-packages/MLBviewer/mlbtv.py", line 18, in <module>
import simplejson
ImportError: No module named simplejson
That doesnt seem right. Where is the config file I need to edit?
[root@Hertz ~]# cd /home/Alex/Download/mlbviewer-0.1alpha7
[root@Hertz mlbviewer-0.1alpha7]# ls
build INSTALL LICENSE.txt MLBviewer mlbviewer.py README setup.py test
[root@Hertz mlbviewer-0.1alpha7]# mlbviewer.py
Traceback (most recent call last):
File "/usr/bin/mlbviewer.py", line 3, in <module>
from MLBviewer import MLBSchedule
File "/usr/lib/python2.5/site-packages/MLBviewer/__init__.py", line 14, in <module>
from mlbtv import MLBSchedule
File "/usr/lib/python2.5/site-packages/MLBviewer/mlbtv.py", line 18, in <module>
import simplejson
ImportError: No module named simplejson
That doesnt seem right. Where is the config file I need to edit?
Save yourself some time and read the INSTALL file. That's what it's there for.
I like the favorites feature, it definitely makes your team's games easier to spot, though not in the case where your team's game is at the top of the list (because MLBViewer starts up with your team's game already selected). Perhaps you could also color the text of your favorite team when it's selected?
Just some quick poll responses (since that seems to be about as much help I can offer to this project!). I should mention that I haven't tried the private version, so these are just opinions rather than feedback, but with that in mind, my votes are:
Favorites: Ambivalent
Color: No
New time placement: Ambivalent yes
My thinking: Underlining can't hurt, but I don't find it that big of a deal to read through a dozen lines to find your team; and I think the time placement might be slightly better the new way but again I don't think it's a big deal. OTOH, I think color could make this start to look like on of those wildly over-designed cryptic curses interfaces -- I'd much prefer it kept sparse and simple. If we do go color, we *definitely* should ensure that the default won't break anything on monochrome displays. People (myself included) love that this program is flexible enough to enable baseball audio on devices with text-only displays, and we should keep encouraging that.
My $0.02, feel free to disregard if you get $20.00 the other way...
revision 84: "there was a parser problem with the listings page"
new features: FAV and COLORS are great!
No games on 7/14 (All-Star Break dead-zone). That's why you got that error. You should see games yesterday and tomorrow (the All-Star game itself), and none the next day. After that, the listings should be okay.
Just some quick poll responses (since that seems to be about as much help I can offer to this project!). I should mention that I haven't tried the private version, so these are just opinions rather than feedback, but with that in mind, my votes are:
Favorites: Ambivalent
Color: No
New time placement: Ambivalent yes
My thinking: Underlining can't hurt, but I don't find it that big of a deal to read through a dozen lines to find your team; and I think the time placement might be slightly better the new way but again I don't think it's a big deal. OTOH, I think color could make this start to look like on of those wildly over-designed cryptic curses interfaces -- I'd much prefer it kept sparse and simple. If we do go color, we *definitely* should ensure that the default won't break anything on monochrome displays. People (myself included) love that this program is flexible enough to enable baseball audio on devices with text-only displays, and we should keep encouraging that.
My $0.02, feel free to disregard if you get $20.00 the other way...
Yeah, I don't think I'm going to go crazy with color after all. Though I really do like the favorite team highlighting. If I do decide to implement a color scheme based on status codes, it will be completely optional.
Favorite team highlighting is an optional feature, and like every other optional feature, the motto is, "you don't lose it, if you don't use it." Or put another way, nothing happens unless you explicitly enable the feature. So those who are ambivalent or opposed should notice no difference while those who want and like the feature have two options: underline or color.
I definitely encourage you to test the private version if for no other reason than to say that without configuring the feature, nothing breaks for you.
If I don't get any terrible feedback in the next day or so, I'm going to check the code into svn. By the way, as an incentive to use the svn code (and trash the pvt release), I implemented fg_color and bg_color options in the config file for the 8 colors listed above so you can define your own highlighting color scheme (favorite team only) in the config file rather than hacking the source.
I like the favorites feature, it definitely makes your team's games easier to spot, though not in the case where your team's game is at the top of the list (because MLBViewer starts up with your team's game already selected). Perhaps you could also color the text of your favorite team when it's selected?
I can look into it. The original idea was that there is only so many curses flags you can lay on top of one another before some start to lose meaning. For example, reverse video tends to obliterate underlining. I actually don't know if reverse video and colors play well together but I guess there's only one way to find out. If I get figured out, it will go in an svn revision. Consider the private release a dead end release for evaluation purposes only.
I like the favorites feature, it definitely makes your team's games easier to spot, though not in the case where your team's game is at the top of the list (because MLBViewer starts up with your team's game already selected). Perhaps you could also color the text of your favorite team when it's selected?
Ooooh! Aaaah! I tested it and it looks sharp. But I'm going to have to wait until after the All-Star break to fully test it (e.g. to see what happens with 'In Progress' games.) No games today or Wednesday and the All-Star game is National Blackout. Thursday will likely be the first day I can test it with an 'In Progress' game.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.