{"id":26241572,"url":"https://github.com/a6b8/console-hash-array-for-ruby","last_synced_at":"2025-03-13T08:32:13.941Z","repository":{"id":59152347,"uuid":"398405770","full_name":"a6b8/console-hash-array-for-ruby","owner":"a6b8","description":"Console print progress bar for hash arrays.","archived":false,"fork":false,"pushed_at":"2022-01-22T00:56:11.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T16:08:16.980Z","etag":null,"topics":["development","hash","print","ruby"],"latest_commit_sha":null,"homepage":"","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/a6b8.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-20T21:38:03.000Z","updated_at":"2022-01-10T14:14:51.000Z","dependencies_parsed_at":"2022-09-13T11:00:55.592Z","dependency_job_id":null,"html_url":"https://github.com/a6b8/console-hash-array-for-ruby","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/a6b8%2Fconsole-hash-array-for-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a6b8%2Fconsole-hash-array-for-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a6b8%2Fconsole-hash-array-for-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a6b8%2Fconsole-hash-array-for-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a6b8","download_url":"https://codeload.github.com/a6b8/console-hash-array-for-ruby/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243369732,"owners_count":20280063,"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":["development","hash","print","ruby"],"created_at":"2025-03-13T08:32:12.698Z","updated_at":"2025-03-13T08:32:13.663Z","avatar_url":"https://github.com/a6b8.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/custom/console-hash-array.svg\" height=\"45px\" name=\"# Console Hash Array for Ruby\" alt=\"Console Hash Array for Ruby\"\u003e\n\u003c/a\u003e\n\nConsole print progress bar for hash arrays.\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/examples.svg\" height=\"45px\" name=\"examples\" alt=\"Examples\"\u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\n**Default output without options**\n```ruby\nrequire 'console_hash_array'\n\ngroups = ConsoleHashArray.example()\ngroups.keys.each.with_index do | key, rindex |\n    ConsoleHashArray.console( groups, rindex, nil, key, :left )\n    groups[ key ].each.with_index do | item, cindex |\n        ConsoleHashArray.console( groups, rindex, cindex, key, :right )\n    end\nend\n\n# =\u003e \n# [0]  Nurwë                ..............................\n# [1]  Legolas              ..............................\n# [2]  Primrose Boffin      ..............................\n# [3]  Aranuir              .......\n# [4]  Ruby Gardner         ..............................\n# [5]  Harding              ..............................\n# [6]  Írimon               ..............................\n# [7]  Torhir Ifant         ..............................\n# [8]  Anairë               ..............................\n# [9]  Golasgil             ..............................\n# [10]  Mîm                 ..............................\n# [11]  Tobold Hornblower   ..............\n# [12]  Thrór               .....\n# [13]  Gerda Boffin        ..............................\n\n```\n\u003cbr\u003e\n\n\n**Custom output with options**\n```ruby\nrequire 'console_hash_array'\n\ngroups = ConsoleHashArray.example()\n\noptions = { \n    right__boxes_total: 10,\n    style__spaces: '.',\n    style__steps: '#',\n    print__left: \"{{rindex}}.{{key}}{{left__spaces}}..\"\n} \n\ngroups.keys.each.with_index do | key, rindex |\n    ConsoleHashArray.console( groups, rindex, nil, key, :left )\n    groups[ key ].each.with_index do | item, cindex |\n        ConsoleHashArray.console( groups, rindex, cindex, key, :right, options )\n    end\nend\n\n# =\u003e \n# 0. Nurwë                 ####################\n# 1. Legolas               ##\n# 2. Primrose Boffin       #####\n# 3. Aranuir               ###########\n# 4. Ruby Gardner          ########\n# 5. Harding               ##########\n# 6. Írimon                ####################\n# 7. Torhir Ifant          ####################\n# 8. Anairë                ####\n# 9. Golasgil              ####\n# 10. Mîm                  \n# 11. Tobold Hornblower    #####\n# 12. Thrór                ####################\n# 13. Gerda Boffin         #####\n\n```\n\u003cbr\u003e\n\n\u003ca href=\"#headline\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/table-of-contents.svg\" height=\"45px\" name=\"table-of-contents\" alt=\"Table of Contents\"\u003e\n\u003c/a\u003e\n\u003cbr\u003e\n\n1. [Examples](#examples)\u003cbr\u003e\n1. [Quickstart](#quickstart)\u003cbr\u003e\n2. [Setup](#setup)\n3. [Methods](#methods)\u003cbr\u003e\n4. [Options](#options)\u003cbr\u003e\n5. [Contributing](#contributing)\u003cbr\u003e\n6. [Limitations](#limitations)\u003cbr\u003e\n7. [License](#license)\u003cbr\u003e\n8. [Code of Conduct](#code-of-conduct)\u003cbr\u003e\n9. [Support my Work](#support-my-work)\u003cbr\u003e\n\n\u003cbr\u003e\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/quickstart.svg\" height=\"45px\" name=\"quickstart\" alt=\"Quickstart\"\u003e\n\u003c/a\u003e\n\n```ruby\nrequire 'console_hash_array'\n\ngroups = ConsoleHashArray.example()\ngroups.keys.each.with_index do | key, rindex |\n    ConsoleHashArray.console( groups, rindex, nil, key, :left )\n    groups[ key ].each.with_index do | item, cindex |\n        ConsoleHashArray.console( groups, rindex, cindex, key, :right )\n    end\nend\n```\n\n\u003cbr\u003e\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/setup.svg\" height=\"45px\" name=\"setup\" alt=\"Setup\"\u003e\n\u003c/a\u003e\n\nAdd this line to your application's Gemfile:\n\n```bash\ngem console_hash_array\n```\n\nAnd then execute:\n```bash\nbundle install console_hash_array\n```\n\nOr install it yourself as:\n```bash\ngem install console_hash_array\n```\n\nOn Rubygems: \n- Gem: https://rubygems.org/gems/console_hash_array\n- Profile: https://rubygems.org/profiles/a6b8\n\n\n\u003cbr\u003e\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/methods.svg\" height=\"45px\" name=\"methods\" alt=\"Methods\"\u003e\n\u003c/a\u003e\n\n### .example()\n```ruby\nrequire 'console_hash_array'\n\ngroups = ConsoleHashArray.example()\n```\n**Return**\u003cbr\u003e\nHash    \n\n\n### .console()\n```ruby\nrequire 'console_hash_array'\n\nConsoleHashArray.console( groups, rindex, cindex, key, :left )\n```\n\n\n**Input**\n| | **Type** | **Required** | **Description** |\n|------:|:------|:------|:------|\n| **groups** | ```Hash of Arrays``` | Yes | Full Groups Hash |\n| **rindex** | ```Int``` | Yes | Set row index for calculation and output options. |\n| **cindex** | ```Int``` | :left = nil, :right = Yes | Set column index for calculation and output options. |\n| **key** | ```String``` or ```Symbol``` | Yes | Set current key from groups hash. |\n| **mode** | ```Symbol``` | Yes | Use ```:left``` for initialization row, ```:right``` will update progres line |\n| **options** | ```Hash``` | No | Change default behaviour. See options for more informations. |\n\n**Return**\u003cbr\u003e\nHash (p)\n\u003cbr\u003e\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/options.svg\" height=\"45px\" name=\"options\" alt=\"Options\"\u003e\n\u003c/a\u003e\n\n| Nr | Name | Key | Default | Type | Description |\n| :-- | :-- | :-- | :-- | :-- | :-- |\n| 1 | Boxes Total | `:right__boxes_total` | `30`| Int | Set length of progres bar |\n| 2 | Spaces | `:style__spaces` | `\" \"`| String | Set Character of space |\n| 3 | Steps | `:style__steps` | `\".\"`| String | Set Character of steps |\n| 4 | Print Left | `:print__left` | `\"[{{rindex}}]  {{key}} {{left__spaces}}  \"`| String | Set Structure for `:left` |\n\n\u003cbr\u003e\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/contributing.svg\" height=\"45px\" name=\"contributing\" alt=\"Contributing\"\u003e\n\u003c/a\u003e\n\nBug reports and pull requests are welcome on GitHub at https://github.com/a6b8/console-hash-array-for-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/a6b8/console-hash-array-for-ruby/blob/master/CODE_OF_CONDUCT.md).\n\n\u003cbr\u003e\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/limitations.svg\" height=\"45px\" name=\"limitations\" alt=\"Limitations\"\u003e\n\u003c/a\u003e\n\n- Build for development usage\n- No input validation\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/credits.svg\" height=\"45px\" name=\"credits\" alt=\"Credits\"\u003e\n\u003c/a\u003e\n\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/license.svg\" height=\"45px\" name=\"license\" alt=\"License\"\u003e\n\u003c/a\u003e\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n\u003cbr\u003e\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/code-of-conduct.svg\" height=\"45px\" name=\"code-of-conduct\" alt=\"Code of Conduct\"\u003e\n\u003c/a\u003e\n    \nEveryone interacting in the console-hash-array-for-ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/a6b8/console-hash-array-for-ruby/blob/master/CODE_OF_CONDUCT.md).\n\n\u003cbr\u003e\n\n\u003ca href=\"#table-of-contents\"\u003e\n\u003cimg href=\"#table-of-contents\" src=\"https://raw.githubusercontent.com/a6b8/a6b8/main/assets/headlines/default/star-us.svg\" height=\"45px\" name=\"star-us\" alt=\"Star Us\"\u003e\n\u003c/a\u003e\n\nPlease ⭐️ star this Project, every ⭐️ star makes us very happy!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa6b8%2Fconsole-hash-array-for-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa6b8%2Fconsole-hash-array-for-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa6b8%2Fconsole-hash-array-for-ruby/lists"}