8
votes
What programming/technical projects have you been working on?
This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?
I just finished Musyca.
It is a little software written in Python that works as a personal last.fm/audioscrobbler. I wrote to use with cmus, but it can work with any music player that outputs information.
Usage: musyca.py --artist "artist name" --album "album name" --title "song title"
It requires sqlite3.
It will record artist name, album name, song title and the date you listened to the song. Super simple because databases are not something i'm good at. It does nothing more right now.
I'm still debating if the application should output formatted data like top 10 songs or if i keep it that way and write external apps to handle that.
Maybe a TUI app or a web page to collect data from the database and show statistics.
Any ideas?
This is pretty cool. I used to use Audioscrobbler back in the day, before they turned it into last.fm, but it never occurred to me to make a local database. Nowadays I'm streaming most of the music I'm listening to though, so getting the artist and album information out might be tricky...
As for a user interface: I haven't had the opportunity to play with it myself, but Datasette seems to be a nice way to slice-and-dice an SQLite database.
Edit: I just tried loading the musyca-created database in Datasette and it works reasonably well. It doesn't like that your artist table ist called "artists" while the "albums" table tries to reference "artist" (singular), but it still works. Without plugins it doesn't seem to display much in the way of statistics, but there might be a suitable plugin in the 50+ that the project supports.
I'll take a look into datasette. Thanks!
Not a lot of people play music locally anymore, but i think they are still around. Specially within Linux users.
playerctl can control a lot of players and extract metadata, including spotify.
Hacking something fast:
Thanks! I just fixed it.
I've started to work on Uniform. It is mainly a project for me to learn some Rust, but it might eventually actually be useful. The idea is to standardise a lot of how a frontend looks and works so that development can focus on business logic while users get a predictable UI.
I think rust is probably not the perfect tool for writing this kind of tool where there is a lot of string wrangling and the final output is a lib for whatever backend language one uses. Fun non the less!