画像ライブラリーはクラス化、TGA対応の追加

This commit is contained in:
2025-12-31 10:37:53 +09:00
parent 9a5d5db5f3
commit 105cbdec7d
11 changed files with 384 additions and 213 deletions

View File

@@ -2,7 +2,8 @@
if (!isset($argv[1])) die('usage: php newpost.php [slug]');
if (file_exists("blog/{$argv[1]}.md")) die("エラー: ファイル「blog/{$argv[1]}.md」は既に存在します。\n");
define('CURL_ENABLED', false); // 黙れ・・・
define('ROOT', realpath(__DIR__));
require_once ROOT.'/config/config.php';
include('util.php');
$post = fopen("blog/{$argv[1]}.md", "w");
fwrite($post, "title: 【】\n");
@@ -13,5 +14,4 @@ fwrite($post, "thumbnail: \n");
fwrite($post, "thumborient: center\n");
fwrite($post, "category: \n");
fwrite($post, "----\n");
fclose($post);
?>
fclose($post);