This question has been answered by multiple community members. See the first response.
gadgetto, Splittingred can give you a much better answer, but it looks to me like you can import your articles into MODX as regular resources (either with your script, or the import utility in the Manager) and then use the Articles import utility to pull them into Articles (right-click on the Articles folder in the tree and select "Manage Articles" -- you'll see an Import button).
But as far as I understand - each child resource should inherit the content of the properties field from it's container!?
Could anyone confirm this?
/** @var ArticlesContainer $container */
$container = $this->modx->getObject('ArticlesContainer',$this->object->get('parent'));
if ($container) {
$settings = $container->getProperties('articles');
$this->object->setProperties($settings,'articles');
$this->object->set('richtext',!isset($settings['articlesRichtext']) || !empty($settings['articlesRichtext']));
}
I got this working in NewsPublisher. You have to use $modx->newObject('Article'), set the parent field to the ID of the blog container and set the template field to the id of the blog template. The properties field is then set correctly when you call $modx->runProcessor('resource/create', $fields).