Welcome, Guest
Username: Password: Remember me

TOPIC: Upload to imgur from terminal (Linux)

Upload to imgur from terminal (Linux) 2 years 1 week ago #1

  • Bijay Sah
  • Bijay Sah's Avatar
  • Offline
  • Posts: 7
  • Thank you received: 8
Add this to your .bashrc:

## open it first
nano ~/.bashrc

imgur(){
for i in "$@";do
curl -# -F "image"=@"$i" -F "key"="4907fcd89e761c6b07eeb8292d5a9b2a" imgur.com/api/upload.xml|\
grep -Eo '<[a-z_]+>http[^<]+'|sed 's/^<.\|_./\U&/g;s/_/ /;s/<\(.*\)>/\x1B[0;34m\1:\x1B[0m /'
done
}

# safe it

# update bashrc with
cd ~;source ./bashrc

# enter in terminal the command imgur with the image filename you want to upload:
imgur imagename.png

# and it will be uploaded to imgur and the links be provided in stdout of the terminal
The administrator has disabled public write access.

Upload to imgur from terminal (Linux) 2 years 1 week ago #2

Awesome. It can come handy at sometimes.
Thank you! @Bijay.
Last Edit: 2 years 1 week ago by Swadesh Shanker Parasher.
The administrator has disabled public write access.

Upload to imgur from terminal (Linux) 2 years 1 week ago #3

  • Bijay Sah
  • Bijay Sah's Avatar
  • Offline
  • Posts: 7
  • Thank you received: 8
thanks for your support,you are welcome. :)
The administrator has disabled public write access.

Upload to imgur from terminal (Linux) 2 years 1 week ago #4

I used to upload images on imgur via terminal. but now I use digitfreak - image hub to host my images :)

It is awesome, reliable and fast.
It is very low profile/secretive project by digitfreak. www.digitfreak.com/i
The administrator has disabled public write access.
Time to create page: 0.437 seconds

Conversations

someone will have to first gift me an iphone, until then the reviews and words of others are the onl...
Great article ollie. Beautifully covered.
Can you send me a picture? Send me a link to the image or register to the website and send me a PM
Guest - brian
i have an old blackberry curve which has served me well for several years but now the image on the ...
Three times the capacity of Note 4? My, my, time to change the mobile, I guess!
Sign up via our free email subscription service to receive notifications when new information is available.