Git Product home page Git Product logo

twitter-bot's People

Contributors

dependabot[bot] avatar jakoritarleite avatar

Stargazers

 avatar

Watchers

 avatar  avatar

twitter-bot's Issues

Watson Bot

Bot that sends the images to Watson and takes the objects at images.

  • Connect to IBM account using apikeys from watson.
  • Classify images by predominant color.
  • Send classified images to Watson.
  • Extract the Watson's response into the objects at images.
  • Classify images accorging to target objects file.
  • Return the best image to be posted.

Twitter Bot

Bot responsible to upload and tweet the images.

  • Connect to twitter account with apikeys.
  • Create an file to organize which image has been posted and which hasn't.
  • Verify if the target image hasn't been posted yet.
  • Upload images.
  • Tweet images.
  • Add the posted image to the file which organize the posted images.

Google Custom Search Bot

Bot that searches the image on internet.

  • Connect to cse account with respective apikeys.
  • Send a query request to image using topics.
  • Extract just the links from the images into an array.
  • Download each image from the links array.

Main Bot

Bot that uses the others.

  • Read file that contain topics to be searched.
  • Choose the next topic.
  • Search the topic using cse bot.
  • Classify images from cse bot using watson bot.
  • Post the best image from watson bot using twitter bot.
  • Repeat every 20 minutes.

Async functions

Incorrect execution order on orchestrator

  • Promises do not wait for the code execution.
() => {
    myFunction()
        .then(async function (response) { //Code execution })
        .catch(error => { //Code execution }) 
}

console.log('Finished.')

As in the code shown above, the log function will execute before then the Promise code.

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.