https://github.com/voxpupuli/puppet-format
Text formatting functions for puppet lang
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.0%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Text formatting functions for puppet lang
Basic Info
- Host: GitHub
- Owner: voxpupuli
- License: apache-2.0
- Language: Ruby
- Default Branch: master
- Size: 470 KB
Statistics
- Stars: 5
- Watchers: 38
- Forks: 4
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
puppet-format
This module includes puppet functions to transform your boring, old and worn looking ascii characters into beautiful looking masterpieces.
Table of Contents
- Description
- Setup - The basics of getting started with format
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
With 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.
Setup
What format affects
This module includes functions and datatypes only.
Setup Requirements
This module requires the terminal-table gem. It's a direct dependency for
bolt, so open source users don't need to install additional gems. For PE users
that want to use the function, they need to install terminal-table for the
orchestrator:
GEM_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
Usage
This module only contains functions to format and transform data. It will not output anything to stdout and only return formatted data ready to be sent to stdout or stderr.
Functions
- format::colorize("string", red) # options include red, green, yellow, fatal, warning, good.
- format::table([['one', 1], ['two', 2]])
The print_table function wraps the Terminal-Table ruby gem in a function and tries to provide the same API. You can create a table in two ways. * by passing a TableRows type (Array of Arrays) * by passing a TerminalTable type (Hash of various keys)
Example:
```shell
puppet code
format::table({title => 'GPU list', head => ['Name', 'QTY'], rows => [['GTX 1070', 5], ['GTX 2080 ti', 1]], style => {width => 60 } }) ```
Which produces a table like:
+-----------------------------+----------------------------+
| GPU list |
+-----------------------------+----------------------------+
| Name | QTY |
+-----------------------------+----------------------------+
| GTX 1070 | 5 |
| GTX 2080 ti | 1 |
+-----------------------------+----------------------------+
Or with colors

Owner
- Name: Vox Pupuli
- Login: voxpupuli
- Kind: organization
- Email: voxpupuli@groups.io
- Location: #voxpupuli (Libera.chat)
- Website: https://voxpupuli.org
- Twitter: voxpupuliorg
- Repositories: 332
- Profile: https://github.com/voxpupuli
Modules and tooling maintained by and for the Puppet community
GitHub Events
Total
- Issues event: 1
- Delete event: 2
- Issue comment event: 2
- Push event: 5
- Pull request review event: 1
- Pull request event: 8
- Create event: 5
Last Year
- Issues event: 1
- Delete event: 2
- Issue comment event: 2
- Push event: 5
- Pull request review event: 1
- Pull request event: 8
- Create event: 5
Committers
Last synced: 8 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Tim Meusel | t****m@b****e | 30 |
| Corey Osman | c****y@n****o | 14 |
| pccibot | 1****t | 3 |
| Ewoud Kohl van Wijngaarden | e****d@k****l | 3 |
| markuszilch | z****s@w****e | 2 |
| Reid Vandewiele | r****d@p****m | 1 |
| Massimiliano Adamo | m****o@g****m | 1 |
| Jason Straw | j****w@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 38
- Average time to close issues: 14 days
- Average time to close pull requests: 26 days
- Total issue authors: 1
- Total pull request authors: 9
- Average comments per issue: 3.0
- Average comments per pull request: 0.05
- Merged pull requests: 36
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 11
- Average time to close issues: 14 days
- Average time to close pull requests: 5 days
- Issue authors: 1
- Pull request authors: 4
- Average comments per issue: 3.0
- Average comments per pull request: 0.0
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- smortex (1)
Pull Request Authors
- bastelfreak (30)
- zilchms (4)
- pccibot (4)
- logicminds (4)
- jstraw (2)
- reidmv (1)
- maxadamo (1)
- TheMeier (1)
- ekohl (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- coveralls >= 0 development
- github_changelog_generator >= 1.16.1 development
- guard-rake >= 0 development
- overcommit >= 0.39.1 development
- puppet-blacksmith >= 0 development
- puppet-strings >= 2.2 development
- puppet_metadata ~> 0.3.0 development
- simplecov-console >= 0 development
- voxpupuli-acceptance >= 0 development
- voxpupuli-release >= 0 development
- voxpupuli-test ~> 2.1 development
- puppetlabs_spec_helper ~> 2.0
- rake >= 0
- ruby 2.7 build