GithubHelp home page GithubHelp logo

gargron / hot2bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from momosoftware/hot2bot

3.0 2.0 0.0 34 KB

Python Twitter bot framework for use with Cobe

License: GNU General Public License v3.0

Python 100.00%

hot2bot's Introduction

hot2bot

Synopsis

Python Twitter bot framework for use with Cobe

Currently:

  • Authenticates to Twitter or Mastodon
  • Grabs timeline since last run
  • Has Cobe learn the statuses
  • Tweets:
    • Decides whether or not to subtweet, subtweets by counting common words, choosing one of the most common words, using that as seed phrase in cobe
    • Uses seed phrase (or lack thereof if not subtweeting) to get a tweet from Cobe, posts that tweet

To Do

  • Save lastId to config file in case of restart (in prep for replies as to not spam on restart)
  • Test Mastodon integration more fully, expand readme with instructions for it
  • Reply to tweets w/ a random seed word from their tweet
  • Reply to DMs in a similar fashion
  • Make a proper config file done!
  • log to file instead of console
  • More options to decide how it functions
  • Possibly write to use Classes and Methods instead of Functions

Installation

Install Cobe:

  • git clone https://github.com/pteichman/cobe.git
  • Navigate to the cobe directory
  • easy_install cobe

Install Python-Twitter:

  • pip install python-twitter

Use hot2bot with Twitter:

  • Navigate to the hot2bot directory
  • Run cobe init to create a Cobe Brain for hot2bot to operate with
  • At the Twitter Apps page, create a new twitter app.
  • Give it a unique name, a description, fill in the hot2bot github page for the website. Leave callback blank, Accept the agreement, and click the "Create your app" button
  • On your app management screen, click the "Keys and Access Tokens" tab
  • Generate Access tokens. Take note of the Consumer Key, Consumer Secret, Access Token and Access Token Secret
  • Copy/rename config.default.conf to config.conf
  • Fill in the Consumer and Token info on the corresponding lines, without quotes.
  • Run with python main.py. It will begin learning from your timeline every minute and posting every 60 minutes. If you'd like it to post more often, change the tweetFrequency value in the config file

Credits

Credit to @Masaka_Arienai on Twitter for the name

Credit to @Gargron on Twitter and Github for the Mastodon integration

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

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.