Git Product home page Git Product logo

hanbok-trend's Introduction

Hanbok-Trend ๐ŸŒŸ

A Twitter Bot that creates wordclouds and tweets them. ๐Ÿฆ

This Twitter bot pulls tweets that include the keyword ํ•œ๋ณต (Hanbok: Korean traditional costume) every day at 00:00 and generates a wordcloud from them. It then tweets the wordcloud image.

After posting the image, the bot stores the image and CSV file containing the data of the tweet in the archive folder. ๐Ÿ“ (You can find all the images and CSV files posted by the bot in the archive folder)

Additionally, it has additional features such as creating a header based on the number of tweets that contain the keyword ํ•œ๋ณต and generating a graph from it. ๐Ÿ“ˆ

You can find the bot that was running this code for over half a year, but unfortunately, it is no longer active due to Twitter API changes that require a $100 payment. You can check it out here.

File Structure

Hanbok-Trend
โ”œโ”€โ”€ archive
โ”‚   โ”œโ”€โ”€ csv (CSV files containing tweet data)
โ”‚   โ”œโ”€โ”€ tags (Wordcloud images of hashtags)
โ”‚   โ””โ”€โ”€ words (Wordcloud images of tweets)
โ”œโ”€โ”€ header (Code for creating header images)
โ”œโ”€โ”€ media (Images for README.md)
โ”œโ”€โ”€ tweet_stream (Code for subscribing to Twitter Stream API)
โ””โ”€โ”€ main.py (Main code)

Setup ๐Ÿ› ๏ธ

  1. Clone this repository
  2. Install dependencies
    pip install -r requirements.txt
    
  3. Create a Twitter app and obtain the API keys
  4. Run main.py (You can use run.sh)
  5. If you want to use the header feature, you must run tweet_stream/main.py, which will subscribe to the Twitter Stream API and save the data to a Redis database.
  6. To install Redis, check here.
  7. After running tweet_stream/main.py, you can run header/main.py, which will create header images based on the data in the Redis database.

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.