Merge pull request #2 from there4/master
Merge changes from markdown-resume project into my forked version
This commit is contained in:
commit
b24f0f9737
|
@ -24,7 +24,7 @@ at the [blog post for the project][blog].
|
||||||
|
|
||||||
## Help
|
## Help
|
||||||
```
|
```
|
||||||
Markdown Resume Generator version 2.0.4 by Craig Davis
|
Markdown Resume Generator version 2.0.6 by Craig Davis
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
[options] command [arguments]
|
[options] command [arguments]
|
||||||
|
@ -100,6 +100,8 @@ are a more comfortable with html than markdown, you should use it.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
* __2.0.6__ : Fix empty template list from phar file to close #24
|
||||||
|
* __2.0.5__ : Remove default value for the `--refresh` option to close #22
|
||||||
* __2.0.4__ : Fix path resolution problem with absolute paths to close #16
|
* __2.0.4__ : Fix path resolution problem with absolute paths to close #16
|
||||||
* __2.0.3__ : Add optional duration to the `--refresh` option to close #15
|
* __2.0.3__ : Add optional duration to the `--refresh` option to close #15
|
||||||
* __2.0.2__ : Add new dependency check for `mbstring` to close #20
|
* __2.0.2__ : Add new dependency check for `mbstring` to close #20
|
||||||
|
|
BIN
bin/md2resume
BIN
bin/md2resume
Binary file not shown.
|
@ -8,7 +8,7 @@
|
||||||
"html5"
|
"html5"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "2.0.4",
|
"version": "2.0.6",
|
||||||
"selfupdatepath": "://github.com/there4/markdown-resume/raw/master/bin/md2resume",
|
"selfupdatepath": "://github.com/there4/markdown-resume/raw/master/bin/md2resume",
|
||||||
"selfupdateversion": "://github.com/there4/markdown-resume/raw/master/version",
|
"selfupdateversion": "://github.com/there4/markdown-resume/raw/master/version",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
|
@ -33,17 +33,15 @@ class HtmlCommand extends Command
|
||||||
->addOption(
|
->addOption(
|
||||||
'template',
|
'template',
|
||||||
't',
|
't',
|
||||||
InputOption::VALUE_OPTIONAL,
|
InputOption::VALUE_REQUIRED,
|
||||||
'Which of the templates to use'
|
'Which of the templates to use'
|
||||||
)
|
)
|
||||||
->addOption(
|
->addOption(
|
||||||
'refresh',
|
'refresh',
|
||||||
'r',
|
'r',
|
||||||
InputOption::VALUE_OPTIONAL,
|
InputOption::VALUE_REQUIRED,
|
||||||
'Regenerate the html and include a meta command to refresh the ' .
|
'Regenerate the html and include a meta command to refresh the ' .
|
||||||
'document every periodically. Measured in seconds. Defaults to' .
|
'document every periodically. Measured in seconds.'
|
||||||
'5 seconds',
|
|
||||||
5
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class PdfCommand extends HtmlCommand
|
||||||
->addOption(
|
->addOption(
|
||||||
'template',
|
'template',
|
||||||
't',
|
't',
|
||||||
InputOption::VALUE_OPTIONAL,
|
InputOption::VALUE_REQUIRED,
|
||||||
'Which of the templates to use'
|
'Which of the templates to use'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,16 @@ class TemplatesCommand extends Command
|
||||||
{
|
{
|
||||||
$this->app = $this->getApplication();
|
$this->app = $this->getApplication();
|
||||||
$tplData = array('templates' => array());
|
$tplData = array('templates' => array());
|
||||||
foreach (glob($this->app->templatePath . '/*', GLOB_ONLYDIR) as $dir) {
|
foreach (new \DirectoryIterator($this->app->templatePath) as $fileInfo) {
|
||||||
|
if ($fileInfo->isDot() || !$fileInfo->isDir()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
$descriptionPath = $fileInfo->getPathname() . '/description.txt';
|
||||||
|
print $descriptionPath . "\n";
|
||||||
$tplData['templates'][] = (object) array(
|
$tplData['templates'][] = (object) array(
|
||||||
'name' => basename($dir),
|
'name' => $fileInfo->getBasename(),
|
||||||
'description' => file_exists($dir . '/description.txt')
|
'description' => file_exists($descriptionPath)
|
||||||
? trim(file_get_contents($dir . '/description.txt'))
|
? trim(file_get_contents($descriptionPath))
|
||||||
: 'No description available'
|
: 'No description available'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue