An alternative splitting algorithm for publishiza

My friend John built plugin for writing tweet storms in WordPress. I’ve now used it to tweet storm about salary negotiations and WordPress committer stats in 2016. I like it, but I wasn’t super happy with how it split up the the post into individual tweets. It essentially just splits it up so that each tweet is whole words and doesn’t exceed 119 characters. It also adds an ellipsis at the end of every tweet. So I decided to build my own version that prioritizes whole sentences.

My tweet splitting algorithm first splits the post by sentences.  It then tries to build tweets and prioritizes keeping sentences intact.  My thinking is that this helps the tweets stand on their own a bit more.  If you want to use this, download and activate both publishiza and the gist below as plugins.

Leave a Reply

Your email address will not be published. Required fields are marked *