How to make your own Squawk service for news and alerts

Using Twitter, Tweetdeck, espeak and bashscript, set up your own squawk service

With financial squawk services costing anywhere from $50 to $500 a month, as a small retail trader I thought it had to be possible to knock something similar together myself, especially as they all compete with each other on Twitter nowadays to get the scoop.

It took a little while to get the script right, so as not to read out URLs or other events that pop up on the desktop (personal messages via chat platforms etc.) but it got there in the end. The other thing I had to do was strip the alerts right back to a handful of services. Then further down to 1 or 2. I found the one with the best signal:noise ratio for what I needed, and it seems to be an improvement over the paid audio one I have listened in on before - no pointless squawks about minor news, just the market-moving stuff.

So for the basic set-up, with no audio, just create a Twitter list, add the users you’ll need for alerts and use Tweetdeck to display desktop notifications when a new Tweet comes in.

The next stage, if you want those read out to you, is to pipe them through espeak. Fortunately for me my desktop manager i3wm uses dunst has an espeak option which accepts a scripted input.

The script itself checks if it’s already running, reads the title and body of the notification, ends if the title is one of a chat app, or strips the body of URLs if not, then pipes that output to espeak.

Could also be used for home automation alerts, weather reports, news headlines or anything you’d like to be audibly alerted to. Contact me for script details, but I can’t imagine many others have the exact same requirements!

Thanks for reading. I do translation from French and Swedish to English, so if that's useful to you, feel free to connect and message me on LinkedIn or Twitter.

Published by and tagged automation and forex using 296 words.