This script uses Markov chains to learn how to post. Using a user-specified board, this script trains a Markov chain on all posts on all pages of said board and generates post on command. Also includes a random image from the same board. This doesn't actually post to 4chan.
This makes extensive use of 4chan's read-only JSON API.
- Python 3
- PyMarkovChain
- urllib
- Install the required dependencies if you don't already have them.
- Run
./shitposter.py
. - Enter a board to train on - ex. /a/, /b/, /co/, /tv/, etc.
- Once training is finished, hit enter to generate a post.
The command train
will re-train the Markov chain on the same board.
The command board <board>
will switch to the specified board.
The command exit
will exit the script.
- ChangedNameTo - Image-grabbing
- franzwr - Data pickling
- Tim La Roche - Python 3 support