<?php header('Content-Type: application/json');
require 'funcs.php';
$vsts = ReadCSV("store.csv");
// Here are the items to change for a specific site
$site_name = "GyL Synths";
$site_url = "https://getdunne.net/GyL";
$obj = new stdClass();
$obj->name = $site_name;
$obj->url = $site_url;
$obj->version = "1.0.0";
$obj->products = array();
foreach ($vsts as $vst) {
$product = new stdClass();
$product->name = $vst['name'];
$product->creator = $vst['creator'];
$product->type = (strpos(strtolower($vst['tags']), 'instrument') !== false) ? 'instrument' : 'effect';
$product->stage = 'release';
$product->pageUrl = $site_url . '/vst.php?id=' . $vst['name'];
$product->screenshotUrl = $site_url . '/images/' . $vst['name'] . '.png';
$product->description = $vst['desc'];
$product->tags = ConvertTags($vst['tags']);
$product->bundles = [MakeBundle($vst['name'], ['win32'], 'vst', $site_url . '/VST/' . $vst['name'] . '.zip')];
$product->description = str_replace('|', ';', $vst['desc']);
array_push($obj->products, $product);
}
echo json_encode($obj, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
?>