A repository which contains two simple automation scripts for uploading images and screenshots to imgur, with no hassle.
Table of Contents
Installation is very simple, follow these smalls steps:
Download or clone the repository.
install.shscript in a command line (e.g. Terminal.app), like so:
- You can pass one argument to the
install.shscript, this argument is the directory where you to store your screenshots. The
install.shscript will call the
set_screenshot_dir.shscript, which will set your system screenshot directory path. For example:
./install.sh ~/Documents/Pictures/My\ Screenshots
- Since the automation scripts depend on imguru, the scripts will upload your images/screenshots to imgur anonymously; which may be of nuisance to some people. However, if someone wants to alter this repository to incorporate user uploads, they are more than welcome to.
This repository comes with two automation scripts: one to upload screenshots to imgur and two, to upload images that are already on your machine.
Uploading screenshots is extremely simple. Simply, take a screenshot and wait for it to upload. You can take a screenshot by pressing ⇧⌘3 (shift-command-3) to screenshot your whole screen or ⇧⌘4 (shift-command-4) to screenshot a region of your screen. A notification will be shown when the screenshot has been uploaded, and the link to to the image will be automatically copied to your clipboard.
Uploading images already on your machine
To upload images that are already on your machine, you can have two options:
- Use the command line to upload them
- Within finder (and other applications) you can upload them via services
The first option is quite simple, you just use imguru, like so:
imguru -d <path-to-screenshot>
and then copy the link it spits out. Alternatively, to copy to your clipboard you can
| pbcopy to the command, like so:
imguru -d <path-to-screenshot> | pbcopy
The second option is also quite simple, but with this option you can upload the image(s) you want multiple ways. All ways will show a notification once the image is uploaded and copy the link to your clipboard.
In Finder (and perhaps other applications that support this), you can:
- right click the image
- hover over “Services”
- Click the service called “imgur-upload”.
Top-bar Menu Option
In Finder, or any other Application (e.g. an alternative to Finder, or a photo browser), click the Application name up at the top bar.
Hover over the sub-menu called “services”
Click the service called “imgur-upload”
Setting up a Shortcut
I really reccomend setting up a shortcut to upload an image, as shortcuts save much time. To make a shortcut for the service, follow these steps:
- Open up System Preferences
- Click/type “Keyboard”
- Click the “Shortcuts” tab
- Click “Services”
- Scroll down to imgur-upload and click “add a shortcut” (or double click the existing shortcut to edit it)
- Type the key combination you wish to set as the shortcut, I personally use ⇧⌘I (shift-command-I).
How do I run install.sh?
Simply open up Terminal.app, under Applications/Utilities/Terminal.app. And then type the following commands:
<directory-to-repository-download> is the location you downloaded this repository (hint: you can drag the folder icon from finder to Terminal.app or use XtraFinder to “Open New Terminal Here”).
and then finally, type: