{"id":20122852,"url":"https://github.com/freaky/tikibar","last_synced_at":"2026-05-05T16:42:22.339Z","repository":{"id":142942568,"uuid":"161383085","full_name":"Freaky/tikibar","owner":"Freaky","description":"Prototypical Ruby progress bar library","archived":false,"fork":false,"pushed_at":"2018-12-12T05:48:40.000Z","size":27,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-13T07:32:07.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/Freaky.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"publiccode":null,"codemeta":null}},"created_at":"2018-12-11T19:26:30.000Z","updated_at":"2020-04-22T17:24:54.000Z","dependencies_parsed_at":"2023-04-07T07:01:22.476Z","dependency_job_id":null,"html_url":"https://github.com/Freaky/tikibar","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/Freaky%2Ftikibar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Ftikibar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Ftikibar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Freaky%2Ftikibar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Freaky","download_url":"https://codeload.github.com/Freaky/tikibar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241566171,"owners_count":19983260,"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-11-13T19:41:29.317Z","updated_at":"2026-05-05T16:42:22.270Z","avatar_url":"https://github.com/Freaky.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tikibar\n\nPrototype for a new Ruby progress bar library, taking inspiration from Rust's\n[indicatif](https://github.com/mitsuhiko/indicatif) crate.\n\n## Synopsis\n\n```ruby\nrequire \"tikibar\"\n\n# One of the many styles we might use.  Can also make custom ones.\nbar = Tikibar::Styles::Bars::Fill\n\n# Create a rendering thread all our output should go through\nout = Tikibar::Display.new\n\nbackground = Thread.new do\n  # A template using Kernel.format filtered through Tikibar::Ansi\n  fmt = \"%{bar.cyan} %\u003ceta.dim\u003e4s %\u003cpct\u003e 3d%% %{msg.green}\"\n  items = Array.new(100) { rand(1000) }\n\n  # Add a bar to the output, returning a thread-safe handle to it.\n  pb = out.add(Tikibar::Progress.new(bar: bar, len: items.size - 1, template: fmt))\n\n  out.puts \"Processing array...\"\n  items.each_with_index do |n, i|\n    pb.pos = i\n    pb.message = \"Item #{i} contains #{n}\"\n    out.puts \"Half done...\" if i == 50\n    sleep 0.04\n  end\n\n  # End with a message\n  pb.finish(\"Bam, sorted!\")\nend\n\n# Add another, completely different bar for another, concurrent task\nspinner = Tikibar::Styles::Spinners::Twirl\nfmt = \"%\u003cprefix\u003e15s %{spinner} %{bar.red} %{pos}/%{len}\"\npb = out.add(Tikibar::Progress.new(len: 256, bar: bar, spinner: spinner, template: fmt))\npb.prefix = \"Bleep bloop\"\n0.upto(256) do |i|\n  pb.prefix = pb.prefix.succ\n  pb.pos = i\n  sleep 0.03\nend\n\n# Clear the bar entirely, avoiding rendering it in the next loop.\npb.clear\n\nbackground.join\n\nout.puts \"That's pretty much it!\"\n\n# Signal Tikibar::Display to exit\nout.finish\n\n# And we're back to normal rendering\nputs \"\\\\o/\"\n\n\n```\n\nOutput:\n\n```\n-% bundle exec examples/tiki.rb\nProcessing array...\nTen down...\n█████░░░░░░░░░░░░░░░░░░░░░░░░░   3s  18% Item 18 contains 164\n    Bleep blopn ██░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 23/256\n```\n\nRecording: [![asciicast](https://asciinema.org/a/21ismS9Lh8FBCVtQjEavrUnq3.svg)](https://asciinema.org/a/21ismS9Lh8FBCVtQjEavrUnq3)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreaky%2Ftikibar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreaky%2Ftikibar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreaky%2Ftikibar/lists"}