Initial upload

This commit is contained in:
2025-11-11 11:47:15 +01:00
commit 7c24dab288
48 changed files with 2761 additions and 0 deletions

25
info.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
header('Content-Type: application/json; charset=utf-8');
$recipesDir = __DIR__ . '/recipes';
if (!is_dir($recipesDir)) {
echo json_encode(["recipes" => new stdClass()], JSON_PRETTY_PRINT);
exit;
}
$categories = array_filter(glob($recipesDir . '/*'), 'is_dir');
$output = ["recipes" => []];
foreach ($categories as $categoryPath) {
$categoryName = basename($categoryPath);
$items = array_filter(glob($categoryPath . '/*'), 'is_dir');
$itemNames = array_map('basename', $items);
if (!empty($itemNames)) {
$output["recipes"][$categoryName] = array_values($itemNames);
}
}
echo json_encode($output, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
?>