pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

commit 69f00daf6a32c4f95e68f6a15e8fedbfe383cb34
parent 2bab3d611f88b04b594a4e14d4b53dfa10416356
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue,  4 Oct 2022 23:09:52 +0100

weeklymusictoot

Diffstat:
Aentry/weeklymusictoot.md | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/entry/weeklymusictoot.md b/entry/weeklymusictoot.md @@ -0,0 +1,21 @@ +For those that follow me on mastodon or twitter may have seen a #weeklymusictoot being posted on my feed over the last few weeks. + +This is an automated post which lists some of the music I listened to that week. + +My music player of choice is [cmus](https://cmus.github.io/){target="_blank" rel="noreferrer"} and one of the cool things it can do is run scripts on a song change or when the staus changes (pause, play, stop, etc.). + +I have seen people use this to display album artwork or send a desktop notification each time a song changes. There are plenty of examples on the cmus [wiki](https://github.com/cmus/cmus/wiki/status-display-programs){target="_blank" rel="noreferrer"}. In the cmus repository there is a script called `cmus-status-display` which outputs the currently playing song to a text file. I made some modifications to the script to display the output in my preferred way, and to display the name of the playlist the song is in if applicable. + +``` +``` + +Then I created a script which is run each Friday to take the contents of the music list and send out a toot on mastodon. + +``` +``` + +The second week this ran I found that the toot failed as the character count was greater than 500. I amended the script to sort the list by most entries, i.e. most played album, then count the characters and remove the least played album until the toot is viable. + +My mastodon and twitter accounts are linked using [TK](TK){target="_blank" rel="noreferrer"}, so soon after my automatic toot goes out it is tweeted as well. + +There is no real reason for this except being a bit bored for an hour so writing a tooting script. But maybe somebody will find some new music from it ¯\_(ツ)_/¯ .