1.0.6 • Published 6 years ago

trumpeteer v1.0.6

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Build Status codecov npm_downloads npm GitHub release license

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 alt-text

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 alt-text

trumpeteer uses the say package to output the tweet's text as audio.

How Does It Work

It's pretty simple:

  1. I cheat by using the TrumpCriticizesTrump subreddit to essentially curate tweets
  2. 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