Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ram-on authored Sep 23, 2018
1 parent a6e92e4 commit cd3ea47
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,39 @@ imgurbash2 is a simple bash script that allows you to upload images to
[imgur](https://imgur.com/). Once an image is uploaded, the link is displayed on the
terminal and copied to your clipboard (see below).

Tested on Linux and macOS.
Tested on Linux, macOS and FreeBSD.

## Features
* Upload remote HTTP/HTTPS images to imgur.
* Upload multiple images at one go.
* Upload images to specific album.
* Authenticate imgur user.
* Upload images to your album and to your account.
* Delete previously uploaded images.
* Automatically delete uploaded images.
* Automatically images deletion.
* Copy uploaded images' URLs to clipboard.

## Usage
### Upload Local Images
### Upload Images

To upload the image named cow.png to imgur:
```bash
imgurbash2 cow.png
imgurbash2 cow.png fish.png
```

The above command will output something like this:
```bash
http://i.imgur.com/HDVh123.png (Delete Hash = wef2q3r)

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

The first link is the URL of the uploaded image. This URL is copied to you clipboard
and hence you can use <kbd>CTRL</kbd>+<kbd>V</kbd> to paste it (provided that `xsel`
or `xclip` is installed on Linux - no separate program is required for macOS).

### Upload image to your album

To upload the image named cow.png to imgur album:
Upload the image named cow.png to your imgur album:
```bash
imgurbash2 -a abc134 cow.png
```
Image will be uploaded to album whose id is `abc134`. Note you most likely
want to enable authentication in config file (or via `--login true` option).

### Upload Remote Images

It is also possible to upload remote images (HTTP/HTTPS) to imgur:
```bash
# Upload the remote image fish.png and (local image) lion.png
imgurbash2 https://myserver.org/fish.png ~/lion.png
imgurbash2 -l -a abc134 cow.png
```

### Delete images
Expand All @@ -58,17 +49,16 @@ To delete the above uploaded image:
imgurbash2 -d vgdTM62vQ08xaxa
```

### Automatically delete images after specified delay
### Automatically Image Deletion
```bash
imgurbash2 -D 5m ~/tmp/test.png
```

Uploaded image will automatically be deleted after 5 minutes.

Note the deletion will be executed by backgrounded shell process,
which means it assumes your computer won't be halted/suspended
before the time has passed, and you still have external connection
in order to call imgur api.
### Manual
More examaples and a detailed manual is available at https://github.com/ram-on/imgurbash2/blob/master/examples.md.


## Installation
### Linux / macOS / UN*X
Expand All @@ -87,8 +77,7 @@ yaourt -S imgurbash2
| ------------------ | -------- | ------------- |
| `curl` | No | Uploads images |
| `xsel` or `xclip` | Yes | Copies URL (image) link to clipboard if using Linux - no separate program is required for macOS |
| `notify-send` | Yes | Provides notification messages; Linux |
| `growlnotify` or `terminal-notifier` | Yes | Provides notification messages; macOS |


## License
[MIT License](https://raw.githubusercontent.com/ram-on/imgurbash2/master/LICENSE)

0 comments on commit cd3ea47

Please sign in to comment.