Merge pull request #2 from there4/master

Merge changes from markdown-resume project into my forked version
This commit is contained in:
Erik Waibel 2014-05-01 20:27:46 -07:00
commit b24f0f9737
7 changed files with 18 additions and 13 deletions

View File

@ -24,7 +24,7 @@ at the [blog post for the project][blog].
## Help
```
Markdown Resume Generator version 2.0.4 by Craig Davis
Markdown Resume Generator version 2.0.6 by Craig Davis
Usage:
[options] command [arguments]
@ -100,6 +100,8 @@ are a more comfortable with html than markdown, you should use it.
## 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.3__ : Add optional duration to the `--refresh` option to close #15
* __2.0.2__ : Add new dependency check for `mbstring` to close #20

Binary file not shown.

View File

@ -8,7 +8,7 @@
"html5"
],
"license": "MIT",
"version": "2.0.4",
"version": "2.0.6",
"selfupdatepath": "://github.com/there4/markdown-resume/raw/master/bin/md2resume",
"selfupdateversion": "://github.com/there4/markdown-resume/raw/master/version",
"authors": [

View File

@ -33,17 +33,15 @@ class HtmlCommand extends Command
->addOption(
'template',
't',
InputOption::VALUE_OPTIONAL,
InputOption::VALUE_REQUIRED,
'Which of the templates to use'
)
->addOption(
'refresh',
'r',
InputOption::VALUE_OPTIONAL,
InputOption::VALUE_REQUIRED,
'Regenerate the html and include a meta command to refresh the ' .
'document every periodically. Measured in seconds. Defaults to' .
'5 seconds',
5
'document every periodically. Measured in seconds.'
);
}

View File

@ -27,7 +27,7 @@ class PdfCommand extends HtmlCommand
->addOption(
'template',
't',
InputOption::VALUE_OPTIONAL,
InputOption::VALUE_REQUIRED,
'Which of the templates to use'
);
}

View File

@ -18,11 +18,16 @@ class TemplatesCommand extends Command
{
$this->app = $this->getApplication();
$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(
'name' => basename($dir),
'description' => file_exists($dir . '/description.txt')
? trim(file_get_contents($dir . '/description.txt'))
'name' => $fileInfo->getBasename(),
'description' => file_exists($descriptionPath)
? trim(file_get_contents($descriptionPath))
: 'No description available'
);
}

View File

@ -1 +1 @@
2.0.4
2.0.6