mirror of
https://github.com/there4/markdown-resume.git
synced 2024-12-03 08:59:35 -05:00
Merge pull request #26 from there4/issue-24-template-list
Release 2.0.6: Issue 24 template list
This commit is contained in:
commit
0ac35d16a8
@ -24,7 +24,7 @@ at the [blog post for the project][blog].
|
|||||||
|
|
||||||
## Help
|
## Help
|
||||||
```
|
```
|
||||||
Markdown Resume Generator version 2.0.5 by Craig Davis
|
Markdown Resume Generator version 2.0.6 by Craig Davis
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
[options] command [arguments]
|
[options] command [arguments]
|
||||||
@ -100,6 +100,7 @@ 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.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
|
||||||
|
BIN
bin/md2resume
BIN
bin/md2resume
Binary file not shown.
@ -8,7 +8,7 @@
|
|||||||
"html5"
|
"html5"
|
||||||
],
|
],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"version": "2.0.5",
|
"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": [
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user