There's a local “classic rock” station KFOX, usually on during a commute. I wondered how repetitive it actually was and (ab)used their "Now Playing" website widget to track songs/ads/promos.
-
There's a local “classic rock” station KFOX, usually on during a commute. I wondered how repetitive it actually was and (ab)used their "Now Playing" website widget to track songs/ads/promos.
- Backend data is a JSON blob (1st pic)
- Add a small shell script (2nd pic), run for 2 weeks
- Top songs in the 3rd pic
- Unique ones over 2 wk:$ jq -c 'select(.type=="Song")|[.desc,.title]' .history|sort|uniq -c|wc -l
372- Length of the tracks (see 4th image): 27h!
-
Oh, and the top and unique artists in 2w
$ jq -c 'select(.type=="Song")|[.desc]' .history | sort | uniq -c | sort -nr | head -n10
193 ["Queen"]
178 ["Led Zeppelin"]
157 ["Aerosmith"]
151 ["AC/DC"]
143 ["Journey"]
115 ["Foreigner"]
114 ["Pink Floyd"]
106 ["Van Halen"]
103 ["Tom Petty"]
98 ["Boston"]$ jq -c 'select(.type=="Song")|[.desc]' .history | sort | uniq | wc -l
120 -
@jochie Someday someone is going to snap. Just snap, I tell you, and patch sort in order to make "sort|uniq -c|sort -n" a single command line option.
But then someone else is going to argue (loudly) that it should have been done with uniq. -
@jochie @http Best link: https://github.com/timbray/topfew
Also now in homebrew