Downloads:

469

Downloads of v 0.6.0:

188

Last Update:

27 Jul 2018

Package Maintainer(s):

Software Author(s):

  • Tom Hudson

Tags:

command-line json grep cross-platform foss

gron

0.6.0 | Updated: 27 Jul 2018

Downloads:

469

Downloads of v 0.6.0:

188

Maintainer(s):

Software Author(s):

  • Tom Hudson

gron 0.6.0

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.0
    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.0'
  source   'STEP 3 URL'
end

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


Chocolatey::Ensure-Package
(
    Name: gron,
    Version: 0.6.0,
    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.0'
   Source   = 'STEP 3 URL'
}

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


package { 'gron':
  provider => 'chocolatey',
  ensure   => '0.6.0',
  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.0" 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 Pauby on 27 Jul 2018.

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.0/gron-windows-386-0.6.0.zip
   x64: https://github.com/tomnomnom/gron/releases/download/v0.6.0/gron-windows-amd64-0.6.0.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: E95968A6721EEC8435632411B6541FFAFA73626AA952587A49304D24BDBFAA2F
   checksum64: AE9F72653C183DD9D80E7EAB69B80A6C266509273101C91543E1B7A185F0F7AD

Using AU:

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

File 'license.txt' is obtained from:
   https://raw.githubusercontent.com/tomnomnom/gron/v0.6.0/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.0.zip'
$zip64 = 'gron-windows-amd64-0.6.0.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.0.zip
md5: C9A05D0287598FED498C0B4221571351 | sha1: 3CB237BEC5D016ED2FC87C1722AFEA1352D3FCF5 | sha256: E95968A6721EEC8435632411B6541FFAFA73626AA952587A49304D24BDBFAA2F | sha512: E36B2A0410DB8E3B4DFE66F6CA800FE62B2D0999D09ABF48B65598833B35D0EAF6B38EC28B14437256D722C0FCE0CAFFB06B8C81779A7DC8F14C6E4F5C3AC210
tools\gron-windows-amd64-0.6.0.zip
md5: 2680DB4DB71591AE247C3CDC0C40BADF | sha1: 2632DC0B78CE5398722DFAC77548BC46AF4F7D0E | sha256: AE9F72653C183DD9D80E7EAB69B80A6C266509273101C91543E1B7A185F0F7AD | sha512: 0242BAF24FCC9FDF64B3C8846C7DC0EEA27B6AFC186FA1C70A4A65FB01C8D97EF741B83F2F5B93AEB40157518A4E589B08497B9EF0E96FCFF294943C05A56622

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.5.2 143 Saturday, April 7, 2018 Approved
gron 0.5.1 138 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