1.0.6 • Published 8 years ago
trumpeteer v1.0.6
Trumpeteer
Introduction
Get the worst of @realDonaldTrump in your command line (and in your ears).
Install
npm install trumpeteer -gUsage
Step 1: Set Up Your Twitter Credentials
In order to read tweets, you need a Consumer Key, Consumer Secret, Access Token Key, and Access Token Secret.
You can get that credential information by creating a Twitter App.
trumpeteer setupThe setup command will look something like

trumpeteer uses node-keytar to securely save the credential information (for example, using keychain for OSX).
Step 2: Fetch (and Play) A Random Tweet
trumpeteer randomThe random command will look something like

trumpeteer uses the say package to output the tweet's text as audio.
How Does It Work
It's pretty simple:
- I cheat by using the
TrumpCriticizesTrumpsubreddit to essentially curate tweets - After filtering through the "top" Twitter posts
- I pick one at random
- Fetch metadata about the tweet from the Twitter API
- Log the tweet's text to the console
- "Play" the tweet's text using a text-to-speech API