G2 Utility from PHP CLI
GuruBob
![]()
Joined: 2003-03-31
Posts: 10 |
![]() |
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(); (that's not 'real' code, but it gives an idea of my intentions. Any help appreciated. Cheers, - Bob - |
|
ckdake
![]()
Joined: 2004-02-18
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: $msg = new XML_RPC_Message('deleteEntityById', array(new XML_RPC_Value($authtoken, 'string'), new XML_RPC_Value($newAlbumId, 'int'))); $result = $client->send($msg); |
|
GuruBob
![]()
Joined: 2003-03-31
Posts: 10 |
![]() |
Hey funky Cheers! - Bob - |
|
ckdake
![]()
Joined: 2004-02-18
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 |
|
GuruBob
![]()
Joined: 2003-03-31
Posts: 10 |
![]() |
Thanks for the link, I'll have a play and wait in earnest for 2.2! |
|