LinuxQuestions.org
Review your favorite Linux distribution.
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 07-12-2008, 07:31 PM   #766
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Poll: Colors -- Yes or No?


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?

Last edited by daftcat; 07-13-2008 at 06:08 AM.
 
Old 07-12-2008, 07:59 PM   #767
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Second poll question and a sneak preview

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.)

You can download this code from:

http://www.eds.org/~straycat/mlbview...pha7pvt.tar.gz

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.

Code:
COLOR_BLACK
COLOR_RED
COLOR_GREEN
COLOR_YELLOW
COLOR_BLUE
COLOR_MAGENTA
COLOR_CYAN
COLOR_WHITE
The pair is foreground_color,background_color.

To enable this feature, you need to add:

Code:
use_color=True
to your config file.

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.

Thanks!
M

Last edited by daftcat; 07-13-2008 at 07:56 AM.
 
Old 07-12-2008, 09:31 PM   #768
Hertzy3
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Rep: Reputation: 0
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?
 
Old 07-12-2008, 09:43 PM   #769
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by Hertzy3 View Post
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.
 
Old 07-13-2008, 10:41 AM   #770
Hertzy3
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Rep: Reputation: 0
[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?
 
Old 07-13-2008, 12:46 PM   #771
Fugazi
Member
 
Registered: Oct 2003
Location: Denver
Distribution: Fedora 10
Posts: 53

Original Poster
Rep: Reputation: 15
Hey, look at this. A question I can answer.

You need to install simplejson. If your running Fedora, just use yum or the Add/Remove Software GUI.
 
Old 07-13-2008, 01:56 PM   #772
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by Hertzy3 View Post
[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.
 
Old 07-13-2008, 07:18 PM   #773
Hertzy3
LQ Newbie
 
Registered: Jul 2008
Posts: 6

Rep: Reputation: 0
Sorry, when I read the install file I saw python and I knew I had that, I must have skipped the simplejson part. Thanks for the help
 
Old 07-14-2008, 03:58 AM   #774
dmandell
Member
 
Registered: Apr 2008
Posts: 30

Rep: Reputation: 15
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?
 
Old 07-14-2008, 04:38 AM   #775
lephio
Member
 
Registered: Jun 2008
Posts: 46

Rep: Reputation: 15
revision 84: "there was a parser problem with the listings page"

new features: FAV and COLORS are great!
 
Old 07-14-2008, 06:29 AM   #776
fang2415
Member
 
Registered: Jan 2007
Posts: 195

Rep: Reputation: 15
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...
 
Old 07-14-2008, 07:06 AM   #777
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by lephio View Post
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.
 
Old 07-14-2008, 07:18 AM   #778
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by fang2415 View Post
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.
 
Old 07-14-2008, 07:22 AM   #779
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by dmandell View Post
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.
 
Old 07-14-2008, 08:09 AM   #780
daftcat
mlbviewer Maintainer
 
Registered: Apr 2008
Posts: 1,883

Rep: Reputation: 86
Quote:
Originally Posted by dmandell View Post
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.
 
  


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 01:39 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