trumpeteer
v1.0.6
Published
Trump tweets in your command line
Downloads
14
Readme
Trumpeteer
Introduction
Get the worst of @realDonaldTrump
in your command line (and in your ears).
Install
npm install trumpeteer -g
Usage
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 setup
The 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 random
The 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
TrumpCriticizesTrump
subreddit 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