mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-13 01:20:24 +02:00
Merge branch 'dev' of https://github.com/kellyjonbrazil/jc into dev
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@ dist/
|
|||||||
build/
|
build/
|
||||||
*.egg-info/
|
*.egg-info/
|
||||||
.github/
|
.github/
|
||||||
|
.vscode/
|
||||||
|
_config.yml
|
||||||
|
@ -43,7 +43,7 @@ jc changelog
|
|||||||
20210720 v1.16.0
|
20210720 v1.16.0
|
||||||
- Note to Package Maintainers:
|
- 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.
|
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`
|
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
|
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.
|
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
|
- Binaries and DEB/RPM/MSI packages now include Python 3.9.5 interpreter
|
||||||
|
|
||||||
20210628 v1.15.6
|
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
|
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)
|
- Fix issue where help and about information would not display if a 3rd party parser library was missing. (e.g. xmltodict)
|
||||||
|
@ -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`
|
- macOS: `$HOME/Library/Application Support/jc/jcparsers`
|
||||||
- Windows: `$LOCALAPPDATA\jc\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.
|
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.
|
||||||
|
|
||||||
|
@ -16,7 +16,9 @@ Usage (cli):
|
|||||||
Usage (module):
|
Usage (module):
|
||||||
|
|
||||||
import jc.parsers.csv_s
|
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:
|
Schema:
|
||||||
|
|
||||||
@ -24,7 +26,13 @@ Schema:
|
|||||||
|
|
||||||
{
|
{
|
||||||
"column_name1": string,
|
"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:
|
Examples:
|
||||||
|
@ -13,7 +13,9 @@ Usage (cli):
|
|||||||
Usage (module):
|
Usage (module):
|
||||||
|
|
||||||
import jc.parsers.csv_s
|
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:
|
Schema:
|
||||||
|
|
||||||
@ -21,7 +23,13 @@ Schema:
|
|||||||
|
|
||||||
{
|
{
|
||||||
"column_name1": string,
|
"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:
|
Examples:
|
||||||
|
@ -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`
|
- macOS: `$HOME/Library/Application Support/jc/jcparsers`
|
||||||
- Windows: `$LOCALAPPDATA\jc\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.
|
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.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user