1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-13 01:20:24 +02:00

Merge pull request #211 from kellyjonbrazil/master

sync to dev
This commit is contained in:
Kelly Brazil
2022-03-09 18:49:01 +00:00
committed by GitHub
8 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,8 @@
jc changelog jc changelog
20220305 v1.18.5
- Fix date parser to ensure AM/PM period string is always uppercase
20220304 v1.18.4 20220304 v1.18.4
- Add nmcli command parser tested on linux - Add nmcli command parser tested on linux
- Enhance parse error messages at the cli - Enhance parse error messages at the cli

View File

@ -1,5 +1,5 @@
![Tests](https://github.com/kellyjonbrazil/jc/workflows/Tests/badge.svg?branch=master) [![Tests](https://github.com/kellyjonbrazil/jc/workflows/Tests/badge.svg?branch=master)](https://github.com/kellyjonbrazil/jc/actions)
![Pypi](https://img.shields.io/pypi/v/jc.svg) [![Pypi](https://img.shields.io/pypi/v/jc.svg)](https://pypi.org/project/jc/)
> Check out the `jc` Python [package documentation](https://github.com/kellyjonbrazil/jc/tree/master/docs) for developers > Check out the `jc` Python [package documentation](https://github.com/kellyjonbrazil/jc/tree/master/docs) for developers
@ -99,6 +99,7 @@ correct [binary](https://github.com/kellyjonbrazil/jc/releases) for your
architecture and running it anywhere on your filesystem. architecture and running it anywhere on your filesystem.
### Pip (macOS, linux, unix, Windows) ### Pip (macOS, linux, unix, Windows)
[![Pypi](https://img.shields.io/pypi/v/jc.svg)](https://pypi.org/project/jc/)
```bash ```bash
pip3 install jc pip3 install jc
``` ```

View File

@ -105,4 +105,4 @@ Returns:
### Parser Information ### Parser Information
Compatibility: linux, darwin, freebsd Compatibility: linux, darwin, freebsd
Version 2.3 by Kelly Brazil (kellyjonbrazil@gmail.com) Version 2.4 by Kelly Brazil (kellyjonbrazil@gmail.com)

View File

@ -9,7 +9,7 @@ import importlib
from typing import Dict, List, Iterable, Union, Iterator from typing import Dict, List, Iterable, Union, Iterator
from jc import appdirs from jc import appdirs
__version__ = '1.18.4' __version__ = '1.18.5'
parsers = [ parsers = [
'acpi', 'acpi',

View File

@ -83,7 +83,7 @@ import jc.utils
class info(): class info():
"""Provides parser metadata (version, author, etc.)""" """Provides parser metadata (version, author, etc.)"""
version = '2.3' version = '2.4'
description = '`date` command parser' description = '`date` command parser'
author = 'Kelly Brazil' author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com' author_email = 'kellyjonbrazil@gmail.com'
@ -188,7 +188,7 @@ def parse(data, raw=False, quiet=False):
'hour_24': dt.hour, 'hour_24': dt.hour,
'minute': dt.minute, 'minute': dt.minute,
'second': dt.second, 'second': dt.second,
'period': dt.strftime('%p'), 'period': dt.strftime('%p').upper(),
'timezone': tz, 'timezone': tz,
'utc_offset': dt.strftime('%z') or None, 'utc_offset': dt.strftime('%z') or None,
'day_of_year': int(dt.strftime('%j')), 'day_of_year': int(dt.strftime('%j')),

View File

@ -1,4 +1,4 @@
.TH jc 1 2022-03-05 1.18.4 "JSON Convert" .TH jc 1 2022-03-05 1.18.5 "JSON Convert"
.SH NAME .SH NAME
jc \- JSONifies the output of many CLI tools and file-types jc \- JSONifies the output of many CLI tools and file-types
.SH SYNOPSIS .SH SYNOPSIS

View File

@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
setuptools.setup( setuptools.setup(
name='jc', name='jc',
version='1.18.4', version='1.18.5',
author='Kelly Brazil', author='Kelly Brazil',
author_email='kellyjonbrazil@gmail.com', author_email='kellyjonbrazil@gmail.com',
description='Converts the output of popular command-line tools and file-types to JSON.', description='Converts the output of popular command-line tools and file-types to JSON.',

View File

@ -1,5 +1,5 @@
![Tests](https://github.com/kellyjonbrazil/jc/workflows/Tests/badge.svg?branch=master) [![Tests](https://github.com/kellyjonbrazil/jc/workflows/Tests/badge.svg?branch=master)](https://github.com/kellyjonbrazil/jc/actions)
![Pypi](https://img.shields.io/pypi/v/jc.svg) [![Pypi](https://img.shields.io/pypi/v/jc.svg)](https://pypi.org/project/jc/)
> Check out the `jc` Python [package documentation](https://github.com/kellyjonbrazil/jc/tree/master/docs) for developers > Check out the `jc` Python [package documentation](https://github.com/kellyjonbrazil/jc/tree/master/docs) for developers
@ -99,6 +99,7 @@ correct [binary](https://github.com/kellyjonbrazil/jc/releases) for your
architecture and running it anywhere on your filesystem. architecture and running it anywhere on your filesystem.
### Pip (macOS, linux, unix, Windows) ### Pip (macOS, linux, unix, Windows)
[![Pypi](https://img.shields.io/pypi/v/jc.svg)](https://pypi.org/project/jc/)
```bash ```bash
pip3 install jc pip3 install jc
``` ```