{"id":15022806,"url":"https://github.com/voxpupuli/puppet-format","last_synced_at":"2025-10-24T14:30:41.999Z","repository":{"id":37578050,"uuid":"252595575","full_name":"voxpupuli/puppet-format","owner":"voxpupuli","description":"Text formatting functions for puppet lang","archived":false,"fork":false,"pushed_at":"2024-09-17T07:50:42.000Z","size":460,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-01-16T05:15:03.768Z","etag":null,"topics":["centos-puppet-module","debian-puppet-module","fedora-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","sles-puppet-module","ubuntu-puppet-module","windows-puppet-module"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","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},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2020-04-03T00:32:34.000Z","updated_at":"2024-09-17T07:50:44.000Z","dependencies_parsed_at":"2023-12-19T08:07:08.391Z","dependency_job_id":"f6cebb80-1269-4b80-8e49-9d18473cc476","html_url":"https://github.com/voxpupuli/puppet-format","commit_stats":{"total_commits":50,"total_committers":6,"mean_commits":8.333333333333334,"dds":"0.42000000000000004","last_synced_commit":"55a25f8fdcd7425c66b98a9d3784c34a62bfaf7f"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-format/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237901417,"owners_count":19384389,"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":["centos-puppet-module","debian-puppet-module","fedora-puppet-module","hacktoberfest","linux-puppet-module","oraclelinux-puppet-module","puppet","redhat-puppet-module","scientific-puppet-module","sles-puppet-module","ubuntu-puppet-module","windows-puppet-module"],"created_at":"2024-09-24T19:58:24.331Z","updated_at":"2025-10-24T14:30:41.003Z","avatar_url":"https://github.com/voxpupuli.png","language":"Ruby","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":[],"sub_categories":[],"readme":"# puppet-format\n\n[![CI](https://github.com/voxpupuli/puppet-format/actions/workflows/ci.yml/badge.svg)](https://github.com/voxpupuli/puppet-format/actions/workflows/ci.yml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/format.svg)](https://forge.puppetlabs.com/puppet/format)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/format.svg)](https://forge.puppetlabs.com/puppet/format)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/format.svg)](https://forge.puppetlabs.com/puppet/format)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/format.svg)](https://forge.puppetlabs.com/puppet/format)\n[![Apache-2 License](https://img.shields.io/github/license/voxpupuli/puppet-format.svg)](LICENSE)\n\nThis module includes puppet functions to transform your boring, old and worn looking ascii characters into beautiful looking masterpieces.\n\n#### Table of Contents\n\n1. [Description](#description)\n2. [Setup - The basics of getting started with format](#setup)\n    * [What format affects](#what-format-affects)\n    * [Setup requirements](#setup-requirements)\n    * [Beginning with format](#beginning-with-format)\n3. [Usage - Configuration options and additional functionality](#usage)\n4. [Limitations - OS compatibility, etc.](#limitations)\n5. [Development - Guide for contributing to the module](#development)\n\n## Description\n\nWith this module you can produce amazing looking tables, colorized strings and others transformations for output to the terminal screen.  While this module is mainly for bolt plans it could be used in puppet code anywhere.\n\n## Setup\n\n### What format affects\n\nThis module includes functions and datatypes only.\n\n### Setup Requirements\n\nThis module requires the `terminal-table` gem. It's a direct dependency for\nbolt, so open source users don't need to install additional gems. For PE users\nthat want to use the function, they need to install terminal-table for the\norchestrator:\n\n```\nGEM_PATH=/opt/puppetlabs/server/apps/bolt-server/lib/ruby GEM_HOME=/opt/puppetlabs/server/apps/bolt-server/lib/ruby /opt/puppetlabs/puppet/bin/gem install terminal-table --no-document\n```\n\n## Usage\n\nThis module only contains functions to format and transform data.  It will not output anything to stdout and only return\nformatted data ready to be sent to stdout or stderr.\n\n### Functions\n\n* format::colorize(\"string\", red) # options include red, green, yellow, fatal, warning, good.\n* format::table([['one', 1], ['two', 2]])\n\nThe print_table function wraps the [Terminal-Table](https://github.com/tj/terminal-table) ruby gem in a function\nand tries to provide the same API.  You can create a table in two ways.\n  * by passing a TableRows type  (Array of Arrays)\n  * by passing a TerminalTable type (Hash of various keys)\n\nExample:\n\n```shell\n# puppet code\nformat::table({title =\u003e 'GPU list', head =\u003e ['Name', 'QTY'],\n               rows =\u003e [['GTX 1070', 5], ['GTX 2080 ti', 1]],\n               style =\u003e {width =\u003e 60 }\n            })\n```\n\nWhich produces a table like:\n\n\n```\n+-----------------------------+----------------------------+\n|                         GPU list                         |\n+-----------------------------+----------------------------+\n| Name                        | QTY                        |\n+-----------------------------+----------------------------+\n| GTX 1070                    | 5                          |\n| GTX 2080 ti                 | 1                          |\n+-----------------------------+----------------------------+\n```\n\nOr with colors\n\n![](https://github.com/voxpupuli/puppet-format/blob/master/images/table_format.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-format/lists"}