Giter VIP home page Giter VIP logo

spacex_smartweets's Introduction

SpaceX Smart-Tweets

A simple tweet processor for automatically and intelligently sorting tweets related to SpaceX.

Dependencies

  • Requires Python >= 3.6
  • Requires the following python modules in environment:
    • os
    • python-twitter
    • re
    • json
    • requests
    • time
    • pytz
    • datetime
    • nltk

Install

  1. Begin in your home folder:

    cd ~

  2. Create a new folder named "github" and enter it:

    mkdir github && cd github

  3. Clone the repo and enter it:

    git clone insert-repository-url-here && cd spacex_smartweets

  4. Install NLTK modules:

    echo -e "import nltk\nnltk.download('punkt')\nnltk.download('averaged_perceptron_tagger')\nnltk.download('wordnet')" | /path/to/python

  5. Create empty text files:

    touch log.txt seen_tweets.txt keys.json

  6. Populate "keys.json" file with the following entries:

    {
        "twitter": {
    	"consumer_key": "twitter_consumer_key_here",
    	"consumer_secret": "twitter_consumer_secret_here",
    	"access_token_key": "twitter_access_token_key_here",
    	"access_token_secret": "twitter_access_token_secret_here"
        },
        "discord": {
    	"webhook": "discord_webhook_url_here"
        }
    }
    

Run

  1. You can run the script manually:

    /path/to/python tweetsearch.py

  2. Or you can run it on a schedule with a cron task such as (insert the following into your Cron file):

    */2 * * * * cd /path/to/home/github/spacex_smartweets && /path/to/python ./tweetsearch.py

    NOTE: The above cron task will run every 2 minutes

spacex_smartweets's People

Contributors

codykingham avatar adamdenoon avatar

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.