Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

centered text in get_img_for_tweet.py using textwrap #116

Merged
merged 4 commits into from
Oct 21, 2020
Merged

centered text in get_img_for_tweet.py using textwrap #116

merged 4 commits into from
Oct 21, 2020

Conversation

misterdabu
Copy link
Contributor

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.

Copy link
Owner

@VickiLanger VickiLanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, there are a lot of files that changed here. Typically, pull requests should focus on one thing.

  • I haven't used textwrap before. Good idea
  • What are all the pycache files for? Are they necessary?
  • What is the purpose for the changes to tweet.py?
  • Thanks for fixing the spelling in the comments

@misterdabu
Copy link
Contributor Author

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.

Copy link
Owner

@VickiLanger VickiLanger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thanks for all your work


Don't forget to follow the bot on Twitter to see the hard work you put in.

@VickiLanger
Copy link
Owner

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!

@VickiLanger VickiLanger merged commit 340c040 into VickiLanger:production Oct 21, 2020
@misterdabu misterdabu deleted the 109 branch October 21, 2020 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants