{"id":39763527,"url":"https://github.com/lukfor/magic-progress","last_synced_at":"2026-01-18T11:41:26.314Z","repository":{"id":57721174,"uuid":"273253714","full_name":"lukfor/magic-progress","owner":"lukfor","description":"A java library for simple progress monitoring on the console","archived":false,"fork":false,"pushed_at":"2020-10-13T23:37:01.000Z","size":277,"stargazers_count":18,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-04T08:43:09.253Z","etag":null,"topics":["animated-bars","java","java-library","progress-monitoring"],"latest_commit_sha":null,"homepage":"","language":"Java","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/lukfor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-18T14:01:56.000Z","updated_at":"2025-06-26T20:01:31.000Z","dependencies_parsed_at":"2022-09-04T16:20:40.687Z","dependency_job_id":null,"html_url":"https://github.com/lukfor/magic-progress","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lukfor/magic-progress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukfor%2Fmagic-progress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukfor%2Fmagic-progress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukfor%2Fmagic-progress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukfor%2Fmagic-progress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukfor","download_url":"https://codeload.github.com/lukfor/magic-progress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukfor%2Fmagic-progress/sbom","scorecard":{"id":604926,"data":{"date":"2025-08-11","repo":{"name":"github.com/lukfor/magic-progress","commit":"7c25b1dc27f806ec855beeaa3600491656215e94"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/lukfor/magic-progress/maven.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/lukfor/magic-progress/maven.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T01:21:31.199Z","repository_id":57721174,"created_at":"2025-08-21T01:21:31.199Z","updated_at":"2025-08-21T01:21:31.199Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28535177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["animated-bars","java","java-library","progress-monitoring"],"created_at":"2026-01-18T11:41:22.381Z","updated_at":"2026-01-18T11:41:26.301Z","avatar_url":"https://github.com/lukfor.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# magic-progress\n\n![build](https://github.com/lukfor/magic-progress/workflows/build/badge.svg)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.lukfor/magic-progress.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.github.lukfor%22%20AND%20a:%22magic-progress%22)\n\n\u003e A java library for simple progress monitoring using animated progress bars on the console.\n\n![Showcase](examples/showcase.gif)\n\n## Installation\n\nAdd the following dependency to your Maven Project:\n\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.github.lukfor\u003c/groupId\u003e\n      \u003cartifactId\u003emagic-progress\u003c/artifactId\u003e\n      \u003cversion\u003e0.3.2\u003c/version\u003e\n    \u003c/dependency\u003e\n\n0r include it as a dependency in your Gradle project:\n\n    compile 'com.github.lukfor:magic-progress:0.3.2'\n\n\n## Run your first Task\n\nFirst, implement the `ITaskRunnable` interface and put your code into the `run` method. You can use the provided `ITaskMonitor` to report progress:\n\n-   Use the `begin(..)` method to start a new task and to set the total amoumt of work\n\n-   Use the `worked(..)` method to notify the monitor about the progress.\n\n-   Finally, use `done()`\n\nExample:\n\n```java\nITaskRunnable task = new ITaskRunnable() {\n\n\t@Override\n\tpublic void run(ITaskMonitor monitor) {\n\n\tmonitor.begin(\"Task Name\", 100);\n\n\t\tfor (int i = 0; i \u003c 100; i++) {\n\t\t\tmonitor.worked(1);\n\t\t\ttry {\n\t\t\t\tThread.sleep(10);\n\t\t\t} catch (Exception e) {}\n\t\t}\n\n\t\tmonitor.done();\n\n\t}\n};\n```\n\nNext, use the `TaskService` API to execute the task:\n\n```java\nTaskService.run(task);\n```\n\nRelax and enjoy the beautiful ANSI animation:\n\n![Example](examples/example.gif)\n\nSee [Example.java](https://github.com/lukfor/magic-progress/tree/master/examples/Example.java).\n\n## Take Advantage of Built-In Tasks\n\n`magic-progress` provides several built-in tasks to process files or collections in an easy and reusable way. The following examples demonstrate some of the most common use cases.\n\n### Iterators and Collections\n\nUse the class `AbstractCollectionTask` to process collections or iterators. No manual progress notification is needed since everything is handled automatically by `AbstractCollectionTask`.\n\n```java\nstatic class SumTask extends AbstractCollectionTask\u003cInteger\u003e {\n\n\t\tprivate int sum = 0;\n\n\t\tpublic SumTask(Vector\u003cInteger\u003e list) {\n\t\t\tsuper(list);\n\t\t}\n\n\t\t@Override\n\t\tpublic void process(Iterator\u003cInteger\u003e iterator) {\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tsum += iterator.next();\n\t\t\t}\n\t\t}\n\n\t\tpublic int getSum() {\n\t\t\treturn sum;\n\t\t}\n\n}\n```\n\nCreate a new instance of the task an execute it using the `TaskService` API:\n\n```java\nVector\u003cInteger\u003e list = new Vector\u003cInteger\u003e();\nfor (int i = 0; i \u003c 10000000; i++) {\n\tlist.add(5);\n}\n\nSumTask task = new SumTask(list);\nTaskService.run(task);\n\nSystem.out.println(\"Sum: \" + task.getSum());\n```\n\n### Files and Downloads\n\n```java\nString url = \"http://speedtest.tele2.net/1GB.zip\";\nString file = \"download.zip\";\n\nDownloadTask task = new DownloadTask(url, file);\n\nTaskService.monitor(Components.DOWNLOAD).run(task);\n```\n\n## Execute Multiple Tasks in Parallel\n\n```java\nTaskService.setThreads(3);\nTaskService.setFailureStrategy(TaskFailureStrategy.CANCEL_TASKS);\n\nITaskRunnable task1 = createTask(\"task1\", 500, 100);\nITaskRunnable task2 = createTask(\"task2\", 600, 200);\nITaskRunnable task3 = createTask(\"task3\", 800, -1);\n\nTaskService.monitor(SPINNER, TASK_NAME,  DEFAULT).run(task1, task2, task3);\n```\n\nTODO: submit at once, multiple worker threads, how to implement task cancellation, task failure strategies\n\n## Customizing the Appearance of the Progress Bar\n\nSometimes it can be necessary to customize the progress bar appearance. For example, you want to change labels/units or want adapt the style or layout of the bar it self. To enable full customization, `magic-progress` provides the possibility to combine different components like labels and bars to build complex and fancy animations.\n\n### Labels\n\n### Progress Bars and Spinners\n\n### Creating a Custom Component\n\nComponents themselves can be created by implementing the `IProgressIndicator` interface.\n\n## ANSI support\n\nOut of the box, all progress bars are using ANSI colors to display beautiful and animated bars and print their content to stdout. However, if you prefer to print the bar to stderr or to disable colors, you can change the default behavior of `TaskService` with the following flags:\n\n```java\nTaskService.setAnimated(false);\nTaskService.setAnsiColors(true);\nTaskService.setTarget(System.err);\n```\n\nTip: Use this static methods and implement a `--no-ansi` flag and let the user decide to use it.\n\n## More examples\n\n`magic-progress` can easily be combined with [jbang](https://jbang.dev/) and [picocli](https://picocli.info/). There are several [examples](https://github.com/lukfor/magic-progress/tree/master/examples) available to get an overview about its key features and usage.\n\n## License\n\n`magic-progress` is MIT Licensed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukfor%2Fmagic-progress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukfor%2Fmagic-progress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukfor%2Fmagic-progress/lists"}