Difference between revisions of "Creating a Share on Ovi Droplet"
Line 1: | Line 1: | ||
The PHP class [http://websvn.reinvented.net/wsvn/Plazes/Ovi/class.ovi.php class.ovi.php] provides the facility to programatically upload JPEG images to the [http://share.ovi.com Share on Ovi] web service. | The PHP class [http://websvn.reinvented.net/wsvn/Plazes/Ovi/class.ovi.php class.ovi.php] provides the facility to programatically upload JPEG images to the [http://share.ovi.com Share on Ovi] web service. | ||
− | I've created [http://websvn.reinvented.net/wsvn/Plazes/Ovi/UploadToOvi.php UploadToOvi.php] as a wrapped around this class to make command line uploading easier, and using [http://sveinbjorn.org/platypus Platypus] it's possible to take things one step further and create a Mac OS X "droplet" that allows | + | I've created [http://websvn.reinvented.net/wsvn/Plazes/Ovi/UploadToOvi.php UploadToOvi.php] as a wrapped around this class to make command line uploading easier, and using [http://sveinbjorn.org/platypus Platypus] it's possible to take things one step further and create a Mac OS X "droplet" that allows drag-and-drop uploading to Share on Ovi. |
+ | |||
+ | With this droplet you can easily drag JPEGs from the Finder, from iPhoto, or from any other application that supports directly into Share on Ovi. | ||
This document outlines how to set up this droplet. | This document outlines how to set up this droplet. | ||
Line 13: | Line 15: | ||
# (Optional) Download the [http://websvn.reinvented.net/wsvn/Plazes/Ovi/ovi-logo.jpg Share on Ovi logo]. | # (Optional) Download the [http://websvn.reinvented.net/wsvn/Plazes/Ovi/ovi-logo.jpg Share on Ovi logo]. | ||
# Download and install [http://sveinbjorn.org/platypus Platypus]. | # Download and install [http://sveinbjorn.org/platypus Platypus]. | ||
+ | |||
+ | ==Testing the UploadToOvi.php Script== | ||
+ | |||
+ | Before you create a droplet, it's best to first test the UploadToOvi.php script to make sure it's working properly, as it's easier to debug things at this stage first. | ||
+ | |||
+ | Open up Terminal, and test as follows: | ||
+ | |||
+ | <pre> | ||
+ | php UploadToOvi.php /path/to/image/file | ||
+ | </pre> | ||
+ | |||
+ | For example, if you have a JPEG image at '''/Users/peter/images/fred.jpg''', you can test like this: | ||
+ | |||
+ | <pre> | ||
+ | php UploadToOvi.php /Users/peter/images/fred.jpg | ||
+ | </pre> | ||
+ | |||
+ | The result should be a silent upload of the image to Share on Ovi (just check Share on Ovi to see if it ended up there) and, if you configured growlnotify, an alert of the successful upload. | ||
==Setting up Droplet in Platypus== | ==Setting up Droplet in Platypus== | ||
Line 29: | Line 49: | ||
==Usage== | ==Usage== | ||
+ | |||
+ | If you've configured everything properly, |
Revision as of 11:52, 13 July 2008
The PHP class class.ovi.php provides the facility to programatically upload JPEG images to the Share on Ovi web service.
I've created UploadToOvi.php as a wrapped around this class to make command line uploading easier, and using Platypus it's possible to take things one step further and create a Mac OS X "droplet" that allows drag-and-drop uploading to Share on Ovi.
With this droplet you can easily drag JPEGs from the Finder, from iPhoto, or from any other application that supports directly into Share on Ovi.
This document outlines how to set up this droplet.
Contents
Install Requirements
- Download class.ovi.php and install where PHP can find it (i.e. in a location defined in your local php.ini file's setting for include_path).
- Download PHP Atom API, unpack and install the class.wsse.php file where PHP can find it.
- Download UploadToOvi.php and edit with your Share on Ovi username and password.
- (Optional) Install Growl and then install growlnotify.
- (Optional) Download the Share on Ovi logo.
- Download and install Platypus.
Testing the UploadToOvi.php Script
Before you create a droplet, it's best to first test the UploadToOvi.php script to make sure it's working properly, as it's easier to debug things at this stage first.
Open up Terminal, and test as follows:
php UploadToOvi.php /path/to/image/file
For example, if you have a JPEG image at /Users/peter/images/fred.jpg, you can test like this:
php UploadToOvi.php /Users/peter/images/fred.jpg
The result should be a silent upload of the image to Share on Ovi (just check Share on Ovi to see if it ended up there) and, if you configured growlnotify, an alert of the successful upload.
Setting up Droplet in Platypus
Launch Platypus and create a new application with the following settings:
- App Name - "UploadToOvi"
- Script Type - Select "PHP".
- Script Path - Click "Select" and then locate the local copy of UploadToOvi.php you installed.
- Output - select "Progress Bar" (you can select "Text Window" if you need to debug something).
- Check the Is droppable box under "Advanced Options".
- (Optional) Drag the Share on Ovi logo file you downloaded into the icon area.
- Click "Create" and save the new application on your Desktop.
Usage
If you've configured everything properly,