1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2026-04-03 17:44:07 +02:00

Compare commits

...

3 Commits

Author SHA1 Message Date
Kelly Brazil
028e136161 bump to 1.7.2: add test fixtures to package 2020-02-08 12:46:42 -08:00
Kelly Brazil
9a85a0a4d5 fix doc 2020-02-08 12:46:14 -08:00
Kelly Brazil
3a1cbc4d50 move info class to top 2020-02-05 22:26:47 -08:00
6 changed files with 22 additions and 17 deletions

1
MANIFEST.in Normal file
View File

@@ -0,0 +1 @@
graft tests/fixtures

View File

@@ -1,5 +1,8 @@
jc changelog
20200208 v1.7.2
- Include test fixtures in wheel
20200205 v1.7.1
- Add YAML file parser
- Add INI file parser

View File

@@ -11,7 +11,7 @@ Compatibility:
Examples:
$ cat /etc/crontab | jc --crontab -p
$ cat /etc/crontab | jc --crontab-u -p
{
"variables": [
{

View File

@@ -9,6 +9,16 @@ import signal
import json
import jc.utils
class info():
version = '1.7.2'
description = 'jc cli output JSON conversion tool'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
__version__ = info.version
parsers = [
'arp',
'crontab',
@@ -50,6 +60,10 @@ parsers = [
]
def ctrlc(signum, frame):
sys.exit(1)
def parser_shortname(parser_argument):
"""short name of the parser with dashes and no -- prefix"""
return parser_argument[2:]
@@ -71,20 +85,6 @@ def parser_module(parser):
return getattr(jc.parsers, parser_mod_shortname(parser))
class info():
version = '1.7.1'
description = 'jc cli output JSON conversion tool'
author = 'Kelly Brazil'
author_email = 'kellyjonbrazil@gmail.com'
__version__ = info.version
def ctrlc(signum, frame):
sys.exit(1)
def parsers_text(indent=0, pad=0):
ptext = ''
for parser in parsers:

View File

@@ -10,7 +10,7 @@ Compatibility:
Examples:
$ cat /etc/crontab | jc --crontab -p
$ cat /etc/crontab | jc --crontab-u -p
{
"variables": [
{

View File

@@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
setuptools.setup(
name='jc',
version='1.7.1',
version='1.7.2',
author='Kelly Brazil',
author_email='kellyjonbrazil@gmail.com',
description='This tool serializes the output of popular command line tools and filetypes to structured JSON output.',
@@ -20,6 +20,7 @@ setuptools.setup(
python_requires='>=3.6',
url='https://github.com/kellyjonbrazil/jc',
packages=setuptools.find_packages(),
include_package_data=True,
entry_points={
'console_scripts': [
'jc=jc.cli:main'