GithubHelp home page GithubHelp logo

ananthvk / imgur-cli Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

A simple tool in Go for uploading files to Imgur anonymously.

Home Page: https://github.com/ananthvk/imgur-cli

License: MIT License

Go 100.00%
api-client cli go golang imgur-api imgur-client imgur-upload

imgur-cli's Introduction

imgur-cli

A cli tool to upload and delete images on Imgur

Features

  1. Anonymous upload of images to imgur.
  2. Delete anonymous image uploads.

Installation

Execute

go install github.com/ananthvk/imgur-cli@latest

Getting the client id

This program requires a client id to work. Get a client id from https://api.imgur.com/oauth2/addclient

If you are on windows

set IMGUR_CLIENT_ID=[CLIENT_ID]

If you are on linux

$ export IMGUR_CLIENT_ID=[CLIENT_ID]
$ imgur-cli upload cat.png

Or

$ IMGUR_CLIENT_ID=[CLIENT_ID] imgur-cli upload cat.png

You can also place it in your shell profile, for example ~/.bashrc or ~/.zshrc

Usage

Anonymous upload of images to imgur

imgur-cli upload <path to image file>

Example

$ IMGUR_CLIENT_ID=xxxxxxxx imgur-cli upload TBJLzvUqnh4i6vtAnhCs--1--lvv9j_2x.jpg
Success: uploaded image to imgur!
Image URL: https://i.imgur.com/Sl0hhG1.jpg
Delete hash: xxxxxxxxxxxx
Please keep the above delete hash safe as it is required to remove the image from imgur.

Note after uploading, a delete hash will be shown. Please copy it as it is required if you want to remove the image in the future.

Delete uploaded images

imgur-cli delete <delete hash>

imgur-cli's People

Contributors

ananthvk 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.