I am transferring a site from CakePhp to Craft CMS. The old site has a ton of images which I need to import into the new site. I know i can drop the images in the right folder and do an "Update Asets Indexes", but I also need to bring across some meta data, which will end up as field values.
I am new to Craft, but from what I can tell, I need to create console plugin, and from within that plugin do all the neat stuff to do the actual import. I have come across this blog entry
which I think looks pretty solid.
But, once I get a bare bones plugin up and running, what is the code I need to import an image file on disk into the Craft database, with field values set as required?