Code Monkey home page Code Monkey logo

twitter-personal-assistant's Introduction

MIT license PRs Welcome Open Source Love png1 Tweeting

Twitter Personal Assistant

Enter the Twitter Personal Assistant (TPA)! TPA is a CLI for developers who wish to access their Twitter account from the terminal. It enables you to tweet, like mentions and see a summary of your favorite account stats, all from the comfort of your terminal!

screenshot

Functionality

Once TPA is up and running, it can:

  • Post a tweet
  • Like new mentions of you
  • Check for
    • tweets you made directly on Twitter, after your first tweet from the command line.
    • new tweets or replies which mention you.
  • Store a local record of
    • your tweets since setup, excluding retweets.
    • your mentions since setup.
  • Update local record of
    • your tweets to reflect current state of tweets (Example: deletions, new likes and retweets, etc).
    • your mentions, to reflect mentions in their current state.
  • Count
    • total followers you have.
    • the number of times you have tweeted.
    • retweets received since your first tweet from terminal.
    • likes received since your first tweet from terminal.
    • number of mentions you liked since setup.
  • Display a summary of your account

๐Ÿš€ Getting Started

Prerequisites

  • Ruby
  • Twitter Account

Dependencies

  • Dotenv
  • Twitter
  • YAML

Setup

  1. Sign up for a personal twitter account if you don't have one. Apply for a developer account using your personal account here. Once approved, follow the instructions to create an app and generate its credentials. You'll need the credentials to successfully run or test this version of the app.
  2. Install Ruby
  3. Clone repo into your local environment using your favourite terminal:
git clone [this-repo-url].git
  1. Open project directory
cd directory-name
  1. Bulk install dependencies
bundle install
  1. Add .env to your gitignore file, then create a .env file. Copy the template below to your .env file, and fill in your app credentials generated from twitter. NOTE: This step is important to ensure your credentials remain protected and confidential.
export API_KEY=YOUR_API_KEY
export API_KEY_SECRET=YOUR_API_KEY_SECRET
export ACCESS_TOKEN=YOUR_ACCESS_TOKEN
export ACCESS_TOKEN_SECRET=YOUR_ACCESS_TOKEN_SECRET
  1. All set! Now start your TPA app
bin/main.rb
  • Congrats! You're in ๐ŸŽ‰

Limitations and Further Work

The Twitter API limits the number of tweets that can be retrieved from a user's timeline to the twenty most recent tweets. To accomodate this TPA starts to keep track of your Twitter activity only after you set it up. Aside from total followers and tweets, all prior activity is ignored. Some future work may include:

  • Tweets with media content
  • More robust storage of tweets and mentions, instead of locally updated .yml files
  • Store all user tweets and mentions before TPA setup
  • Deployment to Heroku for persistence
  • Integrated authentication system to get user credentials automatically

๐Ÿงฐ Tools & Technologies Used

  • Ruby
  • RSpec

Author

๐Ÿ‘ค Clifton Davies

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

  1. Fork it
  2. Create feature branch git checkout -b feature/fooBar
  3. Commit changes git commit -am 'Add some fooBar'
  4. Push to the branch git push origin feature/fooBar
  5. Create new Pull Request

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments

  • The Corgis!
  • Twitter

๐Ÿ“ Copyright & License

Copyright (c) 2020 Clifton Davies. This project is licensed under MIT. See LICENSE file for details.

twitter-personal-assistant's People

Contributors

cliftondavies avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

twitter-personal-assistant's Issues

Feedback from Team 73 - The Corgis

  • Great app. It shows good bases to support 'The Quality Code Bot' idea.
  • Clean code and good module/methods structure
  • Retweet likes are not working. Perhaps this way to look for them could spark ideas:
    @client.search("from:#{@user} #{@tweet_hash} -filter:retweets", result_type: 'recent', tweet_mode: 'extended').take(1).

Feedback from the Corgis - Team 73

  • We like the readme things to improve/add.

Include Tweets with media content
More robust storage of tweets and mentions, instead of locally updated .yml files
Store all user tweets and mentions before TPA setup
Deployment to Heroku for persistence
Integrated authentication system to get user credentials automatically

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.