[dir]'); $dir = isset($argv[2]) ? $argv[2] : 'blog'; if (file_exists("{$dir}/{$argv[1]}.md")) die("エラー: ファイル「{$dir}/{$argv[1]}.md」は既に存在します。\n"); define('ROOT', realpath(__DIR__)); require_once ROOT.'/config/config.php'; include('util.php'); $post = fopen("{$dir}/{$argv[1]}.md", "w"); fwrite($post, "title: 【】\n"); fwrite($post, "uuid: ".uuid()."\n"); fwrite($post, "author: 諏訪子\n"); fwrite($post, "draft: true\n"); fwrite($post, "date: ".date("Y-m-d H:i:s")."\n"); fwrite($post, "thumbnail: \n"); fwrite($post, "thumborient: center\n"); fwrite($post, "category: \n"); fwrite($post, "css: \n"); fwrite($post, "----\n"); fclose($post);