Why build a tweeting bot?
It all started with a fleeting idea and a tweet. Wait, don't all projects start this way?
Liquid error: internal
So, with 80% of respondents giving a positive reaction to the idea, I started to plan the project.
I started thinking about the goals, why I was building it, and how it could have a big picture impact. So, here's the main goal:
Have fun & meet other devs while learning and helping each other learn.
There is a secondary piece. I want to make it easy for people to take their first steps into open source contributions. I included a section on contributing in the readme.md
. This should make it a bit easier for someone new to contributing on GitHub.
VickiLanger / code-questions-bot
A Twitter bot who tweets code questions and trivia
Code Questions Bot & Tweepy
Vicki wrote this about Building the Code Question Bot
Mission
Have fun & meet other devs while learning and helping each other learn.
Contributing
If you would like to contribute, feel free to make a pull request.
First time? I suggest starting with adding a question to questions.py. Check out issue #5 for more details.
If you need more of a step-by-step, skim through this article about making your first contribution.
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Who Has Contibuted?
All contributions are greatly appreciated.
Reference Stuff
-
Tweepy Docs - An easy-to-use Python library for accessing the Twitter API.
Why are you doing it like this?
I could streamline this bot a lot by using txt files as…
Requirements
The bot was to be built with Python and Tweepy.
Previously, I made the Vets Who Code Bot. So, I already had some experience with Tweepy.
This bot was a little different because I was looking to update_status
. I spent a lot of time trying to figure out how to do this and made it out like it was going to be super complex. It turned out to be a rather tiny piece of code that actually does the work.
api.update_status(question)
Yup, that's pretty much it. There are a few other lines and some importing files to other files, but that's the statement that does the job.
What Next?
- Work on automating this follow-up tweet that I've been putting on each question.
- Add more questions
- Write a Dev.to post detailing the steps to making open source contributions with GitHub
Links
Here's the Code Questions Bot
Top comments (2)
I took a quick glance at the repository structure. One piece of advice I can give you right away is to add a
.gitignore
file to your repository to tellgit
which files it shouldn't track. You uploaded your__pycache__
to GitHub which doesn't belong there.Oh. Thanks for letting me know. I will add the .gitignore and remove the pycache
I knew something looked weird