{"id":26256741,"url":"https://github.com/orkan/utils","last_synced_at":"2025-12-31T14:32:26.618Z","repository":{"id":65747215,"uuid":"573273206","full_name":"orkan/utils","owner":"orkan","description":"Bunch of scripts collected from all around the HDD","archived":false,"fork":false,"pushed_at":"2024-04-12T23:22:51.000Z","size":741,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-13T09:01:38.568Z","etag":null,"topics":["apache-ant","app","application","batch-script","cli","console","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/orkan.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-12-02T04:19:07.000Z","updated_at":"2024-04-14T17:40:41.005Z","dependencies_parsed_at":null,"dependency_job_id":"c308d5c3-3b3b-49bd-872f-aab6a7a3f5d6","html_url":"https://github.com/orkan/utils","commit_stats":{"total_commits":109,"total_committers":1,"mean_commits":109.0,"dds":0.0,"last_synced_commit":"c53526392c62f50b3a6f76a7d1ca27bf4d95d9d4"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"purl":"pkg:github/orkan/utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkan%2Futils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkan%2Futils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkan%2Futils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkan%2Futils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/orkan","download_url":"https://codeload.github.com/orkan/utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/orkan%2Futils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265837688,"owners_count":23836558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-ant","app","application","batch-script","cli","console","php"],"created_at":"2025-03-13T20:19:04.744Z","updated_at":"2025-12-31T14:32:26.612Z","avatar_url":"https://github.com/orkan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Utils `v13.1.0`\nBunch of scripts collected from all around the HDD\n\n# Console app\n`src/Application.php`\n\nSimple, configurable, extendable, easy to use CLI app implementation.\n\n## Usage\n```php\n// Define app config and modules\n$Factory = new Factory([\n\t'app_title'   =\u003e 'My CLI app',\n]);\n\n// Initialize PHP env, load cmd line switches, set error handlers, etc...\n$App = new Application( $Factory );\n$App-\u003erun();\n\n// Do something!\n$Factory-\u003eLogger()-\u003enotice( 'Hello from ' . $Factory-\u003eget( 'app_title' ) );\n```\nSee included tools in /bin dir for more examples.\n\n# FORM Input generator\n`src/Input.php`\n\nHTML/PHP `\u003cform\u003e` input parser.\nAllows automatic import of values form POST like data arrays with value filtering.\nAllows rendering html input elements straight from php array.\n\n## Usage\nDefine:\n```php\n$fields = [\n\t'text' =\u003e [\n\t\t'type'   =\u003e 'text',\n\t\t'filter' =\u003e 'strtoupper',\n\t],\n\t'radios' =\u003e [\n\t\t'type'   =\u003e 'radio',\n\t\t'defval' =\u003e 'radC',\n\t\t'items'  =\u003e [\n\t\t\t'radA' =\u003e 'Tag A',\n\t\t\t'radB' =\u003e 'Tag B',\n\t\t\t'radC' =\u003e 'Tag C',\n\t\t],\n\t],\n];\n```\nParse:\n```php\nforeach ( $fields as $name =\u003e $field ) {\n\t$Input = new Input( $field, $_POST ); // Create Input with value extracted from POST array\n\tsaveDB( $name, $Input-\u003eval() ); // Save filtered value to DB\n\techo $Input-\u003egetContents(); // Render element on HTML page\n}\n```\n\n# Thumbnail generator\n`src/Thumbnail.php`\n\n@todo Add description...\n\n# PHP cli apps\n\n- `bin/app_env_switch.php` - Switch between multiple configuration files.\n- `bin/app_files_quantity.php` - Copy files from one dir to another with quantity limit and sorting features.\n\n## About\n### Third Party Packages\n- none\n\n### Installation\n`$ composer require orkan/utils`\n\n### Author\n[Orkan](https://github.com/orkan)\n\n### License\nMIT\n\n### Updated\nFri, 19 Sep 2025 06:15:21 +02:00\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forkan%2Futils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Forkan%2Futils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Forkan%2Futils/lists"}