You have a nice function to create object eZContentFunctions::createAndPublishObject() You just have to give attributes of the object to this function and it creates the object using fromString function of datatypes.
I think that with this you can easily implement a script to publish whatever you want.