Awesomebox is a little Flask-based Python web app to play theme-song mp3s at the push of a button (bookmarked URL) for any time it's appropriate to broadcast your awesome skillz to your immediate area. This is just a little thing I whipped up for fun while working, it's not robust, it's not altogether "finished" (i.e. there's more I want to add to it and error checking is lacking). But feel free to fork it and rock out some improvements. Please share your improvements via pull requests!
- python
- pygame - to play theme songs
- sqlite3 - to store user ids
- sqlalchemy - to do queries in a cleaner way
- flask - to serve up the app
- eyeD3 - to handle mp3 metadata
I've got this app running on a little Dell netbook running Ubuntu 8 connected to some speakers. You have to
start the app as a user in the audio group so that sounds can be played on the box. Otherwise, simply grab
the code, run python awesome.py
and the app's live. I like to alter my hosts file so that I map the IP address
of the awesomebox to "awesomebox".
Assuming that the sever is called awesomebox:
- Visit
http://awesomebox/init
to initialize the database - Visit
http://awesomebox/register
to register as a user- Add your name
- Choose a theme song
- Click Register!
- Play your first theme
- Visit
http://awesomebox/<username>/1
to play your first themesong
- Visit
- Use your profile to change your themes or add new ones
http://awesomebox/<username>
will take you to your profile page