{"id":23359878,"url":"https://github.com/firehed/counter","last_synced_at":"2025-04-07T20:46:55.035Z","repository":{"id":138434844,"uuid":"2130186","full_name":"Firehed/Counter","owner":"Firehed","description":"CLI progressmeter/counter","archived":false,"fork":false,"pushed_at":"2011-07-30T21:16:52.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T22:27:13.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Firehed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-30T21:10:53.000Z","updated_at":"2020-07-28T00:13:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"16838ae5-118e-48db-b18f-bfd39e0df8c1","html_url":"https://github.com/Firehed/Counter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2FCounter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2FCounter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2FCounter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2FCounter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Firehed","download_url":"https://codeload.github.com/Firehed/Counter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247729487,"owners_count":20986392,"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":[],"created_at":"2024-12-21T11:12:13.566Z","updated_at":"2025-04-07T20:46:54.459Z","avatar_url":"https://github.com/Firehed.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Command Line Progress Counter\n=============================\n\nA simple tool to track the progress of your upgrades and other long-running\ntasks. It has the added benefit over a simple homegrown system by displaying the\ncounter on the current output line.\n\nThis is not intended for web usage - it is designed around CLI scripts. It was\ndesigned for upgrade scripts that run on tens of thousands of objects where\nupgrades by SQL queries are not a practical solution (cache interference, logic\nbetter handled in PHP, etc.) but should work for anything that needs a counter,\nsuch as unit test output or deployment scripts.\n\nUsage\n-----\n\n\tupgrader.php:\n\n\t\u003c?php\n\tinclude './counter.php';\n\t$things_to_upgrade = array(); // DB result, iterator, etc.\n\tcounter::start('Some thing that needs upgrading', count($things_to_upgrade));\n\tforeach ($things_to_upgrade as $thing) {\n\t\t$pass = $thing-\u003eupgrade(); // return true on success, false on fail\n\t\tcounter::next($pass ? '.' : 'E');\n\t}\n\nOutput\n------\n\nDuring upgrades:\n\n\t$ php upgrader.php\n\n\tSome thing that needs upgrading:\n\t........................E........................            049/500\n\nAfter completion:\n\n\t$ php upgrader.php\n\n\tSome thing that needs upgrading:\n\t........................E........................E.......... 060/500\n\t..............E........................E.................... 120/500\n\t....E........................E........................E..... 180/500\n\t...................E........................E............... 240/500\n\t.........E........................E........................E 300/500\n\t........................E........................E.......... 360/500\n\t..............E........................E.................... 420/500\n\t....E........................E........................E..... 480/500\n\t...................E                                         500/500\n\n\t$\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fcounter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirehed%2Fcounter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fcounter/lists"}