Skip to content

Steps for Running the Twindle CLI Application

Proful Sadangi edited this page Nov 8, 2020 · 12 revisions

Steps for running the Twindle Command Line Interface Application in Node.JS

  1. Twitter Developer Access: Please read Wiki Page for Twitter API Access for getting access from Twitter. Must make sure that the Bearer token is successfully copied over from Twitter.

  2. Create a .env file under twindle-cli folder: In the twindle-cli folder, one can see an example.env file. Create a new .env file and copy the example file's contents over and paste the bearer token from the first step. Make sure that the new .env file is not committed to git since it contains your bearer token - it is your responsibility to keep it safe.

  3. Install Node dependencies using the command npm install . (The package.json file under twindle-cli folder contains an attribute called dependencies. This contains all the dependencies. This command installs all of those.)

  4. Running the application: Use the following command:

node index.js -i <tweet_id> -f <file_format> -o <file_name_without_extension>

e.g.

node index.js -i 1323225367713255425 -o test

Currently, the output file is placed in a TwindleLibrary in the twindle-cli folder. The TwindleLibrary is where all the tweets(pdf) are saved.

This documentation may be updated if there are any further code changes. Please visit this page to check for modifications if you run into any issues. a) Edited to change step 3 to npm install which will install all dependencies.