This BitBar plugin displays the live score of a selected cricket match in your Mac menubar.
Inspired by, and much respect to, Anup Sam Abraham and his Live Cricket Scores plugin.
Anup’s plugin lets you see scores from several matches at once, whereas Cricket Bar focusses on one match at a time, as well as giving you the option to get scores from Cricbuzz in addition to ESPNcricinfo.
Install BitBar, if you haven’t already, and then install the Cricket Bar plugin from BitBar (or GitHub if the latest update hasn’t filtered through to the BitBar website yet).
PHP is installed and running on Macs by default these days, so Cricket Bar should work straight out of the box.
Please note that PHP can be a bit finicky about timezones. If you haven’t set up a PHP timezone, don’t panic, Cricket Bar will attempt to deduce what your local timezone is and get on with things. However, you may still wish to set your timezone manually – see below.
Select the feed
Choose between ESPNcricinfo or Cricbuzz using the Change feed menu item. Matches may be available on either or both of the feeds.
Select the match
Pick the cricket match of interest from the Current matches submenu.
The plugin is set up to refresh the scores once a minute. If you’re impatient you can use Refresh now for instant gratification.
The currently selected match can be switched off using Clear match selection. At some point after the match has completed, the match scores will automatically disappear anyway. Alternatively, choose another match.
When the Cricket Bar menu is open, press the Option key to show more information – such as tour, dates, ground, match type.
Cricket feed website links
ESPNcricinfo only – selecting the second line of the dropdown menu (the match status) will open the match page in your browser.
Both feeds – select ESPNcricinfo website… or Cricbuzz website… to open the relevant feed home page in a browser.
Despite best efforts, the timezone used by PHP may still not be right. Use the Your timezone menu to correct.
- long menubar displays (e.g. matches with two innings & scores per team) may “disappear” from the menubar. This is due to the menubar overflowing with other items and application menus. The workaround is to switch to an application with fewer menus, e.g. Finder
- home team not always first in menubar summary
- last wicket dismissal information not available (i.e. not provided by feed)
- duplicate entries in current match list (it’s the feed … honest)
- full team names rarely supplied, translations hardcoded but list not comprehensive
- feed provides only limited match types: TEST, ODI, T20 (blame the feed)
Let me know on GitHub or send me some feedback.
Under the bonnet
A couple of files are created in
bitbar.cricket_bar.config.php(a config file … which doesn’t need to be manually edited)