This commit is contained in:
2025-05-20 14:15:03 -07:00
parent c074a5ef18
commit edcad561a5
179 changed files with 52733 additions and 4704 deletions

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env php
<?php
$autoloadPaths = [
__DIR__ . '/../../../autoload.php', // typical path when symlinked in vendor/bin
__DIR__ . '/../vendor/autoload.php', // fallback if run directly from source
];
$found = false;
foreach ($autoloadPaths as $path) {
if (file_exists($path)) {
require $path;
$found = true;
break;
}
}
if (!$found) {
fwrite(STDERR, "Could not locate Composer autoloader.\n");
exit(1);
}
use ofc\IconGetter;
if ($argc !== 2) {
fwrite(STDERR, "Usage: getIcon <icon-name>\n");
exit(1);
}
$icon = trim(strtolower($argv[1]));
try {
IconGetter::get($icon);
} catch (Exception $e) {
fwrite(STDERR, "Error: ".$e->getMessage().PHP_EOL);
exit(1);
}