1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

doc update

This commit is contained in:
Kelly Brazil
2022-03-22 12:35:56 -07:00
parent f23f19da45
commit 9c1ec9940e
4 changed files with 82 additions and 14 deletions

View File

@ -43,7 +43,7 @@ For example:
good day 12345
hi there abc def
etc.
etc...
Usage (cli):
@ -65,11 +65,45 @@ Schema:
Examples:
$ asciitable | jc --asciitable -p
[]
$ echo '
> ╒══════════╤═════════╤════════╕
> │ foo │ bar │ baz │
> ╞══════════╪═════════╪════════╡
> │ good day │ │ 12345 │
> ├──────────┼─────────┼────────┤
> │ hi there │ abc def │ 3.14 │
> ╘══════════╧═════════╧════════╛' | jc --asciitable -p
[
{
"foo": "good day",
"bar": null,
"baz": "12345"
},
{
"foo": "hi there",
"bar": "abc def",
"baz": "3.14"
}
]
$ asciitable | jc --asciitable -p -r
[]
$ echo '
> foo bar baz
> --------- -------- ------
> good day 12345
> hi there abc def' | jc --asciitable -p
[
{
"foo": "good day",
"bar": null,
"baz": "12345"
},
{
"foo": "hi there",
"bar": "abc def",
"baz": null
}
]
<a id="jc.parsers.asciitable.parse"></a>

View File

@ -63,7 +63,7 @@ Examples:
{
"foo": "good day\nmate",
"bar": "12345",
"baz_buz": ""
"baz_buz": null
},
{
"foo": "hi there",
@ -87,7 +87,7 @@ Examples:
{
"foo": "good day\nmate",
"bar": "12345",
"baz_buz": ""
"baz_buz": null
},
{
"foo": "hi there",

View File

@ -38,7 +38,7 @@ For example:
good day 12345
hi there abc def
etc.
etc...
Usage (cli):
@ -60,11 +60,45 @@ Schema:
Examples:
$ asciitable | jc --asciitable -p
[]
$ echo '
> ╒══════════╤═════════╤════════╕
> │ foo │ bar │ baz │
> ╞══════════╪═════════╪════════╡
> │ good day │ │ 12345 │
> ├──────────┼─────────┼────────┤
> │ hi there │ abc def │ 3.14 │
> ╘══════════╧═════════╧════════╛' | jc --asciitable -p
[
{
"foo": "good day",
"bar": null,
"baz": "12345"
},
{
"foo": "hi there",
"bar": "abc def",
"baz": "3.14"
}
]
$ asciitable | jc --asciitable -p -r
[]
$ echo '
> foo bar baz
> --------- -------- ------
> good day 12345
> hi there abc def' | jc --asciitable -p
[
{
"foo": "good day",
"bar": null,
"baz": "12345"
},
{
"foo": "hi there",
"bar": "abc def",
"baz": null
}
]
"""
import re
from typing import List, Dict

View File

@ -58,7 +58,7 @@ Examples:
{
"foo": "good day\nmate",
"bar": "12345",
"baz_buz": ""
"baz_buz": null
},
{
"foo": "hi there",
@ -82,7 +82,7 @@ Examples:
{
"foo": "good day\nmate",
"bar": "12345",
"baz_buz": ""
"baz_buz": null
},
{
"foo": "hi there",