050614:6:30pm GMT+1 Updated
Hello,
While parsing this great forum I saw many requests for having a script/app/hack to upload pictures to gallery 1.x via a simple FTP in an automated way. I also want such a script !!!
I found that the native gallery (1.5) application does not support this feature, despite the great gallery remote application.
I found that "Ianlea" from germany (search for user in this forum) has improved an existing perl script from "Jesse Mullan" (original author of galleryadd.pl that enable some automation. This perl script is called galleryadd.pl & the thread can be found here:
http://gallery.menalto.com/index.php?name=PNphpBB2&file=viewtopic&t=27952&highlight=galleryadd
Altough I didn't test it it seems to be a great script with some interesting capabilities. (recursive folder upload etc...)
Well to give you some background, I'm a not a pro photographer, not a developper. Just an employee that does photo as a (very small) side job.
I'm located in Belgium Brussels.
Now, What's my request ?
I'm looking for a script that will transfer the photos from a local server directory & generate albums into gallery in an automated way.
Some info :
--------------
background
--------------
I have a wireless enabled digital SLR camera. I want to upload the photos taken by my camera in real-time in a gallery album.
What I can already do with my setup is:
- to upload the photos from the camera to a local computer.
- or to upload the photos from the camera to the remote server which is running gallery.
--------
Shema
--------
Camera ))))) WifiLink ))))) [LocalComputer] --- [ROUTER]------ INTERNET-------ServerWithGallery&FTP
The server which is running gallery is a Debian / Linux server . I have all access on the server (root/cron etc...)
----------------
What I would need
----------------
Hence, I would like to have a small aplication/script/trick/hack being developed that will do the following :
I would need a script running on the server that (like a daemon) will monitor the incoming photos (from a local folder) & transfer/move/synchronise on a particular album of the Gallery application.
- I think we need a script that monitors a local folder, check if the incoming file has been completely uploaded & then initiate thegalleryadd.pl script to upload to an album.
- Note that as the photos will be uploaded in a random way, a check should be made to prevent that half/sized image incomplete/uploaded images to be synchronized with the album folder.
----------
Reward
----------
I hope my request is authorized by the forum/gallery rules. I'm ready to pay the developers that will help me doing that. Between 100 & 250 Eur.
On top I will not consider this script as mine. I will let it open, I want people use it. I want people improve it ;-) & If I can get more cash because I can sell the concept or use it for a commercial event, I might ask more features in the future & reward the author for the work !
--------
Timing
--------
End June ideally the application should be ready.
Many Many thanks for your consideration in this thread
You can contact me if needed should you require more information. arose001 AT skynet DOT be
Skypeid : antoinerose
Posts: 3236
It should be pretty easy to write something that does this for you.
I would start by defining where you want the processing to happen, but either place should be fine.
If the camera itself can ftp, it would probably be easiest to ftp directly to a dir on the server. If not, it would probably be easier to do it on the client pc.
A simple script could use galleryadd.pl to upload each image then delete the image. It could loop through all the existing images. I imagine this could be done in 10 lines or less... something like the following (in pseudo code) might do it.
You could then point a cron job that runs every 5 minutes to this script. The inital part with the pid files would keep more than one from running at a time, so you don't end up with something weird going on.
Posts: 9
Hello,
Thanks for your reply!
The camera itself can ftp directly to a remote webserver not a problem.
However, I prefer to use an intermediate laptop before uploading.
The role of the laptop is double :
-batch process the files (rotate, resize, add caption)etc...
-Then upload via FTP to the webserver.
I believe using galleryadd.pl with an additionnal script is the way to go.
However the main issue is that when I upload files to the gallery server via ftp, chances are that while uploading a file to the webserver, your script may start adding the file to the gallery even tough the file is still being uploaded from the camera/laptop to the webserver. Meaning that a half picture or a corrupt picture will show in the gallery. I believe we should developp 3 functions :
- Function check if file has been uploaded completely
- Function move every new file to the gallery
- by using the galleryadd.pl
Is it feasible ?
Posts: 3236
The server can rotate and create the sized images just fine, it would be easier to set those settings at an album level and just let gallery deal with them. Where does it automatically get the caption from? If you are just sending a photo immediatly to a laptop and not touching them, it could only come from the file name, right? Gallery should even do this by default.
Checking for a complete upload is a good catch and I am not sure how I would deal with it. If you knew your connection speed and it was fairly decent (ie, maybe 56k modem or better?) you could simply check the file size at a 1 second interval and see if it changes. This would slow your script down significantly, but it would probably be the safest. If the file size hasn't changed, its probably safe to add it.
Another way might be a combination of server and client scripts. Uploaded files could somehow be called "something.jpg.temp" until they are fully uploaded, then renamed by removing the .temp.
Do you always want the images to go to the same album? I don't see how you could automate anything but sending them to the same album.
You might consider offering this reward for a G2 plugin instead of a G1 modification. There are a lot more active developers for G2 than there are for G1... and the possibility of monitary reward for work that others would use could be very good.
Your requirements are actually so open that a module to periodically scan a directory for images and add them (w/o creating dupes) is all that is really needed. This would be useful to far far more people than a module for a specific camera or phone.
You might consider a specific value attached to it. You should specify exactly what you want it to do though, and be sure the developer knows what you want. I'm not sure if you are a private user or if this is more for a company, so I dont know what *your* price range is... but the google summer of code is offering people something like $4k for completing something for an open-source project. Thats probably a little out of your range (I know its out of mine!), but depending on the complexity of something like this, it could take multiple days of coding. Tell em what its worth to you. Come up with a good user story and feature list. Maybe I'll have a go at helping you come up with the user story and feature list, cause it sounds like a useful G2 module.
User Story:
Scan directory for newly uploaded images
Automated method of periodic scanning, possibly by loading a page via cron job that causes the scan to happen
Avoid duplicating images
Possibly delete or move images once they are added
Posts: 9
The server can rotate and create the sized images just fine, it would be easier to set those settings at an album level and just let gallery deal with them. Where does it automatically get the caption from? If you are just sending a photo immediatly to a laptop and not touching them, it could only come from the file name, right? Gallery should even do this by default.
> I use a intermediate laptop because I'm using some advanced scripting possibilities of Photoshop : ie:
- correct the levels/hue/saturation/unsharp masking/add timestamp / filename from exif as watermark etc… The advantage is that I can do whatever photoshop action I want. On top, if I do a resize locally, I can optimize the available bandwidth & the transfer will be faster. Also it reduce the workload of the server.
Checking for a complete upload is a good catch and I am not sure how I would deal with it. If you knew your connection speed and it was fairly decent (ie, maybe 56k modem or better?) you could simply check the file size at a 1 second interval and see if it changes. This would slow your script down significantly, but it would probably be the safest. If the file size hasn't changed, its probably safe to add it.
> Connection speed will depend. Ranging from GPRS, 56Kb modem, DSL or LAN. I've just heard that in some php graphical libraries there is a function that can check wether or not a file has been completely uploaded (kind of checksum ?)
Another way might be a combination of server and client scripts. Uploaded files could somehow be called "something.jpg.temp" until they are fully uploaded, then renamed by removing the .temp.
> Indeed that would be nice. I'm using an application called ITP server (pixagent.com) that has been created from scratch to transfer pics from a wireless camera to a ftp server (windows application). After the photo is received on the laptop, I use a ftp daemon (cute FTP pro windows) to upload the files on the web server.
Do you always want the images to go to the same album? I don't see how you could automate anything but sending them to the same album.
> galleryadd.pl can upload a specific folder structure to a corresponding specific album structure I think (not sure)
If I have locals folders such as :
C:/day1
C:/day2
C//day3
I might one to upload to a a nested album structure
\gallery\album01
\gallery\album02
\gallery\album03
You might consider offering this reward for a G2 plugin instead of a G1 modification. There are a lot more active developers for G2 than there are for G1... and the possibility of monitary reward for work that others would use could be very good.
> Your'e probably right but I've just spent lot of time to customize a gallery 1.5 that I'd like to work on this one. I guess the firsc script to check the incoming file would be the same for gallery 1 & 2 it's just the galleryad.pl that should be modified.
Your requirements are actually so open that a module to periodically scan a directory for images and add them (w/o creating dupes) is all that is really needed. This would be useful to far far more people than a module for a specific camera or phone.
> It's exactly what I want I do not need something specific for my camera. It's just a module to check the file & initiate the galleryadd.pl perl script with the corresponding arguments & variables
You might consider a specific value attached to it. You should specify exactly what you want it to do though, and be sure the developer knows what you want. I'm not sure if you are a private user or if this is more for a company, so I dont know what *your* price range is...
> I'm a private user that try to developp innovative application is a side job but I'm very committed in it.
More : www.coolpix.be
I have not a lot of revenues infortunately. But I think that if someone can just developp this small check script, & also help me testing it, I'm ready to pay 75-150 Eur ? Even if I pay the script, I want it to be open for everybody if at least we get some contribution to maintain, update the code & add some features
but the google summer of code is offering people something like $4k for completing something for an open-source project. Thats probably a little out of your range (I know its out of mine!), but depending on the complexity of something like this, it could take multiple days of coding. Tell em what its worth to you. Come up with a good user story and feature list. Maybe I'll have a go at helping you come up with the user story and feature list, cause it sounds like a useful G2 module.
> I have no time to do right now but I will try to elaborate in depht the specification & features. I'm pretty sure this application is might be very usefull for other people as I have seen lots of request in this forum for people that want to upload the pictures dirctly via FTP to gallery. That's all that I need, forget my WIFI camera, the deliverables of the camera + laptop is just that files are sent to a webserver via FTP in a directory. From this point, I need a script to take the relay, check the files, & upload in a directory.
User Story:
Scan directory for newly uploaded images
Automated method of periodic scanning, possibly by loading a page via cron job that causes the scan to happen
Avoid duplicating images
Possibly delete or move images once they are added
> That's pretty all that I need indeed I
I will try to elaborate a bit.
In the meantime, thanks for you in depht reply !!!!
Antoine
Posts: 3236
Is your server linux or windows?
Posts: 9
Hello Fryfrog,
I have a debian / Linux server.
The server belongs to a friend that maintains it.
Hence we have full access to the machine (root, cron etc...)
I have maybe a photo event very soon (end of month) & I would like to propose this service. I think I may ask to the potential customer up to 250 Eur for this feature. I'm ready to add 100 Eur from my pocket or maybe more to have a bullet proof script. So I'm ready (if we get the event deal) to pay 250~350 Eur for this script.
I think it is a fair amount of money.
I already have some mail exchange with a IAIN (iain AT bricbrac DOT de) that is the author (I think) of the galleryadd.pl script.
IANIN already gave me some great valuable information. I think he's also ready to help me out...
Please let me know if my request is feasible.
I'm working on writing the specs but I think you have pretty well understood my needs.
Thanks a lot in advance !
Antoine Rose
Belgium
Skypeid: antoinerose
Posts: 3236
I'm not sure if I would have the time to work on it and get it going to your satisfaction, but hopefully the discussion, clarification and $$$ will entice someone who can