How does one create a post, assign it to a category, add tags to it and set the featured image from a PHP script that exists somewhere on disk (say /usr/local/process.php) and isn't part of the Wordpress installation or infrastructure?
I searched for a couple of hours and can't find anything particularly useful. The only thing I'm stuck on is how to create the POST and add its metadata. The rest (like getting the images, extracting the caption etc) is already done.
I'd like to automate the process to create posts for images I have. Unlike traditional import stuff, I'd like to replace images and update their posts and metadata if they already exist. The latter is important since I manage all my image metadata in Aperture. Every image has a unique name in the form of AAA99999999 and versions (such as a B&W and cropped) of images may have the format "AAA99999999 - Version NNN". If possible, I'd like to indicate that the posts of say "AAA99999999" and "AAA99999999 - Version 1" are related. I have about 2000 photos I'd like to import.
I'd like to use the script in the future to add and update new images.