Cosmetic changes

This commit is contained in:
Stéphane Goetz 2015-07-18 01:10:40 +02:00
parent a35af5fd19
commit ce109d0429
3 changed files with 5 additions and 18 deletions

View File

@ -6,7 +6,6 @@ use Todaymade\Daux\Daux;
use Todaymade\Daux\Format\Base\RunAction; use Todaymade\Daux\Format\Base\RunAction;
use Todaymade\Daux\Tree\Content; use Todaymade\Daux\Tree\Content;
use Todaymade\Daux\Tree\Directory; use Todaymade\Daux\Tree\Directory;
use Todaymade\Daux\Tree\Entry;
class Generator class Generator
{ {
@ -45,7 +44,7 @@ class Generator
$publisher->publish($tree); $publisher->publish($tree);
} }
private function generateRecursive(Entry $tree, Config $params, $base_url = '') private function generateRecursive(Directory $tree, Config $params, $base_url = '')
{ {
$final = ['title' => $this->prefix . $tree->getTitle()]; $final = ['title' => $this->prefix . $tree->getTitle()];
$params['base_url'] = $params['base_page'] = $base_url; $params['base_url'] = $params['base_page'] = $base_url;

View File

@ -97,30 +97,18 @@ class Publisher
protected function createPage($parent_id, $entry, $published) protected function createPage($parent_id, $entry, $published)
{ {
if ($this->previous_title != "Creating") { echo "- " . $this->niceTitle($entry['file']->getUrl()) . "\n";
$this->previous_title = "Creating";
echo "Creating Pages...\n";
}
echo "- " . $this->niceTitle($entry['file']->getUrl());
$published['version'] = 1; $published['version'] = 1;
$published['id'] = $this->client->createPage($parent_id, $entry['title'], "The content will come very soon !"); $published['id'] = $this->client->createPage($parent_id, $entry['title'], "The content will come very soon !");
echo "\n";
return $published; return $published;
} }
protected function createPlaceholderPage($parent_id, $entry, $published) protected function createPlaceholderPage($parent_id, $entry, $published)
{ {
if ($this->previous_title != "Creating Placeholder") { echo "- " . $entry['title'] . "\n";
$this->previous_title = "Creating Placeholder";
echo "Creating Placeholder Pages...\n";
}
echo "- " . $entry['title'];
$published['version'] = 1; $published['version'] = 1;
$published['id'] = $this->client->createPage($parent_id, $entry['title'], ""); $published['id'] = $this->client->createPage($parent_id, $entry['title'], "");
echo "\n";
return $published; return $published;
} }

View File

@ -35,7 +35,7 @@ class Generator
/** /**
* Recursively generate the documentation * Recursively generate the documentation
* *
* @param \Todaymade\Daux\Tree\Entry $tree * @param Directory $tree
* @param string $output_dir * @param string $output_dir
* @param \Todaymade\Daux\Config $params * @param \Todaymade\Daux\Config $params
* @param OutputInterface $output * @param OutputInterface $output
@ -43,7 +43,7 @@ class Generator
* @param string $base_url * @param string $base_url
* @throws \Exception * @throws \Exception
*/ */
private function generateRecursive($tree, $output_dir, $params, $output, $width, $base_url = '') private function generateRecursive(Directory $tree, $output_dir, $params, $output, $width, $base_url = '')
{ {
$params['base_url'] = $params['base_page'] = $base_url; $params['base_url'] = $params['base_page'] = $base_url;