
Host on Imageshack
Source (link to git-repo or to original if based on someone elses unmodified work):
Description:
A service menu to upload images on Imageshack.
0.2 version uses a log file in which saves images' name and url. Therefore, when you want upload an already hosted image, script get directly the url.
The tarball contains the .desktop file, the original script and an icon (modified version of Azureus' icon :-P ).
Requires CURL. Last changelog:
0.2 version uses a log file in which saves images' name and url. Therefore, when you want upload an already hosted image, script get directly the url.
The tarball contains the .desktop file, the original script and an icon (modified version of Azureus' icon :-P ).
Requires CURL.
#0.1
- Serivemenu created
#0.2
- Fixed bugs
- Uses xterm showing progress
- Uses log file (~/.imageshack_upload) to prevent double uploads
#0.4
- Optimized source code
- Fixed bugs
#0.5
- Hotlinks
Ratings & Comments
20 Comments
I've already sent a message to author about some improvements that I had add in script. Now it can upload multiple files at a time (when you select multiple files, right click on them and choose "Upload ...", script will upload all files in a kind of batch and display links to them in one window) I hope, author will accept my changes. While waiting, you may try package from here: http://ifolder.ru/9774614
For those who want the images uploaded from this script directly into their ImageShack accounts, attached herewith is the patch to make this possible. The diff has been generated against the original imageshack_upload file available in the tarball. In order for this to work, you will have to manually change the xxxxxxxxxxxxxxxxxxxxx in the patch to your myimages property. This particular property can be either found in the confirmation e-mail you received from imageshack when you were confirming your registration. More specifically, in the registration link http://my.yfrog.com/setlogin.php?login=xxxxxxxxxxxxxxxxxxx The alphanumeric number after the login= can be copied and pasted directly into the myimages parameter in the patch. Or you can get the myimages parameter from any sniffing utility. This particular parameter is stored in a cookie during login and is subsequently used on next uploads. Here is the patch: --- imageshack_upload.bak 2008-12-17 17:46:35.000000000 -0500 +++ imageshack_upload 2008-12-17 17:53:59.000000000 -0500 @@ -112,7 +112,7 @@ if ! [ -f "$img" ]; then fi #upload file -$curl -H Expect: -F fileupload="@${img}" -F xml=yes -# "http://www.imageshack.us/index.php" > $tmpfile +$curl -b "myimages=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H Expect: -F fileupload="@${img}" -F xml=yes -# "http://www.imageshack.us/index.php" > $tmpfile #resolve url url=$(cat $tmpfile | grep -E "<image_link>(.*)</image_link>" | sed 's|<image_link>\(.*\)</image_link>|\1|') url=${url// /} Hope this helps someone. Cheers!
Thanks for the program! (My girlfriend want to send you a kiss!) ;) Also, she found that she can't send any img from a directory named with the char " ' ". Small bug?
is there a way to upload images to an account? so you can see them on http://my.imageshack.us/v_images.php
I've usually do screen shots, and I'm saving them as "asd.png" file, so the "already hosted" condition is somekind half-working. Instead of simply filename matching, there should be filesize or even md5 matching, to find if it really was submitted :) Regards, vip
This is a very useful script for me! Congrats :)
me again, I found out that apparently images with spaces in its filenames fails the "already uploaded" check. From my ~/.image_shack file 'KEW7 design.gif'|http://img456.imageshack.us/img456/127/kew7designzg0.gif 'KEW7 design.gif'|http://img393.imageshack.us/img393/1188/kew7designtc8.gif I uploaded the last image without getting any warning. May it be because imageshack deletes the space on its urls?
I see that images are uploaded anonymously, it is possible to upload images into your account for those that are registered on ImageShack?
Hi This is what I've been looking for but it would be better if it would give you the link for the thumbnail also. For example, an image that I just uploaded via the imageshack website gave me 3 urls. 1)<a href="http://img512.imageshack.us/my.php?image=save3zn1.png" target="_blank"><img src="http://img512.imageshack.us/img512/3532/save3zn1.th.png" border="0" alt="Free Image Hosting at www.ImageShack.us" /></a> 2)[URL=http://img512.imageshack.us/my.php?image=save3zn1.png] [IMG]http://img512.imageshack.us/img512/3532/save3zn1.th.png[/IMG][/URL] 3)url=http://img512.imageshack.us/my.php?image=save3zn1.png] [img=http://img512.imageshack.us/img512/3532/save3zn1.th.png][/url] These are useful because I can just copy them and paste them into a forum. Any chance this could be included into your script? All the best Dave
Thanks for the idea! I added this feature in 0.5
But for me it still not work: root@fradeve-desktop:/home/fradeve# imageshack_upload avatar72038_1.gif.jpeg cat: /root/.imageshack_upload: Nessun file o directory /usr/bin/imageshack_upload: line 91: -H: command not found Error: file not uploaded :(
quote from the readme: ~/.kde/share/apps/{konqueror|dolphin}/servicemenu for me it's servicemenus and not servicemenu, i don't know if that's normal, others?
I fixed it now, thanks
On my Kubuntu 6.06 with KDE 3.5.4 it worked prefectly. Now I've tried to install it in my Kubuntu 6.10 with KDE 3.5.6 and it gives me the popup windows with a empty message; I've tried to run it from shell and this is the result: root@fradeve-desktop:/home/fradeve/Varie# imageshack_upload aiglx5.jpg /usr/bin/imageshack_upload: line 72: -H: command not found Url of image on imageshack: Please help me, I love this ServiceMenu!
The line 72 (or 91 in 0.2) is the CURL comand. May be in your new Kubuntu curl are not installed by default. Try with: sudo apt-get install curl
This one with KIM K Image Menu (http://www.kde-apps.org/content/show.php?content=11505) is great!
On 6.10 with kde no problem..just copy script in /usr/bin tnx..great ..:)
ubuntu 6.10 (kubuntu-desktop) line 72: -H: command not found sudo apt-get install curl
...very handy! Thanks! LocoMojo
Great script, thanks!