A Twitter bot, posting a random photo from the predefined folder. Additional to the picture, it attempts to gather other image metadata from its EXIF data and image content recognition using TensorFlow. The metadata is introduced as hashtags for reaching a broader audience, because who doesn't like likes and hearts <3
Tweet example:
🏠 Homepage
git clone https://github.com/hubacekjirka/dailyPhotoTwitterBot.git
docker build ./app --tag hubacekjirka/photooftheday
For container debugging use Dockerfile_debug configuring debugpy and letting the script wait for debugger attachement:
docker build ./app --file ./app/Dockerfile_debug --tag hubacekjirka/photooftheday
docker run -p 5678:5678 hubacekjirka/photooftheday
In VS, setup path mapping in launch.json (local and remoteRoot need to fit on each other, otherwise breakpoints get disabled):
"configurations": [
{
"name": "Python: Remote Attach",
"type": "python",
"request": "attach",
"connect": {
"host": "localhost",
"port": 5678
},
"pathMappings": [
{
"localRoot": "${workspaceFolder}/app/src",
"remoteRoot": "."
}
]
},
Map Docker host photo folder to the guest (when not using S3)
docker run --volume /PathToThePhotoFolder/photos:/app/src/photos \
-it hubacekjirka/photooftheday
The bot expects the following folders in the '/PathToThePhotoFolder/photos' foder:
- 'backlog' - photos to be posted
- 'usedPhotos' - succesfully posted photo
👤 jiri hubacek
- Twitter: @hubacekjirka
- Github: @hubacekjirka
- kefranabg: Readme generator
- Sagar Sharma: Tensor Flow
- Miguel Garcia: How to Make a Twitter Bot in Python With Tweepy
Give a ⭐️ if this project helped you!
Copyright © 2019 jiri hubacek.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator