Hi All,
I am wanting to write (and release ;) ) a utility that allows me to import and export images from PHP running in commandline mode. I've had a look through the code and documentation but the examples given are only for embedding G2 inside a CMS (for example).
Can anyone tell me whether G2 in PHP/CLI works, and if so give me a head start with creating such a utility.
Basically I'd like to do something like this:
$image = new GalleryImage();
$image->BinaryContent = file_get_contents('image.jpg');
$image->MimeType = 'image/jpeg';
$gallery->InsertIntoAlbum('My Pictures',$image);
(that's not 'real' code, but it gives an idea of my intentions.
Any help appreciated.
Cheers,
- Bob -
Posts: 2258
Once the XML-RPC module is finished, that will be the ideal way to interact with a Gallery 2 inctall via the command line. Code to interact with it will look like this:
Posts: 10
Hey funky I know it's a tough question to answer but is there an ETA for this?
Cheers!
- Bob -
Posts: 2258
Should be a couple of months or less. I think the target for its release is Gallery 2.2. If you want to play around with it some, there is a module thats mostly working on http://sf.net/projects/gallery-contrib/ named remoteprotocol, but we aren't making any promises about what will and won't change before it is finished
Posts: 10
Thanks for the link, I'll have a play and wait in earnest for 2.2!