1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00
This commit is contained in:
Kelly Brazil
2021-12-07 15:34:23 -08:00
6 changed files with 26 additions and 8 deletions

2
.gitignore vendored
View File

@ -4,3 +4,5 @@ dist/
build/
*.egg-info/
.github/
.vscode/
_config.yml

View File

@ -43,7 +43,7 @@ jc changelog
20210720 v1.16.0
- Note to Package Maintainers:
TL;DR: `/man/jc.1.gz` and `/jc/man/jc.1.gz` are deprecated and only `/man/jc.1` should be used.
The Man page in the PyPi source packages will be moving from `/jc/man/jc.1.gz` to `/man/jc.1`
in version 1.17.0. For now the Man pages will be available in both locations, but be aware that
the Man page at `/jc/man/jc.1.gz` is now considered deprecated.
@ -58,7 +58,7 @@ jc changelog
- Binaries and DEB/RPM/MSI packages now include Python 3.9.5 interpreter
20210628 v1.15.6
- Fix issue to only load local plugin parsers that have filenames that end in .py
- Fix issue to only load local plugin parsers that have filenames that end in .py
20210520 v1.15.5
- Fix issue where help and about information would not display if a 3rd party parser library was missing. (e.g. xmltodict)

View File

@ -294,7 +294,7 @@ Custom local parser plugins may be placed in a `jc/jcparsers` folder in your loc
- macOS: `$HOME/Library/Application Support/jc/jcparsers`
- Windows: `$LOCALAPPDATA\jc\jc\jcparsers`
Local parser plugins are standard python module files. Use the [`jc/parsers/foo.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo.py) parser as a template and simply place a `.py` file in the `jcparsers` subfolder.
Local parser plugins are standard python module files. Use the [`jc/parsers/foo.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo.py) or [`jc/parsers/foo_s.py (streaming)`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo_s.py) parser as a template and simply place a `.py` file in the `jcparsers` subfolder.
Local plugin filenames must be valid python module names, therefore must consist entirely of alphanumerics and start with a letter. Local plugins may override default parsers.

View File

@ -16,7 +16,9 @@ Usage (cli):
Usage (module):
import jc.parsers.csv_s
result = jc.parsers.csv_s.parse(csv_output)
result = jc.parsers.csv_s.parse(csv_output.splitlines()) # result is an iterable object
for item in result:
# do something
Schema:
@ -24,7 +26,13 @@ Schema:
{
"column_name1": string,
"column_name2": string
"column_name2": string,
"_jc_meta": # This object only exists if using -qq or ignore_exceptions=True
{
"success": booean, # true if successfully parsed, false if error
"error": string, # exists if "success" is false
"line": string # exists if "success" is false
}
}
Examples:

View File

@ -13,7 +13,9 @@ Usage (cli):
Usage (module):
import jc.parsers.csv_s
result = jc.parsers.csv_s.parse(csv_output)
result = jc.parsers.csv_s.parse(csv_output.splitlines()) # result is an iterable object
for item in result:
# do something
Schema:
@ -21,7 +23,13 @@ Schema:
{
"column_name1": string,
"column_name2": string
"column_name2": string,
"_jc_meta": # This object only exists if using -qq or ignore_exceptions=True
{
"success": booean, # true if successfully parsed, false if error
"error": string, # exists if "success" is false
"line": string # exists if "success" is false
}
}
Examples:

View File

@ -213,7 +213,7 @@ Custom local parser plugins may be placed in a `jc/jcparsers` folder in your loc
- macOS: `$HOME/Library/Application Support/jc/jcparsers`
- Windows: `$LOCALAPPDATA\jc\jc\jcparsers`
Local parser plugins are standard python module files. Use the [`jc/parsers/foo.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo.py) parser as a template and simply place a `.py` file in the `jcparsers` subfolder.
Local parser plugins are standard python module files. Use the [`jc/parsers/foo.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo.py) or [`jc/parsers/foo_s.py (streaming)`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/foo_s.py) parser as a template and simply place a `.py` file in the `jcparsers` subfolder.
Local plugin filenames must be valid python module names, therefore must consist entirely of alphanumerics and start with a letter. Local plugins may override default parsers.