mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
version bump. locale info changes. add ip-address parser
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
jc changelog
|
||||
|
||||
xxxxxxxx v1.20.5
|
||||
- Add IP Address string parser
|
||||
- Change LANG=C to LC_ALL=C in locale instructions
|
||||
|
||||
20220723 v1.20.4
|
||||
- Fix URL string parser path list for URLs ending in a forward slash
|
||||
|
||||
|
@ -638,7 +638,7 @@ def main():
|
||||
|
||||
utils.error_message([
|
||||
f'Parser issue with {parser_name}:', f'{e.__class__.__name__}: {e}',
|
||||
'If this is the correct parser, try setting the locale to C (LANG=C).',
|
||||
'If this is the correct parser, try setting the locale to C (LC_ALL=C).',
|
||||
f'For details use the -d or -dd option. Use "jc -h --{parser_name}" for help.'
|
||||
])
|
||||
sys.exit(combined_exit_code(magic_exit_code, JC_ERROR_EXIT))
|
||||
@ -654,7 +654,7 @@ def main():
|
||||
utils.error_message([
|
||||
f'{parser_name} parser could not parse the input data.',
|
||||
f'{streaming_msg}',
|
||||
'If this is the correct parser, try setting the locale to C (LANG=C).',
|
||||
'If this is the correct parser, try setting the locale to C (LC_ALL=C).',
|
||||
f'For details use the -d or -dd option. Use "jc -h --{parser_name}" for help.'
|
||||
])
|
||||
sys.exit(combined_exit_code(magic_exit_code, JC_ERROR_EXIT))
|
||||
|
@ -6,7 +6,7 @@ import importlib
|
||||
from typing import Dict, List, Iterable, Union, Iterator
|
||||
from jc import appdirs
|
||||
|
||||
__version__ = '1.20.4'
|
||||
__version__ = '1.20.5'
|
||||
|
||||
parsers = [
|
||||
'acpi',
|
||||
@ -50,6 +50,7 @@ parsers = [
|
||||
'ini',
|
||||
'iostat',
|
||||
'iostat-s',
|
||||
'ip-address',
|
||||
'iptables',
|
||||
'iso-datetime',
|
||||
'iw-scan',
|
||||
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
|
||||
|
||||
setuptools.setup(
|
||||
name='jc',
|
||||
version='1.20.4',
|
||||
version='1.20.5',
|
||||
author='Kelly Brazil',
|
||||
author_email='kellyjonbrazil@gmail.com',
|
||||
description='Converts the output of popular command-line tools and file-types to JSON.',
|
||||
|
@ -322,15 +322,16 @@ Local plugins may override default parsers.
|
||||
|
||||
#### Locale
|
||||
|
||||
For best results set the `LANG` locale environment variable to `C` or
|
||||
`en_US.UTF-8`. For example, either by setting directly on the command-line:
|
||||
For best results set the locale environment variables to `C` or
|
||||
`en_US.UTF-8` by modifying the `LC_ALL` variable:
|
||||
```
|
||||
$ LANG=C date | jc --date
|
||||
$ LC_ALL=C date | jc --date
|
||||
```
|
||||
|
||||
or by exporting to the environment before running commands:
|
||||
You can also set the locale variables individually:
|
||||
```
|
||||
$ export LANG=C
|
||||
$ export LC_NUMERIC=C
|
||||
```
|
||||
|
||||
On some older systems UTF-8 output will be downgraded to ASCII with `\\u`
|
||||
|
Reference in New Issue
Block a user