Git Product home page Git Product logo

napolitan-bot's Introduction

Sometimes, you're really hungry and bored so you wrote a bot that posts images of food. Now Introducing:

Napolitan Twitter bot

Inspired by the Kagome spaghetti mascot Napoli-tan, This Twitter bot posts images of Japanese Naporitan(or Napolitan because L and R uses the same Katakana character in Japanese) Spaghetti hourly. Using the Google CSE Image Search API. So you can now have your favourite Japanese tomato sauce-filled spaghetti every hour!

Features!

  • Naporitan
  • Naporitan
  • Naporitan
  • Naporitan
  • Naporitan

Running your own instance

If you, for some reason, want to host your own instance of this simple Naporitan bot. You can! I mean the code is on here after all!

Prerequisites

  • Node.JS
  • Yarn Package Manager
  • Your own Google Custom Search Engine (CSE), along with it's ID and API key.
  • A Twitter Developer account, including the app and API key for said app.
  • Git (if you didn't clone this by downloading it as a ZIP)

Setup

After making sure you installed or have everything mentioned in the prerequisites, start by cloning this repository by typing this into your terminal

clone https://github.com/Cappuchino/napolitan-bot.git

Of course, you can skip installing Git and download this repo as a ZIP file and then extracting it somewhere.

Now, navigate your terminal to the repository folder. And download the Yarn packages by simply typing:

yarn

Wait for everything to download, and bada bing, bada boom. You have installed every Node.JS module required for this bot!

Now don't get ahead of yourself, the bot doesn't just magically know where your Twitter API key and your google CSE keys are. And now we are going to make it reconize them.

Make a file called .env, then put these things in it

TWITTER_CONSUMER_KEY=Your Twitter Consumer Key
TWITTER_CONSUMER_SECRET=Your Twitter Consumer Secret
TWITTER_ACCESS_TOKEN=Your Twitter access token
TWITTER_ACCESS_SECRET=Your Twitter access secret
CSE_ID=Your CSE Search Engine ID
CSE_API_KEY=Your CSE API key

Replace everything there with your own keys they gave you, obviously.

Now after that's done, all you have to do is run the thing! Go to your terminal. Hopefully it's still up. If it's not just navigate to your repo folder again. And simply run the bot! by typing in:

yarn start

Hopefully if everything's properly set up, Your Naporitan bot is now up and running!

This bot is powered by twitter-node and google-images.

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.