mirror of
https://github.com/there4/markdown-resume.git
synced 2024-12-03 08:59:35 -05:00
Add functioning PDF comment
This brings us to be functionally complete. The phar build is remaining.
This commit is contained in:
@@ -54,6 +54,20 @@ class HtmlCommand extends Command
|
||||
$template = $input->getOption('template');
|
||||
$refresh = $input->getOption('refresh');
|
||||
|
||||
$rendered = $this->generateHtml($source, $template, $refesh);
|
||||
file_put_contents($destination, $rendered);
|
||||
$output->writeln(
|
||||
sprintf(
|
||||
"Wrote resume to: <info>%s</info>",
|
||||
$destination
|
||||
),
|
||||
$this->app->outputFormat
|
||||
);
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function generateHtml($source, $template, $refresh) {
|
||||
|
||||
// Check that the source file is sane
|
||||
if (!file_exists($source)) {
|
||||
$output->writeln(
|
||||
@@ -124,16 +138,7 @@ class HtmlCommand extends Command
|
||||
)
|
||||
);
|
||||
|
||||
// Save the fully rendered html to the final destination
|
||||
file_put_contents($destination, $rendered);
|
||||
$output->writeln(
|
||||
sprintf(
|
||||
"Wrote resume to: <info>%s</info>",
|
||||
$destination
|
||||
),
|
||||
$this->app->outputFormat
|
||||
);
|
||||
|
||||
return $rendered;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user