guilhermesmartins / insta-bot

Bot that receives (or find by itself) a phrase, edit an image with the phrase and post it on instagram in portuguese and english

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Insta-Bot

Bot that receives (or not) a phrase, edit an image with the phrase and post it on instagram in portuguese and english

Description

This project utilizes 4 bots plus ImageMagick to insert a phrase into an image, the author of this phrase and post the image on Instagram. A post request is made to the backend, and the bot will see if there is a unused phrase on the mongodb database (I've made a Telegram Bot to insert images, you can access it here). If there aren't, the backend will call a bot to scrap an phrase and author from the website pensador.com. After getting the content, the picture bot will get an random image in the dimensions 1050x1040 from lorem picsum and save it on the temp file, with size optimized. Soon after the image bot ends, a translator bot will be called to translate the phrase to portuguese and english and returning the text translated. With the new two texts, the exec function will be called and ImageMagick will build the image with some effects, the texts translated, a label for the author and save it on the uploads folder. So, the instagram bot will be called to post the images on a english and portuguese profiles. To finish, the backend will clean the two folders, uploads and temp.

Installation and How To Run

To run this work, you will need ImageMagick and GraphicsMagick on your machine. Although its not required, to build the images I've used the Roboto-Black and Bebas-Neue-Regular fonts. After installed Image and Graphics Magick, download/clone this repo and run npm install to download the dependencies needed for this project. After that, run npm start to run the application and do a post request on the '/image'.

About

Bot that receives (or find by itself) a phrase, edit an image with the phrase and post it on instagram in portuguese and english


Languages

Language:TypeScript 94.5%Language:JavaScript 5.5%