Skip to content

Instantly share code, notes, and snippets.

@KitaitiMakoto
Created October 18, 2013 18:10
Show Gist options
  • Save KitaitiMakoto/7045687 to your computer and use it in GitHub Desktop.
Save KitaitiMakoto/7045687 to your computer and use it in GitHub Desktop.
#!/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