GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bnaul/flinchbot: Python {Twitter,Slack}bot which attempts to replicate the madness of @johnflinchbaugh. Main components are a Markov random text generator and a Google App Engine cron script that responds to mentions and posts tweets.

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
app.yaml
app.yaml
 
 
appengine_config.py
appengine_config.py
 
 
flinchbot.py
flinchbot.py
 
 
main.py
main.py
 
 
markovgen.py
markovgen.py
 
 
messageparse.py
messageparse.py
 
 
six.py
six.py
 
 
slackparse.py
slackparse.py
 
 
tweet_dumper.py
tweet_dumper.py
 
 

Repository files navigation

Synopsis

Python Twitter bot originally intended to replicate the in{,s}anity of @johnflinchbaugh. Primary components are:

  1. markovgen.py: class that reads in a plain text corpus and generates random sentences based on the input
  2. flinchbot.py: class that connects to a Twitter account, checks for and responds to mentions, and occasionally posts a random tweet
  3. main.py: Flask app that responds to HTTP GET's with random messages
  4. messageparse.py: script for extracting messages from a Facebook data dump messages.htm file and outputting plain text
  5. slackparse.py: script for extracting messages from a Slack zip archive and outputting plain text

Examples

  1. python markovgen.py -n 12 -c 3 < input.txt: generates a random fragment of (at least) 12 words where each 3-token phrase appears somewhere in the input file
  2. python flinchbot.py: responds to any new mentions and posts a new tweet with some small probability
  3. python messageparse.py -n 'John Fontana Flinchbaugh' < messages.htm: processes Facebook messages and extracts plain text contents of messages from John Fontana Flinchbaugh

Possible Extensions

  1. Cache data structure somewhere so that it doesn't have to be constructed from text each time. More complicated logic like the above idea would likely require this to avoid excessive computational cost.

References

  • Flask app code adapted from https://github.com/pistatium/python_slack_bot.

About

Python {Twitter,Slack}bot which attempts to replicate the madness of @johnflinchbaugh. Main components are a Markov random text generator and a Google App Engine cron script that responds to mentions and posts tweets.

Resources

Readme
GPL-3.0 license
Activity

Stars

1 star

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.