A dead simple Python script to output Spotify's current song to a text file/stdout.
To run the script:
python spotify-to-file.py
On Linux you can dettach the program so it runs on the background:
nohup python spotify-to-file.py &
The only dependency is SwSpotify:
pip install SwSpotify