Created
October 18, 2013 18:10
-
-
Save KitaitiMakoto/7045687 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; | |
$parser = new Denshoch\DenDenMarkdown; | |
if (count($argv) === 1) { | |
$files = array('php://stdin'); | |
} else { | |
$programName = array_shift($argv); | |
$files = $argv; | |
} | |
foreach ($files as $file) { | |
echo $parser->transform(file_get_contents($file)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment