{"id":49311066,"url":"https://github.com/enderahmetyurt/typed_print","last_synced_at":"2026-04-28T14:00:47.669Z","repository":{"id":353022528,"uuid":"1217080798","full_name":"enderahmetyurt/typed_print","owner":"enderahmetyurt","description":"TypedPrint provides zero-dependency, beautifully formatted table output for Ruby data structures with automatic column sizing, alignment options, custom headers, and column filtering.","archived":false,"fork":false,"pushed_at":"2026-04-22T21:42:56.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T12:36:02.054Z","etag":null,"topics":["cli","console-output","formatting","pretty-print","ruby","rubygems","table","terminal"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/typed_print","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/enderahmetyurt.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T14:23:27.000Z","updated_at":"2026-04-25T10:16:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/enderahmetyurt/typed_print","commit_stats":null,"previous_names":["enderahmetyurt/typed_print"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/enderahmetyurt/typed_print","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enderahmetyurt%2Ftyped_print","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enderahmetyurt%2Ftyped_print/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enderahmetyurt%2Ftyped_print/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enderahmetyurt%2Ftyped_print/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enderahmetyurt","download_url":"https://codeload.github.com/enderahmetyurt/typed_print/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enderahmetyurt%2Ftyped_print/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32337274,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["cli","console-output","formatting","pretty-print","ruby","rubygems","table","terminal"],"created_at":"2026-04-26T12:33:01.891Z","updated_at":"2026-04-27T13:00:40.541Z","avatar_url":"https://github.com/enderahmetyurt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TypedPrint\n\nBeautiful, aligned table output for Ruby hashes and objects with zero dependencies.\n\n[![Gem Version](https://badge.fury.io/rb/typed_print.svg)](https://badge.fury.io/rb/typed_print)\n[![Ruby](https://github.com/enderahmetyurt/typed_print/actions/workflows/main.yml/badge.svg)](https://github.com/enderahmetyurt/typed_print/actions/workflows/main.yml)\n[![Ruby Version](https://img.shields.io/badge/ruby-\u003e=%202.6-blue.svg)](https://www.ruby-lang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Gem Downloads](https://img.shields.io/gem/dt/typed_print)](https://rubygems.org/gems/typed_print)\n\n## Features\n\n- 🚀 Zero dependencies\n- 📊 Automatic column width calculation\n- 🎯 Smart type formatting (booleans, nil, strings)\n- 📐 Column alignment (left, right, center)\n- 🎨 Custom column headers\n- 🔍 Column filtering\n- 📝 Preserves original column order\n- 📄 Markdown table output (v0.2.0+)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n`gem 'typed_print'`\n\nOr install it yourself:\n\n`gem install typed_print`\n\n## Usage\n\n### Basic Usage\n\n```ruby\nrequire 'typed_print'\n\ndata = [\n  { name: \"Alice\", score: 100, active: true },\n  { name: \"Bob\", score: 42, active: false }\n]\n\nTypedPrint.print(data)\n```\n\nOutput:\n\n```\nName  Score Active \n------+------+-------\nAlice   100 true   \nBob      42 false  \n```\n\n### Markdown Format (NEW in v0.2.0)\n```ruby\nTypedPrint.print(data, format: :markdown)\n```\n\nOutput:\n```\n| Name  | Score | Active |\n|-------|-------|--------|\n| Alice | 100   | true   |\n| Bob   | 42    | false  |\n```\n\n### Column Alignment\n```ruby\nTypedPrint.print(data, align: { score: :right })\n```\n\nOutput:\n```\nName  Score Active \n------+------+-------\nAlice   100 true   \nBob      42 false\n```\n\n### Filter Columns\n\n```ruby\nTypedPrint.print(data, only: [:name, :score])\n```\n\nOutput:\n```\nName  Score \n------+------\nAlice   100 \nBob      42 \n```\n\n### Custom Headers\n```ruby\nTypedPrint.print(data, headers: { name: \"Username\", score: \"Points\", active: \"Status\" })\n```\n\nOutput:\n```\nUsername Points Status \n---------+------+-------\nAlice       100 true   \nBob          42 false  \n```\n\n### Return String Instead of Printing\n```ruby\ntable_string = TypedPrint.table(data)\nputs table_string.upcase\n\n# Markdown format\nmarkdown_string = TypedPrint.table(data, format: :markdown)\nFile.write(\"table.md\", markdown_string)\n````\n\n### Working with Different Data Types\n```ruby\nmixed_data = [\n  { name: \"Product A\", price: 29.99, in_stock: true, notes: nil },\n  { name: \"Product B\", price: 49.99, in_stock: false, notes: \"Limited edition\" }\n]\n\nTypedPrint.print(mixed_data)\n```\n\nOutput:\n```\nName      Price In_stock Notes        \n----------+-------+---------+-------------\nProduct A   29.99 true                  \nProduct B   49.99 false    Limited edition\n```\n\n## API Reference\n`TypedPrint.print(data, options)` Prints the formatted table to stdout and returns `nil`.\n\n\n**Options:**\n- `align: Hash` - Column alignment (`:left`, `:right`, `:center`), defaults to `:left`\n- `only: Array` - Array of column symbols to display\n- `headers: Hash` - Custom headers for columns\n- `format: Symbol` - Output format (`:plain` or `:markdown`), defaults to `:plain`\n\n`TypedPrint.table(data, options)` returns the formatted table as a string.\n\nSame options as `print`.\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests.\n\nTo install this gem onto your local machine, run `bundle exec rake install`.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yourusername/typed_print.\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%2Fenderahmetyurt%2Ftyped_print","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenderahmetyurt%2Ftyped_print","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenderahmetyurt%2Ftyped_print/lists"}