Code Monkey home page Code Monkey logo

imgbb's Introduction

Imgbb_Uploader

GitHub repo size GitHub language count

What is this all about?

This is a script to batch-upload images inside a directory to imgbb cloud. It will write the URLs returned by the API to a spreadsheet.

💻 Pre-requisites

Verify if you have Python 3.8.* installed. If not, checkout these resources:

  • Be sure to have correct version of Python 3
  • Create an account at imgbb and get one API_KEY.
  • Create a new file called .env and write your API_KEY on it. See the Example bellow

Installing Dependencies

Run on terminal, inside imgbb directory

pip install -r requirements.txt

⚙️ Config of .env file

Inside your .env file type the following

⚠️ NO SPACES BEFORE OR AFTER THE = SIGN

API_KEY=YOUR_API_KEY

☕ Using

Before any execution

Examples of the arguments of send_imgs function

send_imgs(full_folder_path:str, full_spread_sheet_path:str)

OS full_folder_path full_spread_sheet_path
Linux /home/user1/Documents/photos/ /home/user1/Documents/urls.xlsx
Windows C:\Users\user1\Documents\photos C:\Users\user1\Documents\urls.xlsx

To be able to launch:

Inside the imbb directory type the following on the terminal

Plataform Comand
Windows python sendImagens.py
Linux python3 sendImages.py

The Following messages should appear on your terminal:

Linux

demon_slayer UPLOADED SUCCESSFULLY!!!

FULL_PATH: /home/<user>/<Directory>/demon_slayer.jpg
URL: https://i.ibb.co/StX4kjY/demon-slayer.jpg

Windows

demon_slayer UPLOADED SUCCESSFULLY!!!

FULL_PATH: C:\Users\<user>/<Directory>/demon_slayer.jpg
URL: https://i.ibb.co/StX4kjY/demon-slayer.jpg




Português

💻 Pré-requisitos

Antes de começar, verifique se você atende aos seguintes requisitos:

  • Você instalou a versão 3.8.* Python 3
  • Criar uma conta imgbb and get one API_KEY.
  • Criar um arquivo chamado .env e colocar sua API_KEY. Veja o exemplo abaixo

Instalando as dependências

pip install -r requirements.txt

⚙️ Configuração do arquivo .env:

⚠️ SEM EXPAÇOS ANTES OU DEPOIS DO SINAL DE =

API_KEY=YOUR_API_KEY

☕ Usando

Antes de Executar

Examplos dos argumentos da função send_imgs

send_imgs(full_folder_path:str, full_spread_sheet_path:str)

OS full_folder_path full_spread_sheet_path
Linux /home/user1/Documents/photos/ /home/user1/Documents/urls.xlsx
Windows C:\Users\user1\Documents\photos C:\Users\user1\Documents\urls.xlsx

Para rodar o script:

No terminal, dentro do diretório imgbb digite:
Plaforma Comando
Windows python sendImagens.py
Linux python3 sendImages.py

A seguinte mensagem deverá aparecer no terminal:

Linux

demon_slayer UPLOADED SUCCESSFULLY!!!

FULL_PATH: /home/<user>/<Directory>/demon_slayer.jpg
URL: https://i.ibb.co/StX4kjY/demon-slayer.jpg

Windows

demon_slayer UPLOADED SUCCESSFULLY!!!

FULL_PATH: C:\Users\<user>/<Directory>/demon_slayer.jpg
URL: https://i.ibb.co/StX4kjY/demon-slayer.jpg

⬆ Voltar ao topo

imgbb's People

Contributors

felipemaced0 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.