mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
doc update
This commit is contained in:
@ -5,8 +5,6 @@
|
||||
|
||||
jc - JSON Convert `swapon` command output parser
|
||||
|
||||
> Note: Must use `swapon`
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ swapon | jc --swapon
|
||||
@ -18,17 +16,17 @@ or
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('swapon', uname_command_output)
|
||||
result = jc.parse('swapon', swapon_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"type": string,
|
||||
"size": int,
|
||||
"used": int,
|
||||
"priority": int,
|
||||
"name": string,
|
||||
"type": string,
|
||||
"size": integer,
|
||||
"used": integer,
|
||||
"priority": integer
|
||||
}
|
||||
]
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
"""jc - JSON Convert `swapon` command output parser
|
||||
|
||||
> Note: Must use `swapon`
|
||||
|
||||
Usage (cli):
|
||||
|
||||
$ swapon | jc --swapon
|
||||
@ -13,17 +11,17 @@ or
|
||||
Usage (module):
|
||||
|
||||
import jc
|
||||
result = jc.parse('swapon', uname_command_output)
|
||||
result = jc.parse('swapon', swapon_command_output)
|
||||
|
||||
Schema:
|
||||
|
||||
[
|
||||
{
|
||||
"name": string,
|
||||
"type": string,
|
||||
"size": int,
|
||||
"used": int,
|
||||
"priority": int,
|
||||
"name": string,
|
||||
"type": string,
|
||||
"size": integer,
|
||||
"used": integer,
|
||||
"priority": integer
|
||||
}
|
||||
]
|
||||
|
||||
@ -48,7 +46,6 @@ from typing import List, Dict, Union
|
||||
|
||||
class info:
|
||||
"""Provides parser metadata (version, author, etc.)"""
|
||||
|
||||
version = "1.0"
|
||||
description = "`swapon` command parser"
|
||||
author = "Roey Darwish Dror"
|
||||
|
2
man/jc.1
2
man/jc.1
@ -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
|
||||
\fBjc\fP \- JSON Convert JSONifies the output of many CLI tools, file-types,
|
||||
and strings
|
||||
|
@ -25,9 +25,9 @@ class Swapon(unittest.TestCase):
|
||||
cls.f_in[file] = a.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), [])
|
||||
|
||||
|
Reference in New Issue
Block a user