<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'benchmark'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'title' => 'Benchmark.js <sup>v1.0.0</sup>', 'url' => 'https://github.com/bestiejs/benchmark.js/blob/master/benchmark.js')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'docdown'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.php'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'title' => 'Docdown <sup>v1.0.0</sup>', 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'punycode'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'url' => 'https://github.com/bestiejs/punycode.js/blob/master/punycode.js')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'lodash'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'title' => 'Lo-Dash <sup>v0.9.1</sup>', 'toc' => 'categories', 'url' => 'https://github.com/bestiejs/lodash/blob/master/lodash.js')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $_GET["f"] = isset($_GET["f"]) ? $_GET["f"] : "benchmark"; $_GET["f"] = preg_replace("#(\\.*[\\/])+#", "", $_GET["f"]); $_GET["f"] = $_GET["f"] . (preg_match("/\\.[a-z]+\$/", $_GET["f"]) ? "" : ".js"); // output filename $_GET["o"] = isset($_GET["o"]) ? $_GET["o"] : basename($_GET["f"]); /*--------------------------------------------------------------------------*/ require "../vendor/docdown/docdown.php"; // generate Markdown $markdown = docdown(array("path" => "../" . $_GET["f"], "url" => "https://github.com/bestiejs/benchmark.js/blob/master/benchmark.js")); // save to a .md file file_put_contents($_GET["o"] . ".md", $markdown); // print header("Content-Type: text/plain;charset=utf-8"); echo $markdown . PHP_EOL;
<?php // cleanup requested file path $filePath = isset($_GET['f']) ? $_GET['f'] : 'benchmark'; $filePath = preg_replace('#(\\.*[\\/])+#', '', $filePath); $filePath .= preg_match('/\\.[a-z]+$/', $filePath) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $outputName = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $outputName = $_SERVER['argv'][1]; } else { $outputName = basename($filePath); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // get package version $version = json_decode(file_get_contents('../package.json'))->version; // generate Markdown $markdown = docdown(array('path' => '../' . $filePath, 'title' => '<a href="http://benchmarkjs.com/">Benchmark.js</a> <sup>v' . $version . '</sup>', 'url' => 'https://github.com/bestiejs/benchmark.js/blob/master/benchmark.js')); // save to a .md file file_put_contents($outputName . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested file path $filePath = isset($_GET['f']) ? $_GET['f'] : 'platform'; $filePath = preg_replace('#(\\.*[\\/])+#', '', $filePath); $filePath .= preg_match('/\\.[a-z]+$/', $filePath) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $outputName = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $outputName = $_SERVER['argv'][1]; } else { $outputName = basename($filePath); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // get package version $version = json_decode(file_get_contents('../package.json'))->version; // generate Markdown $markdown = docdown(array('path' => '../' . $filePath, 'title' => 'Platform.js <sup>v' . $version . '</sup>', 'url' => 'https://github.com/bestiejs/platform.js/blob/master/platform.js')); // save to a .md file file_put_contents($outputName . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $_GET['f'] = isset($_GET['f']) ? $_GET['f'] : 'benchmark'; $_GET['f'] = preg_replace('#(\\.*[\\/])+#', '', $_GET['f']); $_GET['f'] = $_GET['f'] . (preg_match('/\\.[a-z]+$/', $_GET['f']) ? '' : '.js'); // output filename $_GET['o'] = isset($_GET['o']) ? $_GET['o'] : basename($_GET['f']); /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $_GET['f'], 'url' => 'https://github.com/bestiejs/benchmark.js/blob/master/benchmark.js')); // save to a .md file file_put_contents($_GET['o'] . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'platform'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'title' => 'Platform.js <sup>v1.0.0-pre</sup>', 'url' => 'https://github.com/bestiejs/platform.js/blob/master/platform.js')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'docdown'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.php'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'url' => 'https://github.com/jdalton/docdown/blob/master/docdown.php')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'spotlight'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'url' => 'https://github.com/bestiejs/spotlight/blob/master/spotlight.js')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested filepath $file = isset($_GET['f']) ? $_GET['f'] : 'lodash'; $file = preg_replace('#(\\.*[\\/])+#', '', $file); $file .= preg_match('/\\.[a-z]+$/', $file) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $output = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $output = $_SERVER['argv'][1]; } else { $output = basename($file); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // generate Markdown $markdown = docdown(array('path' => '../' . $file, 'title' => 'Lo-Dash <sup>v0.3.2</sup>', 'url' => 'https://github.com/bestiejs/lodash/blob/v0.3.2/lodash.js')); // save to a .md file file_put_contents($output . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;
<?php // cleanup requested file path $filePath = isset($_GET['f']) ? $_GET['f'] : 'lodash'; $filePath = preg_replace('#(\\.*[\\/])+#', '', $filePath); $filePath .= preg_match('/\\.[a-z]+$/', $filePath) ? '' : '.js'; // output filename if (isset($_GET['o'])) { $outputName = $_GET['o']; } else { if (isset($_SERVER['argv'][1])) { $outputName = $_SERVER['argv'][1]; } else { $outputName = basename($filePath); } } /*--------------------------------------------------------------------------*/ require '../vendor/docdown/docdown.php'; // get package version $version = json_decode(file_get_contents('../package.json'))->version; // generate Markdown $markdown = docdown(array('path' => '../' . $filePath, 'title' => '<a href="http://lodash.com/">Lo-Dash</a> <span>v' . $version . '</span>', 'toc' => 'categories', 'url' => 'https://github.com/lodash/lodash/blob/' . $version . '/lodash.js')); // save to a `.md` file file_put_contents($outputName . '.md', $markdown); // print header('Content-Type: text/plain;charset=utf-8'); echo $markdown . PHP_EOL;