VickiLanger / LGBTQ-of-the-day-bot

Twitter bot tweeting fun goofy lgbtq things and queer history of the day
https://twitter.com/LGBTQotd
GNU General Public License v3.0
82 stars 173 forks source link

centered text in get_img_for_tweet.py using textwrap #116

Closed misterdabu closed 3 years ago

misterdabu commented 3 years ago

I tried to maintain the existing calculation details (i.e.: 35 character length / centered for loop checks for <20 char and >286) and focus only on dynamically determining the center and the offset given the image. I've replaced the individual checks for character length per line with the python texwrap function which does some of the heavy lifting. Hope this helps.

misterdabu commented 3 years ago

Sorry about that. The pycache should have been excluded from push. Forgot to add that to my gitignore. I'll revert the changes to the tweet.py and resubmit. I didn't intend to edit it. I was testing the twitter functionality, but on Windows used dotenv instead of environ[] which had a few changes.

Thanks for checking it.

VickiLanger commented 3 years ago

I figured as much that the pycache files weren't necessary, but thought I'd ask because I don't know everything. Thanks for your contribution!