Marusyk / grok.net

.NET implementation of the grok 📝
MIT License
287 stars 55 forks source link

Add PowerShell module [WIP] #46

Closed eddami closed 2 years ago

eddami commented 2 years ago

See #45

PR checklist

Current Syntax

String input:

grok -Input -Filter [-OutputFormat] [-IgnoreEmptyLines] [-IgnoreUnmatched] [-CsvDelimiter] [-IndentJson]
grok -i -f [-o] [-e] [-u] [-d] [-j]

File input:

grok -Path -Filter [-OutputFormat] [-IgnoreEmptyLines] [-IgnoreUnmatched] [-CsvDelimiter] [-IndentJson]
grok -p -f [-o] [-e] [-u] [-d] [-j]

Get Version:

grok -Version
grok -v

-OutputFormat accepts csv or json. Formatted table output if not provided.

Run

Build Grok.Net.PowerShell project. Import Grok module:

cd ./bin/(Debug|Release)/netstandard2.0
import-module ./Grok-Test.psd1
help grok

or alternatively install already published test module:

Install-Module -Name Grok-Test
Marusyk commented 2 years ago

Would you be interested to add build/publish scripts in a separate PR?

eddami commented 2 years ago

Sure.