Git Product home page Git Product logo

imgurbash2's Introduction

imgurbash2

imgurbash2 is a simple bash script that allows you to upload images and videos to imgur. Once an image/video is uploaded, the link is displayed on the terminal and copied to your clipboard (see below or refer to the manual).

Tested on Linux, macOS, FreeBSD and Windows (WSL).

Features

  • Upload remote HTTP/HTTPS images and videos to imgur.
  • Upload multiple images and videos at one go.
  • Upload images/videos to your album and to your account.
  • Delete previously uploaded images/videos.
  • Automatically images/videos deletion.
  • Copy uploaded images/videos' URLs to clipboard.

Usage

Upload Images

Upload the images named cow.png and fish.jpg to imgur:

imgurbash2 cow.png https://myserver.io/fish.jpg

The above command will output something like this:

http://i.imgur.com/HDVh123.png (Delete Hash = mo02q3r)
http://i.imgur.com/QCfh256.png (Delete Hash = blub1qx)

The outputted links are the URLs of the uploaded images. Such URLs are copied to your clipboard if the right programs are installed.

Upload Videos

Upload these two videos skunk.mp4 and raccoon.webm to imgur:

imgurbash2 skunk.mp4 https://10.0.0.1/web/raccoon.webm

Upload To Your Album

Upload the image named cow.png to your imgur album:

imgurbash2 -l -a abc134 cow.png

Delete Images

imgurbash2 ~/tmp/test.png
http://i.imgur.com/HDVh123.png (Delete Hash = vgdTM62vQ08xaxa)

To delete the above uploaded image:

imgurbash2 -d vgdTM62vQ08xaxa

Automatically Image Deletion

imgurbash2 -D 5m ~/tmp/test.png

Uploaded image will automatically be deleted after 5 minutes.

Manual

More examaples and a detailed manual is available at https://github.com/ram-on/imgurbash2/blob/master/examples.md. Details about the configuration file are also explained.

Installation

Linux / macOS / UN*X / WSL

curl -O https://raw.githubusercontent.com/ram-on/imgurbash2/master/imgurbash2
chmod u+x imgurbash2

Dependencies

Program Optional Reason
bash 4.0+ No To run this script. Given that macOS ships with an old Bash version, it is recommended that the latest Bash is installed via brew install bash
curl No Uploads images
xsel, xclip or wl-copy Yes Copies URL (image) link to clipboard if using Linux - no separate program is required for macOS

License

MIT License

imgurbash2's People

Contributors

ram-on avatar eyogi avatar cjbassi 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.