Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emsk/brew_outdated_formatter
Formatter for `brew outdated --verbose` command
https://github.com/emsk/brew_outdated_formatter
cli formatter gem homebrew ruby
Last synced: about 2 months ago
JSON representation
Formatter for `brew outdated --verbose` command
- Host: GitHub
- URL: https://github.com/emsk/brew_outdated_formatter
- Owner: emsk
- License: mit
- Created: 2017-11-01T08:20:33.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2021-06-13T05:34:14.000Z (over 3 years ago)
- Last Synced: 2024-09-28T08:46:24.161Z (3 months ago)
- Topics: cli, formatter, gem, homebrew, ruby
- Language: Ruby
- Homepage:
- Size: 61.5 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# BrewOutdatedFormatter
[![Gem Version](https://badge.fury.io/rb/brew_outdated_formatter.svg)](https://badge.fury.io/rb/brew_outdated_formatter)
[![Build Status](https://github.com/emsk/brew_outdated_formatter/actions/workflows/build.yml/badge.svg)](https://github.com/emsk/brew_outdated_formatter/actions/workflows/build.yml)
[![Build Status](https://travis-ci.org/emsk/brew_outdated_formatter.svg?branch=main)](https://travis-ci.org/emsk/brew_outdated_formatter)
[![Build status](https://ci.appveyor.com/api/projects/status/067w2aox7u1rt0jl?svg=true)](https://ci.appveyor.com/project/emsk/brew-outdated-formatter)
[![Codecov](https://codecov.io/gh/emsk/brew_outdated_formatter/branch/main/graph/badge.svg)](https://codecov.io/gh/emsk/brew_outdated_formatter)
[![Maintainability](https://api.codeclimate.com/v1/badges/8453393423f70479acd8/maintainability)](https://codeclimate.com/github/emsk/brew_outdated_formatter/maintainability)
[![Inline docs](http://inch-ci.org/github/emsk/brew_outdated_formatter.svg?branch=main)](http://inch-ci.org/github/emsk/brew_outdated_formatter)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)BrewOutdatedFormatter is a command-line tool to format output of `brew outdated --verbose`.
## Installation
Add this line to your application's Gemfile:
```ruby
gem 'brew_outdated_formatter'
```And then execute:
```sh
$ bundle
```Or install it yourself as:
```sh
$ gem install brew_outdated_formatter
```## Usage
```sh
$ brew outdated --verbose | brof
```## Command Options
| Option | Alias | Description | Default |
| :----- | :---- | :---------- | :------ |
| `--format` | `-f` | Format. `terminal`, `markdown`, `json`, `yaml`, `csv`, `tsv`, `xml`, or `html`. | `terminal` |
| `--pretty` | `-p` | `true` if pretty output.
This option is available in `json`, `xml`, or `html` formats. | `false` |## Examples
Output of `brew outdated --verbose`:
```
test1 (0.0.1) < 0.1
test2 (0.0.2) < 0.1 [pinned at 0.0.2]
test3 (10.10.1_1) < 11.0.1_1
```### Convert to Terminal
```
+---------+-----------+----------+--------+
| formula | installed | current | pinned |
+---------+-----------+----------+--------+
| test1 | 0.0.1 | 0.1 | |
| test2 | 0.0.2 | 0.1 | 0.0.2 |
| test3 | 10.10.1_1 | 11.0.1_1 | |
+---------+-----------+----------+--------+
```### Convert to Markdown
```
| formula | installed | current | pinned |
| --- | --- | --- | --- |
| test1 | 0.0.1 | 0.1 | |
| test2 | 0.0.2 | 0.1 | 0.0.2 |
| test3 | 10.10.1_1 | 11.0.1_1 | |
```### Convert to JSON
Normal output:
```
[{"formula":"test1","installed":"0.0.1","current":"0.1","pinned":""},{"formula":"test2","installed":"0.0.2","current":"0.1","pinned":"0.0.2"},{"formula":"test3","installed":"10.10.1_1","current":"11.0.1_1","pinned":""}]
```Pretty output:
```
[
{
"formula": "test1",
"installed": "0.0.1",
"current": "0.1",
"pinned": ""
},
{
"formula": "test2",
"installed": "0.0.2",
"current": "0.1",
"pinned": "0.0.2"
},
{
"formula": "test3",
"installed": "10.10.1_1",
"current": "11.0.1_1",
"pinned": ""
}
]
```### Convert to YAML
```
---
- formula: test1
installed: 0.0.1
current: '0.1'
pinned: ''
- formula: test2
installed: 0.0.2
current: '0.1'
pinned: 0.0.2
- formula: test3
installed: 10.10.1_1
current: 11.0.1_1
pinned: ''
```### Convert to CSV
```
"formula","installed","current","pinned"
"test1","0.0.1","0.1",""
"test2","0.0.2","0.1","0.0.2"
"test3","10.10.1_1","11.0.1_1",""
```### Convert to TSV
```
"formula" "installed" "current" "pinned"
"test1" "0.0.1" "0.1" ""
"test2" "0.0.2" "0.1" "0.0.2"
"test3" "10.10.1_1" "11.0.1_1" ""
```### Convert to XML
Normal output:
```
test10.0.10.1test20.0.20.10.0.2test310.10.1_111.0.1_1
```Pretty output:
```
test1
0.0.1
0.1
test2
0.0.2
0.1
0.0.2
test3
10.10.1_1
11.0.1_1
```
### Convert to HTML
Normal output:
```
formulainstalledcurrentpinnedtest10.0.10.1test20.0.20.10.0.2test310.10.1_111.0.1_1
```Pretty output:
```
formula
installed
current
pinned
test1
0.0.1
0.1
test2
0.0.2
0.1
0.0.2
test3
10.10.1_1
11.0.1_1
```
## Supported Ruby Versions
* Ruby 2.0.0
* Ruby 2.1
* Ruby 2.2
* Ruby 2.3
* Ruby 2.4
* Ruby 2.5
* Ruby 2.6## Contributing
Bug reports and pull requests are welcome.
## License
[MIT](LICENSE.txt)