A G3Remote - v0.1.8 [12/12/10]
rak
Joined: 2010-08-09
Posts: 44 |
Posted: Mon, 2010-08-09 13:47 |
Ok so I got tired of having flash crash every time I want to upload a picture, so I've hacked together a quick desktop client in python. [img]http://04340.com/g3remote/screen.png[/img] Latest version - 0.1.8 Latest Windows (binary) version - 0.1.8 ------------------------------------------------------------------ Enable the REST module on your gallery Download file and extract (use 7-zip for windows files). Run G3Remote.exe If running from source Prerequisites cd to extracted files and $ python G3Remote.py ---------------------------------------------------------------- Changelog: 0.1: Experimental * Initial release. * Support for browsing gallery structure, uploading files and creating and deleting albums. 0.1.1: Reasonably stable (on linux at least) * Added ability to add descriptions to files before uploading. * Queue will now autosave whenever an item in it changes and load on startup. * Added popup messages to display notifications * Fixed a large number of bugs... -----Note------ * Although you can edit tags in the queue this data will not be send to the gallery when items are uploaded. * There seems to be some minor gui issues in which thumbnails do not align correctly. If you select the affected items or scroll the panel they should sort themselves out. 0.1.2: Even more stable. * First windows release. This may well be a bit buggy as i haven't the time (or will) to test it at the moment. * Added progress bars. * Added tags support (can also add tags to more than 1 item by selecting items and using the right click context menu). * Added title support, can now specify a seperate title to use instead of the filename (default is still the filename). * Cleaned up some of the code. * Fixed thumbnail display bug. 0.1.3: Perhaps not quite as stable. * --Added ability to browse/edit remote files. (tagging of remote files is not supported)-- * Added some right click options for files in the queue. * Added menu bar. This along with context menu options will probably start to replace the buttons. * Can now see what folder is being browsed. * Fixed a load of bugs and made some other changes that I can't remember. 0.1.4: Bugfixes and a few new features. * Added simple drop support for files dragged onto the queue and directories onto the filebrowser. * Better loading dialogs (still nowhere near perfect) * Cleaned up gallery caching code, should now be more efficient and faster. 0.1.5: A usable version * Greatly improved config managment * Added support for moving remote items * Added a few more loading dialogs so the app doesn't appear to have hung. 0.1.6: Better remote files support * App will now restart when saving config, preventing a problem from occuring if you use more that one gallery. * Improved incorrect config detection. * If uploading fails app should now display the error message that gallery3 returns instead of crashing. * Thumbnails for remote items are now downloaded in a seperate thread so the app remains response even when downloading a large number of thumbnails. * Thumbnails are now downloaded via REST. * Reorganised requests so it should be possible to catch dropped connections 0.1.7: More remote file improvement * Streamlined the remote file managment some more and fixed some bugs * Remote items are now saved across sessions. Windows users - Binary (exe) is now available (link above). Runs on XP and vista (probably 7 as well). Feel free to post any comments/suggestions. |
|
Posts: 27300
rak,
Thanks for your contribution. Most users are not familiar with python, so perhaps you can give some details on how to install/run this. I am assuming this will only work for users that have a linux client. I think if you have python install on windows you can run this a swell. Is there any simple docs for Windows/Mac users to install python?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 16504
I've also seen "compilers" which package together a python runtime and the code into a exe to run standalone on Windows machines without the prereq of having Python installed on Windows.
Ah here we go:
http://www.py2exe.org/
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 7994
That's totally awesome. Are you using the REST API?
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 44
@floridave and nivekian
I'll put up some documentation on how to use it and and look into building some windows binaries once I add a few more features and iron out some bugs its got at the moment.
@bharat
Yeah its using the REST API. To be honest I have no experience with REST and I've put it together quite quickly so I'm not exactly sure if I'm doing it all the correct way, though it seems to be working.
Posts: 7994
If it works, it works The fact that you got it working quickly with the REST API is a good sign!
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git
Posts: 44
Fixed a load of stuff, added some new features and built a Windows version. Let me know what you think / if you have any problems (I know about error messages on startup but these shouldn't affect anything, will fix for the next version)
Posts: 23
Rak, I just tried this out on my computer (Windows XP SP3) and it closed as soon as I tried to run it. I also tried it in a VM (XP, sp3 again) and it complained about it not being configured correctly.
Let me know what you need to debug this. Thanks!
Posts: 44
I've uploaded a new version - 0.1.3. See first post for links and details.
@JaronRH did you edit the config file and add your gallery's url and rest key as thats what'll happen if they're incorrect?
When i get some time I'll build it into the gui.
Posts: 44
Updated first post with latest version. The interface still isn't the neatest but it should now be easy for anyone to use and run.
Posts: 1
Ok i am tying the windows version here and i must be missing something. i executed the G3Remote.exe and i filled in the requested lines and clicked save. The box just stays there and no GR interface pops up. What am i doing wrong.. ?? Thanks
[img]http://netweb.hctx.net/rest.jpg[/img]
Posts: 337
A Mac OS X version, please?
Posts: 33
I'll second that!
Posts: 44
@kc5daq: unless you're using a url rewrite you need the index.php on the end so try using http://10.0.1.51/gallery3/index.php/
As to a Mac version I don't know how to build a binary, but I think python is installed by default so you should be able to run it from source.
Posts: 25
Where do i find the Rest API Key????
Posts: 16504
Click on your user account in the upper-right corner or as admin you can edit users under Admin > Users/Groups and there is a Remote access key property
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 25
It is very slow to update a large directory of images but otherwise seems to work well.
Thanks
Dave
Posts: 68
Make android app version
Posts: 44
@daveman
I see what you mean. Downloading the thumbnails is threaded so you can try upping the "concurrent_connections" in your config, be careful though. if you put it too high your server might not be able to handle it and you'll get missing thumbnails. I'll thread the item get requests (and i'll put in a feature request to allow the REST API to support multiple item requests in a single request which would be a better solution) in the next version would should speed up the first part at least. If I get the time I'll look into loading the thumbnails dynamically.
@gpo
Does android support python? If it does, it's possible. I don't have the time (or an android phone) to do it though. Source code is available if someone else wants to.
Posts: 3
I'm having the same problem as kc5daq, but on Kubuntu 10.10 AMD64...
All Python libs are installed and there are no error messages. After entering my Gallery's details and clicking Save the first two lines in the window turn blue but nothing else happens.
How can I troubleshoot this? I'm not familiar with Python.
Posts: 44
Blue means that the login is failing, chances are you've got your gallery url wrong (it'll need the "/index.php/" on the end if you're not using a urlrewrite so try "http://example.com/gallery3/index.php/"), or your rest key is incorrect.
If you're still having a problem let me know.
edit:
Just put in a fix which should differentiate between an incorrect url or rest key which should simplify things for the next version.
Posts: 3
It tired both with '/index.php/' and without it (I do use rewrite). I generated a new REST key as well, but to no avail...still the same.
I downloaded g3remote-v0.1.5-source.7z, which expands into g3remote-v0.1.3/. Is that really the latest version?
Posts: 44
Yeah that should be the latest, I must have forgotten to rename the folder. If you could send me a link to your gallery I'll take a look and see if I can work out whats going wrong.
Posts: 11
Very nice work, rak!
I have been looking for a good place to start writing a small Python script to upload pics from my Nokia N900 to gallery3, this program seems to be exactly what I needed..
I just gave G3Remote a try on my Ubuntu machine. The program runs just fine, I am able to see the albums of my gallery and thumbnails of the pictures. I can also read a local directory in and move pictures to the upload queue. However, when I start the upload, the program hangs on the first file, I attached the JSON related error message from the terminal at the end of this message. Any idea about this, or can I give some additional info to troubleshoot?
BR,
Julius
-edit-
Also tried this on a win7 machine, hangs on the same way. Perhaps the problem is on the server side? Gallery REST API module is activated, I don't know what else to check.
Ubuntu 10.04 Desktop / python 2.6.5 / python-wxversion 2.8.10.1 / python-imaging 1.1.7 / python-httplib2 0.6.0
-----
Traceback (most recent call last):
File "G3Remote.py", line 690, in upload
response, content = self.REST.uploadItem(a, i[j]['type'], i[j]['filelocation'], j, i[j]['title'], i[j]['description'])
File "/home/sjsipila/Downloads/g3remote-v0.1.3/rest.py", line 133, in uploadItem
content = json.loads(content)
File "/usr/lib/python2.6/json/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.6/json/decoder.py", line 338, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Posts: 44
Not sure whats going wrong there, it would appear your gallery3 isn't responding to the request properly in which case it would be server side. Are you using the latest version and can you upload files with the flash uploader?
Could you post a traceback with httplib2 debug turned on (edit rest.py and change "httplib2.debuglevel = 0" to "httplib2.debuglevel = 1") or possible send me a link to your gallery with a valid rest key so I can test it myself.
Posts: 11
Thanks for your help,
I turned httplib2 debug on, the whole traceback is attached in the log.txt here (I removed hostname and gallery REST key from the log). The server replies with 'HTTP/1.1 500 Internal Server Error', I have still no idea why.
I am running Gallery 3.0, and uploading files with the flash updater works ok. Do you think I should try the latest development version? If it helps and I can send you a valid rest key to my gallery for testing.
Posts: 44
Ok I'm still not sure whats going wrong there, its either something wrong with the data thats being sent or a server error. Are there any errors in gallery3's logs?
If you send me a rest key and url I'll take a look and see if I can work out whats going wrong.
Posts: 11
Problem solved with hep from rak. It was a trivial permission problem, I had no Add/Edit permissions to the album with that REST key. You should make sure the permissions are OK before uploading, otherwise the current version 1.5 of G3Remote will hang. Also if you try to get thumbnails from an album which is not readable by "Everyone" it will hang.
Thanks rak for troubleshooting this for me!
- Julius
Posts: 44
Both those errors should be addressed in version 0.1.6, I've also rewritten the way remote thumbnails handled which should make it much more usable. Just want to do a bit more testing and then I'll upload the new version.
Posts: 44
@rameijer
Your problems may well have been caused by a permissions bug that has been fixed in the latest (git) gallery3 code.
Posts: 44
Source for new version (0.1.6) is up.
Posts: 3
Thanks rak, I'll try again when 3.0.1 is out then.
Posts: 10
Anyone have another place to download? The links above haven't worked for a couple days, but this sounds great.
Posts: 1
Also looking for this source, seems the URLs are all borked.
Posts: 44
Ok slight trouble with my host, should have it fixed in a few hours.
Posts: 44
Files are back up. I've also uploaded the source to a new version which should make browsing and editing remote items a lot nicer (I made some rather drastic changes so let me know if you notice anything weird).
http://04340.com/g3remote/g3remote-v0.1.7-source.tar.gz
When I get some time I'll look at setting up a git repository.
Posts: 18
rak,
this is totally awesome software.
How to get windows binary for v0.1.7?
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
Posts: 44
I'll try and build the binary tomorrow if I get time.
Posts: 18
Thank you very much. I'm looking for your release.
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
Posts: 44
v0.1.8 source and win32 builds are up
http://04340.com/g3remote/g3remote-v0.1.8-source.tar.gz
http://04340.com/g3remote/g3remote-v0.1.8-win32.7z
its still a work in progress but as usual suggestions and comments are much appreciated.
Posts: 18
Great!. I will try that later.
_____________________________________________________
Cheers!
Visit my Travel Photo Gallery!
Posts: 130
Hi Rak,
I just tried the latest version for windows. It accepts my settings, but then gives me an "Errors Occured" dialog box and tells me to check the log.
The log reports the following:
Posts: 44
Hmmm weird error.
I think I may know whats going wrong but I don't know why and can't be sure without testing it.
Any chance you could PM a link to your gallery and a rest api key?
Posts: 130
Thanks RAK.. sent you a PM.
Posts: 44
My bad, should have seen this earlier, can you try without the "/index.php/".
Posts: 130
that worked! Thanks.
Posts: 2
Tool looks promising, unfortunately in my case it's not able to work with albums containing more than few pictures - I waited for 1 hour trying open an album containing 92 pictures - without success.
Posts: 44
Somethings definitely going wrong there. It used to take about 10 minutes for me to load an album with 1000+ pictures, but since I threaded some stuff and made it dynamic its no much faster.
If you let me know if you're getting any errors (and your platform) I'll see if we can sort the problem.
Posts: 32
Hello,
I was interested (Ubuntu) but Downloads links are not working...
Vincent
Posts: 44
Links should be working again now.
Posts: 34
I'm having an issue where I can pull my main 7 albums and they display in G3Remote, but if I try to expand any of those albums, the app will hang with the "loading data for album" window.
edit: I thought I helped it some.. I bumped the request size to 100000 and the concurrent connections to 100.. I was able to get a couple more folder lists.. but it still hangs on albums with 200 or more sub albums.