[go: up one dir, main page]

Skip to content
/ imgbb Public

A command-line tool and Go package interface for upload images to ImgBB

License

Notifications You must be signed in to change notification settings

wabarc/imgbb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

imgbb

imgbb is a toolkit to help upload images to ImgBB.

Installation

Via Golang package get command

go get -u github.com/wabarc/imgbb/cmd/imgbb

From gobinaries.com:

$ curl -sf https://gobinaries.com/wabarc/imgbb | sh

Usage

Command-line:

$ imgbb
A CLI tool help upload images to ImgBB.

Usage:

  imgbb [options] [file1] ... [fileN]

  -k string
    	ImgBB api key, optional.

Go package:

import (
        "fmt"

        "github.com/wabarc/imgbb"
)

func main() {
        if url, err := i.Upload(path); err != nil {
            fmt.Fprintf(os.Stderr, "imgbb: %v\n", err)
        } else {
            fmt.Fprintf(os.Stdout, "%s  %s\n", url, path)
        }
}

License

This software is released under the terms of the GNU General Public License v3.0. See the LICENSE file for details.