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

doc update

This commit is contained in:
Kelly Brazil
2023-12-17 09:44:18 -08:00
parent 2a14f56b72
commit 0d4823c9de
4 changed files with 15 additions and 20 deletions

View File

@ -5,8 +5,6 @@
jc - JSON Convert `swapon` command output parser jc - JSON Convert `swapon` command output parser
> Note: Must use `swapon`
Usage (cli): Usage (cli):
$ swapon | jc --swapon $ swapon | jc --swapon
@ -18,17 +16,17 @@ or
Usage (module): Usage (module):
import jc import jc
result = jc.parse('swapon', uname_command_output) result = jc.parse('swapon', swapon_command_output)
Schema: Schema:
[ [
{ {
"name": string, "name": string,
"type": string, "type": string,
"size": int, "size": integer,
"used": int, "used": integer,
"priority": int, "priority": integer
} }
] ]

View File

@ -1,7 +1,5 @@
"""jc - JSON Convert `swapon` command output parser """jc - JSON Convert `swapon` command output parser
> Note: Must use `swapon`
Usage (cli): Usage (cli):
$ swapon | jc --swapon $ swapon | jc --swapon
@ -13,17 +11,17 @@ or
Usage (module): Usage (module):
import jc import jc
result = jc.parse('swapon', uname_command_output) result = jc.parse('swapon', swapon_command_output)
Schema: Schema:
[ [
{ {
"name": string, "name": string,
"type": string, "type": string,
"size": int, "size": integer,
"used": int, "used": integer,
"priority": int, "priority": integer
} }
] ]
@ -48,7 +46,6 @@ from typing import List, Dict, Union
class info: class info:
"""Provides parser metadata (version, author, etc.)""" """Provides parser metadata (version, author, etc.)"""
version = "1.0" version = "1.0"
description = "`swapon` command parser" description = "`swapon` command parser"
author = "Roey Darwish Dror" author = "Roey Darwish Dror"

View File

@ -1,4 +1,4 @@
.TH jc 1 2023-12-16 1.24.0 "JSON Convert" .TH jc 1 2023-12-17 1.24.0 "JSON Convert"
.SH NAME .SH NAME
\fBjc\fP \- JSON Convert JSONifies the output of many CLI tools, file-types, \fBjc\fP \- JSON Convert JSONifies the output of many CLI tools, file-types,
and strings and strings

View File

@ -25,9 +25,9 @@ class Swapon(unittest.TestCase):
cls.f_in[file] = a.read() cls.f_in[file] = a.read()
cls.f_json[file] = json.loads(b.read()) cls.f_json[file] = json.loads(b.read())
def test_foo_nodata(self): def test_swapon_nodata(self):
""" """
Test 'foo' with no data Test 'swapon' with no data
""" """
self.assertEqual(parse('', quiet=True), []) self.assertEqual(parse('', quiet=True), [])