Downloads:

962

Downloads of v 0.6.1:

28

Last Update:

02 Feb 2021

Package Maintainer(s):

Software Author(s):

  • Tom Hudson

Tags:

command-line json grep cross-platform foss

gron

0.6.1 | Updated: 02 Feb 2021

Downloads:

962

Downloads of v 0.6.1:

28

Maintainer(s):

Software Author(s):

  • Tom Hudson

gron 0.6.1

All Checks are Passing

2 Passing Test


Validation Testing Passed


Verification Testing Passed

Details

To install gron, run the following command from the command line or from PowerShell:

>

To upgrade gron, run the following command from the command line or from PowerShell:

>

To uninstall gron, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade gron -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade gron -y --source="'STEP 3 URL'"
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure gron installed
  win_chocolatey:
    name: gron
    state: present
    version: 0.6.1
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'gron' do
  action    :install
  version  '0.6.1'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: gron,
    Version: 0.6.1,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller gron
{
   Name     = 'gron'
   Ensure   = 'Present'
   Version  = '0.6.1'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'gron':
  provider => 'chocolatey',
  ensure   => '0.6.1',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install gron version="0.6.1" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator TheCakeIsNaOH on 19 Feb 2021.

Description

Make JSON greppable!

gron transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it.
It eases the exploration of APIs that return large blobs of JSON but have terrible documentation.

▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author"
json[0].commit.author = {};
json[0].commit.author.date = "2016-07-02T10:51:21Z";
json[0].commit.author.email = "[email protected]";
json[0].commit.author.name = "Tom Hudson";

gron can work backwards too, enabling you to turn your filtered data back into JSON:

▶ gron "https://api.github.com/repos/tomnomnom/gron/commits?per_page=1" | fgrep "commit.author" | gron --ungron
[
  {
    "commit": {
      "author": {
        "date": "2016-07-02T10:51:21Z",
        "email": "[email protected]",
        "name": "Tom Hudson"
      }
    }
  }
]

> Disclaimer: the GitHub API has fantastic documentation, but it makes for a good example.


legal\LICENSE.txt
MIT License

Copyright (c) 2016 Tom Hudson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
legal\VERIFICATION.txt
VERIFICATION

Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.

Package can be verified like this:

1. Go to

   x32: https://github.com/tomnomnom/gron/releases/download/v0.6.1/gron-windows-386-0.6.1.zip
   x64: https://github.com/tomnomnom/gron/releases/download/v0.6.1/gron-windows-amd64-0.6.1.zip

   to download the installer.

2. You can use one of the following methods to obtain the SHA256 checksum:
   - Use powershell function 'Get-FileHash'
   - Use Chocolatey utility 'checksum.exe'

   checksum32: 0DE1F46F693B36B1C1A3B6AF2D013B3D1DB1EE7E49E00D4DBAFD58200E3704E2
   checksum64: 50747640A28C46AFFD71C1DCB44B31772FACC38A9A95BCD22077E141095E8B45

Using AU:

   Get-RemoteChecksum https://github.com/tomnomnom/gron/releases/download/v0.6.1/gron-windows-386-0.6.1.zip  # 32-bit
   Get-RemoteChecksum https://github.com/tomnomnom/gron/releases/download/v0.6.1/gron-windows-amd64-0.6.1.zip  # 64-bit

File 'license.txt' is obtained from:
   https://raw.githubusercontent.com/tomnomnom/gron/v0.6.1/LICENSE
tools\chocolateyInstall.ps1
$ErrorActionPreference = 'Stop'; # stop on all errors

$packageName= 'gron'
$toolsDir   = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$zip32 = 'gron-windows-386-0.6.1.zip'
$zip64 = 'gron-windows-amd64-0.6.1.zip'

$packageArgs = @{
  packageName    = $packageName
  FileFullPath   = Join-Path $toolsDir $zip32
  FileFullPath64 = Join-Path $toolsDir $zip64
  Destination    = $toolsDir
}

Get-ChocolateyUnZip @packageArgs
tools\gron-windows-386-0.6.1.zip
md5: DB00AB24F9934AFA5020C4417B5CB386 | sha1: 027FDDF11B438D69F18F675D0604BA643C787680 | sha256: 0DE1F46F693B36B1C1A3B6AF2D013B3D1DB1EE7E49E00D4DBAFD58200E3704E2 | sha512: 733C5D153AF25116E40E56375DF14802AA5D3C0E94B0C274D33D3F1B0718FFB3AC5E2DAFAF2B706B594329A650037DA00A5F1E1C8E98AA077F559ABB4BC707E4
tools\gron-windows-amd64-0.6.1.zip
md5: 4651541B7C8DC1A5983A6BDE97CDFAEE | sha1: 66370DE29B91174D4133EA0DBE7CDB89A15BCB11 | sha256: 50747640A28C46AFFD71C1DCB44B31772FACC38A9A95BCD22077E141095E8B45 | sha512: F17491A0FD1EEF80A3C40DBAEBDE51D7CF65D62431636522C5EBD887041B912CDD3FEBBBD9D3DCA246168CF45E4A36AEE3D18933935B300537F28949C1762E1D

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
gron 0.6.0 507 Friday, July 27, 2018 Approved
gron 0.5.2 217 Saturday, April 7, 2018 Approved
gron 0.5.1 210 Tuesday, April 3, 2018 Approved

This package has no dependencies.

Discussion for the gron Package

Ground Rules:

  • This discussion is only about gron and the gron package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or gron, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus