Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjonbrazil committed Nov 24, 2023
1 parent 1c60f53 commit f442606
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 20 deletions.
61 changes: 51 additions & 10 deletions docs/parsers/debconf_show.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jc - JSON Convert `debconf-show` command output parser

Usage (cli):

$ debconf-show | jc --debconf-show
$ debconf-show onlyoffice-documentserver | jc --debconf-show

or

$ jc debconf-show
$ jc debconf-show onlyoffice-documentserver

Usage (module):

Expand All @@ -22,19 +22,60 @@ Schema:

[
{
"debconf-show": string,
"bar": boolean,
"baz": integer
"asked": boolean,
"packagename": string,
"name": string,
"value": string
}
]

Examples:

$ debconf-show | jc --debconf-show -p
[]

$ debconf-show | jc --debconf-show -p -r
[]
$ debconf-show onlyoffice-documentserver | jc --debconf-show -p
[
{
"asked": true,
"packagename": "onlyoffice",
"name": "jwt_secret",
"value": "aL8ei2iereuzee7cuJ6Cahjah1ixee2ah"
},
{
"asked": false,
"packagename": "onlyoffice",
"name": "db_pwd",
"value": "(password omitted)"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "rabbitmq_pwd",
"value": "(password omitted)"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "db_port",
"value": "5432"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "db_user",
"value": "onlyoffice"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "rabbitmq_proto",
"value": "amqp"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "cluster_mode",
"value": "false"
}
]

<a id="jc.parsers.debconf_show.parse"></a>

Expand Down
61 changes: 51 additions & 10 deletions jc/parsers/debconf_show.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Usage (cli):
$ debconf-show | jc --debconf-show
$ debconf-show onlyoffice-documentserver | jc --debconf-show
or
$ jc debconf-show
$ jc debconf-show onlyoffice-documentserver
Usage (module):
Expand All @@ -17,19 +17,60 @@
[
{
"debconf-show": string,
"bar": boolean,
"baz": integer
"asked": boolean,
"packagename": string,
"name": string,
"value": string
}
]
Examples:
$ debconf-show | jc --debconf-show -p
[]
$ debconf-show | jc --debconf-show -p -r
[]
$ debconf-show onlyoffice-documentserver | jc --debconf-show -p
[
{
"asked": true,
"packagename": "onlyoffice",
"name": "jwt_secret",
"value": "aL8ei2iereuzee7cuJ6Cahjah1ixee2ah"
},
{
"asked": false,
"packagename": "onlyoffice",
"name": "db_pwd",
"value": "(password omitted)"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "rabbitmq_pwd",
"value": "(password omitted)"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "db_port",
"value": "5432"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "db_user",
"value": "onlyoffice"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "rabbitmq_proto",
"value": "amqp"
},
{
"asked": true,
"packagename": "onlyoffice",
"name": "cluster_mode",
"value": "false"
}
]
"""
from typing import List, Dict
from jc.jc_types import JSONDictType
Expand Down

0 comments on commit f442606

Please sign in to comment.