$mg = new Feed_Manage($deps);
if ($command->command_name == 'add') {
$mg->addFeed($command->command->args['feed']);
- } else if ($command->command_name == 'remove') {
+ } else if ($command->command_name == 'remove') {
$mg->removeFeed($command->command->args['feed']);
- } else {
+ } else if ($command->command_name == 'list') {
$mg->listAll();
+ } else {
+ $this->cliParser->commands['feed']->displayUsage(1);
}
}
) {
$tasks = array_flip(explode(',', $result->command->options['tasks']));
+ //if an ID/url is given, only execute the matching task
+ if (isset($result->command->options['feed'])) {
+ $tasks = array('feeds' => 1);
+ } else if (isset($result->command->options['entry'])) {
+ $tasks = array('entries' => 1);
+ } else if (isset($result->command->options['entryurl'])) {
+ $tasks = array('urls' => 1);
+ }
+
if (isset($tasks['feeds'])) {
$this->runFeedUpdateFeeds($deps);
}
protected function runPingbackHandler(
\Console_CommandLine_Result $command, Dependencies $deps
) {
- //FIXME
+ //fetch content of pingback source pages
+ $cf = new Content_Fetcher($deps);
+ $cf->updateAll();
+
+ $cx = new Content_Extractor($deps);
+ $cx->updateAll();
}
);
$add->addArgument('feed', array('description' => 'URL of feed'));
+ $feed->addCommand(
+ 'list',
+ array(
+ 'description' => 'List all feeds',
+ )
+ );
+
$remove = $feed->addCommand(
'remove',
array(