automatic album upload / creation

curranpaul

Joined: 2005-08-05
Posts: 1
Posted: Wed, 2005-08-17 22:35

I'm looking to skip the human intervention to create and upload albums. Basically I can programatically upload new photo sets to the upload directory via ftp. What I would like to do then is automatically create an new album without using human intervention.

I imagine that I would have to programatcally issue a series of htp requests to login - create an album and select load from the upload directory.

My question is - is there any convenient http instruction to do this like...:

Run an ftp batch upload and then...

http://www.mysite.com/gallery2/createAlbum.php?user=username&password=password&Newum=Saturday Night&uploaddir=/var/www/html/uploadDir

I say the perl script for gallery1 but even trying that with 1.5 was a pain to get working on my website.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-08-17 23:03

if you have cmdline php you can write scripts to interact with G2 via its apis.. include embed.php, call GalleryEmbed::init accord to its instructions, and you can call things like GalleryCoreApi::addItemToAlbum...

 
mgwebster

Joined: 2006-05-29
Posts: 5
Posted: Tue, 2006-08-01 04:57

Hi Curranpaul,
This is exactly what I want to do - did you get it working?

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Wed, 2006-08-09 18:58

Mindless is... uh... right, assuming that your web server user and your login user can both read and write all of the g2data files.

You could try g2add.pl or galleryadd.pl, that might be easier to work out.