diff --git a/generate b/generate index 9c5d154..face21b 100755 --- a/generate +++ b/generate @@ -66,5 +66,5 @@ software, even if advised of the possibility of such damage. require_once("vendor/autoload.php"); -$application = new \Todaymade\Daux\Generator\Application(); +$application = new \Todaymade\Daux\Console\Application(); $application->run(); diff --git a/libs/Generator/Application.php b/libs/Console/Application.php similarity index 93% rename from libs/Generator/Application.php rename to libs/Console/Application.php index 58fdc2b..7a66c68 100644 --- a/libs/Generator/Application.php +++ b/libs/Console/Application.php @@ -1,4 +1,4 @@ -write($title); + + $length = function_exists("mb_strlen")? mb_strlen($title) : strlen($title); + // 8 is the length of the label + 2 let it breathe - $padding = $width - strlen($title) - 10; + $padding = $width - $length - 10; try { $response = $closure(); } catch (\Exception $e) { diff --git a/libs/Format/Confluence/Generator.php b/libs/Format/Confluence/Generator.php index 779220a..361f9c4 100644 --- a/libs/Format/Confluence/Generator.php +++ b/libs/Format/Confluence/Generator.php @@ -3,9 +3,9 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Todaymade\Daux\Config; +use Todaymade\Daux\Console\RunAction; use Todaymade\Daux\Daux; use Todaymade\Daux\Format\Confluence\CommonMark\CommonMarkConverter; -use Todaymade\Daux\Format\Base\RunAction; use Todaymade\Daux\Tree\Content; use Todaymade\Daux\Tree\Directory; diff --git a/libs/Format/Confluence/Publisher.php b/libs/Format/Confluence/Publisher.php index 8da36ce..9c8cc9f 100644 --- a/libs/Format/Confluence/Publisher.php +++ b/libs/Format/Confluence/Publisher.php @@ -1,12 +1,10 @@ daux->local_base); + GeneratorHelper::copyAssets($destination, $this->daux->local_base); } ); diff --git a/libs/Generator/Helper.php b/libs/GeneratorHelper.php similarity index 97% rename from libs/Generator/Helper.php rename to libs/GeneratorHelper.php index 48f50d6..65c7cc6 100644 --- a/libs/Generator/Helper.php +++ b/libs/GeneratorHelper.php @@ -1,6 +1,6 @@ -