shitpost /SCHIT-pohst/ - a comment that contains nothing of intended value, but at the same time is not intended to troll with.
This script uses Markov chains to learn how to shitpost. Using a user-specified board, this script trains a Markov chain on all posts on all pages of said board and generates shitposts 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.
For a non-CLI version that runs in your browser, take a look at the web branch.
- 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 shitpost.
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