Skip to content

MichaelSafwatHanna/intern-botweet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧑‍💻 intern-botweet

I started a thread on my twitter account on my first day as a 3-month backend intern and decided to tweet about my everyday impression, so I thought I may build a custom twitter CLI client, that analyzes the tone of my tweet to tag each day with a numbered impression and then post it on behalf of me.

Used services

  1. IBM Watson's API

  2. Twitter API

Getting Started ⌛

  • Getting started with IBM Watson API

    • Get your keys and add them to services/tone_analyzer.py

      API_KEY = 'API_KEY'
      SERVICE_URL = 'SERVICE_URL'
  • Getting started with Twitter API

    • Create a Twitter App. Click the “Create New App” button and fill out the fields on the next page.

    • Once your app is created, you’ll be directed to a new page showing you some information about it.

    • Click on the Keys and Access Tokens tab on the top there.

    • At this point, you can add the keys which are under Your Application Tokens to test out your application, specifically at services/twitter.py.

      CONSUMER_KEY = 'CONSUMER_KEY'
      CONSUMER_SECRET = 'CONSUMER_SECRET'
      ACCESS_TOKEN = 'ACCESS_TOKEN'
      ACCESS_TOKEN_SECRET = 'ACCESS_TOKEN_SECRET'

Commands

Test

  • Synopsis
test [OPTIONS] [TWEET TEXT]
  • Description

    • Logs the tweet with tone analysis if stats option is included.
  • Options

    • -s, --stats Analyze tone of the tweet text and include it in the tweet.
    • -t Post the tweet without prompt.
    • -v, --verbose Logs metadata of the tweet after posting.

Tweet

  • Synopsis
tweet [OPTIONS] [TWEET TEXT]
  • Description

    • Post the tweet with tone analysis if stats option is included.
  • Options

    • -s, --stats Analyze tone of the tweet text and include it in the tweet.
    • -y Post the tweet without prompt.
    • -v, --verbose Logs metadata of the tweet after posting.

slti

  • Synopsis
slti [TWEET ID]
  • Description

    • Sets the last tweet id in the persistent cache.

rd

  • Synopsis
rd
  • Description

    • Prints remaining days and business days.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages