Skip to content

A simple tool for pictures uploading built by golang

License

Notifications You must be signed in to change notification settings

betterfor/gopic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gopic

简体中文

According to PicGo

GoPic is a terminal tool for quickly uploading images and getting URL links to images.

Support Image Gallery:

  • github

  • gitee

  • smms

  • qiniu

  • imgur

  • aliyun

  • upyun

  • tcyun

All support image gallery is here, you can develop third-part plugins with core, welcome to give me PR.

Quick Start

Download and install

go get -u github.com/betterfor/gopic

Show help:

$ gopic -h
Gopic is a tool for uploading images.
It's easily, quickly, conveniently.
After your uploading images, you can get a link to save in your blog|markdown|article...'

Usage:
  gopic [command]

Available Commands:
  config      configuration
  help        Help about any command
  upload      upload local file to remote before completing setting

Flags:
      --config string   config file (default is $HOME/.gopic/config.yaml)
  -d, --debug           Help message for debug
  -h, --help            help for gopic

Before upload:

$ gopic config set [key]=[value]

require is replace '*'

github

  • repoName(*): the name of warehouse, example: username/repo
  • branch: project branch, default is master
  • token(*): github personal access tokens
  • path: storage path in github, default is images
  • customUrl: convert url to custom url, example: https://xxx.com
  • enableTimeFile: bool, after path, use date, like 2016/01/02

gitee

  • repoName(*): the name of warehouse, example: username/repo
  • branch: project branch, default is master
  • path: storage path in gitee, default is images
  • email(*): user email in gitee
  • password(*): user password in gitee
  • clientId(*): api clientId for generate accessToken
  • clientSecret(*): api clientSecret for generate accessToken
  • enableTimeFile: bool, after path, use date, like 2016/01/02

aliyun

  • bucket(*): storage bucket, example: oss-cn-beijing
  • area(*): storage area
  • accessKeyId(*): access key id
  • accessKeySecret(*): access key secret
  • customUrl: custom domain name, example: https://xxx.com
  • path: storage path, example: img/

imgur

qiniu

  • accessKey(*): api access key
  • secretKey(*): api secret key
  • bucket(*): storage bucket
  • area(*): storage area, example: z0
  • url(*): access to the address, example: http:https://xxx.yyy.glb.clouddn.com
  • option: url suffix, example: ?imageslim
  • path: storage path, example: img/

smms

  • token(*): token

tcyun

  • secretId(*): api secret id
  • secretKey(*): api secret key
  • appId(*): app id, example: 1234567890
  • bucket(*): storage bucket
  • area(*): storage area, example: tj
  • path: storage path, example: img/
  • customUrl: custom domain, example: https://xxx.com

ypyun

  • bucket(*): storage bucket
  • operator(*): setting operator
  • password(*): operator password
  • url(*): custom domain: example: http:https://xxx.test.upcdn.net
  • options: url suffix, example: imgslim
  • path: storage path, example: img/

support typora upload

After configure gopic, use typora settings

File->Preferences->Image->Image Upload Setting->Image Uploader select Custom Comman, Command file in gopic upload,test Test Uploader

typora upload

LICENSE

Apache 2.0

About

A simple tool for pictures uploading built by golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages