Building a macOS Menubar App for SomaFM Radio Stations

Blake Bradford Avatar

·

Introduction

In this article, we will explore how to build a macOS menubar app that allows users to play SomaFM radio stations. We will leverage the power of Python along with the rumps library and VLC media player to create an intuitive and convenient streaming experience for SomaFM enthusiasts.

Development Setup

Before getting started, make sure you have Python 3.9.x installed on your macOS system. Additionally, you will need VLC 3.x installed, which can be easily done using Homebrew with the command brew cask install vlc. Once these prerequisites are met, install the required dependencies by running pip3 install -r requirements.txt.

Building and Running the App

To run the app, simply execute the command python3 radiobar.py in your terminal. This will launch the menubar app, providing you with an interface to select and play your favorite SomaFM radio stations.

If you wish to distribute the app as a standalone macOS application, you can build it using the following steps:

  1. Remove any existing build and distribution folders by running rm -rf ./dist/ ./build/.
  2. Run python3 setup.py py2app to generate the macOS app package.

Once the build process is complete, you will have a standalone macOS app that can be distributed and installed on any macOS system.

Conclusion

By following this tutorial, you have learned how to develop a basic macOS menubar app for streaming SomaFM radio stations. This app provides a seamless and convenient way for SomaFM enthusiasts to enjoy their favorite stations. With the power of Python, rumps, and VLC, you have the ability to create custom features and enhancements to further personalize the app.

Feel free to explore the project repository for more information and to access the source code. Happy streaming!

References

License: MIT

Leave a Reply

Your email address will not be published. Required fields are marked *