PyShare (imageshack/rapidshare/twitpic)

Nautilus Scripts

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

16
6.1
Description:

This scripts allows you to easily upload images, screenshots, or other files and gives you links for: IM, Forums, HTML, Direct, Forums Thumbnail, HTML Thumbnail and Twitter(rapidshare gives only IM Forums and HTML)


INSTALLATION:
1. unpack folder and run install.sh (It will link some of the files from unpacked folder to nautilius scripts).
2. install python-pycurl (if not already installed)
3. install scrot (only if you want to send screenshots, not needed for sending files)
For best lossless screenshot compression install also optipng and set 'filesize' to 0 in configuration dialog(not advised on slow computer with fast connection, strongly advised on strong computer with slow connection)

If above don't work try restarting nautilius

UPDATING:
a. overwrite old folder content with new one
b. unpack folder anywhere and run overwrite.sh (It will overwrite link in nautilius scripts folder)


DESCRIPTION:
sendFiles - sends selected image(s) to your preferred uploader(imageshack ot twitpic) and other files to rapidhshare - if no file is selected shows empty window on which you can drop files
sendDesktopScreenshot - takes screenshot of desktop and send it to your preferred uploader(imageshack ot twitpic)
sendWindowScreenshot - takes screenshot of clicked window or takes screenshot of selected area(note: first run this script, then click on window/select area)
PyShare_GTK - shows PyShare window. You can drop images on it, or take screenshot from there.

EXAMPLES OF USE:
http://www.youtube.com/watch?v=b9Qz7WBx310
http://www.youtube.com/watch?v=eupQh9ppcQI
http://www.youtube.com/watch?v=0K_0RrzszDo


Errors are logged to ~/.pyshare/errorLog
bugtracker: https://bugs.launchpad.net/pyshare

TOS:
Imageshack, Twitpic and Rapidshare are registered trademarks. You have to agree to their TOS http://reg.imageshack.us/content.php?page=rules http://twitpic.com/terms.do http://rapidshare.com/agb.html to use their services.

IF YOU WANT TO HELP:
-donate
-help with translations: https://translations.launchpad.net/pyshare/
-help with artwork: http://naicik.blogspot.com/2010/02/pyshare-needs-you.html
Last changelog:

10 years ago

v0.6.2
-new translations
-fix saving credentials multiple times in keyring

v0.6.1
-fix crash when translations are not found
-add IT and SV translations from launchpad
-minor refactor

v0.6.0
-added uploading to Twitpic (requires account - see settings>accounts)
-fixed rapidshare uploading
-uploading as user to imageshack now possible (see settings>accounts)
-added plugin API
-added possibility to choose preferred uploader for filetype

changelog archive: http://ee.o12.pl/kacprzak/download/gnome-look/changelog.txt
more at http://bazaar.launchpad.net/~pyshareteam/pyshare/main/changes

Guevara76

12 years ago

The package optipng is not installed on my Ubuntu, after installation appears this error:

guevara@guevara-desktop:~$ python .gnome2/nautilus-scripts/SendToImageShack/sendDesktopScreenshot
/usr/bin/scrot
Unhandled exception in thread started by <bound method SendToImageshack.upload of <sendToImageshack.SendToImageshack instance at 0x844f7ec>>

The bar progress appears but the button with code for link is not appear.

Thanks for your atention Nait!

Great job!

Report

C

Nait

12 years ago

optipng is only needed if you send screenshot, and you've change compression value..and even than it should fall back to not using it if its not installed, so still something is wrong. Does progressbar still shows you 0 progress?

Report

Guevara76

12 years ago

Yes Nait, still in 0 percent, same problem, look this print:

http://img159.imageshack.us/img159/6743/tela12.png

Thanks!

Report

C

Nait

12 years ago

Could you try running this one http://ee.o12.pl/kacprzak/download/gnome-look/testing/STI-CLItest.tar.bz2 ? Unpack it anywhere(however I don't advise nautilius-script location because this one is not a nautilius-script)
and type in console
python sendToImageshackTestCLI.py
It will try to send attached two images, maybe this time I'll get more usable stack trace(or it could even work and give you links if it was GTK related).
Pressing enter or ctrl+c will end up script.

Report

C

Nait

12 years ago

Actually that site checks incoming (from your PC point of view) connection, and script is outgoing connection. Maybe someday I'll get a chance to test a script in such environment and than solve the problem.

Report

Guevara76

12 years ago

Hi Nait!

Well, I tried to port 80 and it actually appears in stealth, I have a wireless connection, my ip is not the real ip, my ip is internal, I'm inside a NAT.
This is the test result:

http://img34.imageshack.us/img34/5649/port.png

I can get up images directly on the site imageshack and Imagebam, navigation is also normal.
My provider use SQUID, I do not know if he was blocking the connection, but okay, unfortunately in this connection I can not use the script.
Thank you for your attention and congratulations on your script.

Report

C

Nait

12 years ago

ok thanks for feedback.This output means that script can not send anything to imageshack -_-
Are you behind proxy or ISA server?
That could be also caused by firewall/apparmor/router/nameservers(DNS)
(Look for something blocking/redirecting pot 80 outgoing connection)
I hope that it's not an ISA server, solution for it would be far bigger than this script,unless you could persuade admin to unblock it.
For now I can only add notification about failure.

Report

Guevara76

12 years ago

This is the second output for the second script:

guevara@guevara-desktop:~/Vídeos/STI$ python sendToImageshackTestCLI.py
class init
upload 1.png
0.0
0.0
0.0
0.0
Traceback (most recent call last):
File "sendToImageshackTestCLI.py", line 164, in <module>
sendToImageshack.upload(file)
File "sendToImageshackTestCLI.py", line 150, in upload
directLink = search(r'<image_link>(.*)</image_link>', html).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
guevara@guevara-desktop:~/Vídeos/STI$

Report

Guevara76

12 years ago

Hi Nait, this is the output from this code:

guevara@guevara-desktop:~/Vídeos/STI$ python sendToImageshackTestCLI.py
class init
class init
press any key to end programupload 1.png
upload 2.jpg
0.0
0.0
0.0
0.0
0.0
Unhandled exception in thread started by <bound method SendToImageshack.upload of <__main__.SendToImageshack instance at 0xb6a582ac>>
0.0
0.0
0.0
Unhandled exception in thread started by <bound method SendToImageshack.upload of <__main__.SendToImageshack instance at 0xb6a3d6cc>>
guevara@guevara-desktop:~/Vídeos/STI$

Thanks!

Report

C

Nait

12 years ago

Later you could try also this one http://ee.o12.pl/kacprzak/download/gnome-look/testing/STI-CLItestSingleThread.tar.bz2

Report

Guevara76

12 years ago

This is the output:

guevara@guevara-desktop:~$ python .gnome2/nautilus-scripts/sendDesktopScreenshot
/usr/bin/scrot
Unhandled exception in thread started by <bound method SendToImageshack.upload of <sendToImageshack.SendToImageshack instance at 0x83ef7ec>>


this point it hangs but can close the window in close button.

Thanks!

Report

Guevara76

12 years ago

The script is not up any image to imageshack, is at zero percent and do not leave it.
What can be?
My connection is ok, this is an image uploading direct in the imageshack:
http://img518.imageshack.us/img518/1077/scriptn.png

I use Ubuntu 8.0.4.2;
Thanks!!

Report

C

Nait

12 years ago

Thanks for reporting.
Few things I would like to know
- if this occurred just once, or does it happens all the time?
- Could you replace sendToImageshack.py with this one http://ee.o12.pl/kacprzak/download/gnome-look/testing/sendToImageshack.py and tell me if it's any better?
- If both previous fail could you check if it's a GUI freeze? You can check it by for example uploading few files and checking if combobox response to clicking
- could you open a terminal and run script from there? (assuming that you put folder in nautilius-script path the command would be: python ~/.gnome2/nautilus-scripts/sendToImageshack/sendDesktopScreenshot )
and send me output?

Report

zniavre

12 years ago

hello

i really like your script its well done

a question : is it possible to make the widows less invasive.
i mean why all this empty space for a single upload > http://img124.imageshack.us/img124/5397/capture1q.png

it should look nicer (i think to fit the window with what's inside)

thank you a lot for scripts (sorry for language im not native english speaker)

Report

C

Nait

12 years ago

I hope it's better now.

Report

C

Nait

12 years ago

In the beginning it was dynamic, but with multiple uploads it was bigger than screen height and user had to alt+drag the window to get bottom links(see 0.2.0-Ideas by Shadestealer on: Mar 15 2009 comment). I know that the best version would by dynamic if smaller than given size, but I don't know how to do this yet. For now you can change prefferedHeight = 600 in sendToImagehack.py to something smaller, or click on tray icon to minimize it.

Report

Shadestealer

12 years ago

This is just too awesome! Great job :)

Report

Pmoyac

12 years ago

That link serves for forums?

direct or indirect?

Report

C

Nait

12 years ago

At the moment if you want BBC code image you can:
1)paste indirect link in your browser and copy bbc code link from that site
2)paste direct link on the forum and put in tags manually

I plan to add fetching other links such as thumbnails for forums etc in v0.3. I have to open and parse another website to do it, so it will probably be on demand(meaning you will have button like "other links" and after you press it, it will fetch other link and show them). I'm not sure what is best way of showing them, maybe I'll put them in combobox.

Report

C

Nait

12 years ago

done

Report

XeiaieX

12 years ago

I love this. Especially since sending images through Pidgin/other IM clients takes soooooo long. I often upload to imageshack and send the URL. This is great! I Really like it a lot.

Report

Rajca

12 years ago

Thanks, works fine with my Ubu 8.10. Helps a lot sometimes.

(dzięki)

Report

sharq11

12 years ago

It often fails to display links to uploaded images for me. Sometimes they show up, but after some longer time.
I'm using Ubuntu 8.10.

Report

C

Nait

12 years ago

Sorry to hear that. It's connected with that GTK don't like more than one thread connected with GUI. For me in the worst case buttons appear after about 3 seconds but they do. I'll try to find a way to solve it. You can try clicking copy all buttons maybe they will work earlier. If not, v0.1.1 didn't use concurrent threads so if later version are unusable for you, you may use it in mean time.

Report

C

Nait

12 years ago

I tried to reproduce such an error and I finally got it(probably xD). In my case files where send, but server didn't send any page back, so script couldn't generate links. In current version script will show error massage.
Lack of respond could be connected to:
1)Transmission error (try again)
2)server is down (try again later)
3)server didn't like your image(to big/wrong file type etc..) - try different file
4)server blocked connection because of too many attempts. (try again later, may be partially addressed by limiting number of concurrent uploads)
Hope this helps.

Report

10 years ago

v0.6.2
-new translations
-fix saving credentials multiple times in keyring

v0.6.1
-fix crash when translations are not found
-add IT and SV translations from launchpad
-minor refactor

v0.6.0
-added uploading to Twitpic (requires account - see settings>accounts)
-fixed rapidshare uploading
-uploading as user to imageshack now possible (see settings>accounts)
-added plugin API
-added possibility to choose preferred uploader for filetype

changelog archive: http://ee.o12.pl/kacprzak/download/gnome-look/changelog.txt
more at http://bazaar.launchpad.net/~pyshareteam/pyshare/main/changes

12345678910
13
product-maker I4C Feb 19 2013 3 bad
product-maker mainstreamdesign Apr 19 2011 9 excellent
product-maker Dicson12 Mar 15 2011 9 excellent
product-maker legluondunet Feb 14 2011 9 excellent
Be the first to comment
zolajriggs
Mar 03 2020
loissmoon
Dec 30 2019
webmastir
Oct 11 2010
piedro
Sep 11 2010
vagrale13
Jan 26 2010
Vecna
Jan 14 2010
themis
Nov 29 2009
MastroPino
Nov 19 2009
nicolaide
Jun 15 2009
didisoft
May 02 2009
Spox5
May 02 2009
microscopuce
May 02 2009
Rajca
Mar 22 2009
franek
Mar 18 2009
Dicson12
Mar 17 2009
Dav87
Mar 16 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.6.2
updated Jun 02 2011
added Mar 13 2009
downloads 24h
0
mediaviews 24h 0
pageviews 24h 3
System Tags addon