Skip to the content.

Home

jc.parsers.brew_search

jc - JSON Convert brew search command output parser

Usage (cli):

$ brew search git | jc --brew-search

or

$ jc brew search git

Usage (module):

import jc
result = jc.parse('brew_search', brew_search_command_output)

Schema:

[
  {
    "name":     string,
    "type":     string/null
  }
]

Examples:

$ brew search git | jc --brew-search -p
[
  {
    "name": "atomgit-cli",
    "type": "formula"
  },
  {
    "name": "bagit",
    "type": "formula"
  },
  {
    "name": "bash-git-prompt",
    "type": "formula"
  }
  ...
]

parse

def parse(data, raw=False, quiet=False)

Main text parsing function

Parameters:

data:        (string)  text data to parse
raw:         (boolean) unprocessed output if True
quiet:       (boolean) suppress warning messages if True

Returns:

List of Dictionaries. Raw or processed structured data.

Parser Information

Compatibility: darwin, linux

Source: jc/parsers/brew_search.py

Version 1.0 by PerryLink (novelnexusai@outlook.com)