mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
doc update
This commit is contained in:
@ -11,10 +11,6 @@ Parses standard `INI` files.
|
|||||||
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
||||||
- If duplicate keys are found, only the last value will be used.
|
- If duplicate keys are found, only the last value will be used.
|
||||||
|
|
||||||
> Note: If there is no top-level section identifier, then this parser will
|
|
||||||
> add a key named `_top_level_section_` with the top-level key/values
|
|
||||||
> included.
|
|
||||||
|
|
||||||
> Note: The section identifier `[DEFAULT]` is special and provides default
|
> Note: The section identifier `[DEFAULT]` is special and provides default
|
||||||
> values for the section keys that follow. To disable this behavior you must
|
> values for the section keys that follow. To disable this behavior you must
|
||||||
> rename the `[DEFAULT]` section identifier to something else before
|
> rename the `[DEFAULT]` section identifier to something else before
|
||||||
@ -47,34 +43,28 @@ standard library documentation for more details.
|
|||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ cat example.ini
|
$ cat example.ini
|
||||||
[DEFAULT]
|
foo = bar
|
||||||
ServerAliveInterval = 45
|
baz = buz
|
||||||
Compression = yes
|
|
||||||
CompressionLevel = 9
|
|
||||||
ForwardX11 = yes
|
|
||||||
|
|
||||||
[bitbucket.org]
|
[section1]
|
||||||
User = hg
|
key1 = value1
|
||||||
|
key2 = value2
|
||||||
|
|
||||||
[topsecret.server.com]
|
[section2]
|
||||||
Port = 50022
|
key1 = value1
|
||||||
ForwardX11 = no
|
key2 = value2
|
||||||
|
|
||||||
$ cat example.ini | jc --ini -p
|
$ cat example.ini | jc --ini -p
|
||||||
{
|
{
|
||||||
"bitbucket.org": {
|
"foo": "bar",
|
||||||
"ServerAliveInterval": "45",
|
"baz": "buz",
|
||||||
"Compression": "yes",
|
"section1": {
|
||||||
"CompressionLevel": "9",
|
"key1": "value1",
|
||||||
"ForwardX11": "yes",
|
"key2": "value2"
|
||||||
"User": "hg"
|
|
||||||
},
|
},
|
||||||
"topsecret.server.com": {
|
"section2": {
|
||||||
"ServerAliveInterval": "45",
|
"key1": "value1",
|
||||||
"Compression": "yes",
|
"key2": "value2"
|
||||||
"CompressionLevel": "9",
|
|
||||||
"ForwardX11": "no",
|
|
||||||
"Port": "50022"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,10 +6,6 @@ Parses standard `INI` files.
|
|||||||
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
- Comment prefix can be `#` or `;`. Comments must be on their own line.
|
||||||
- If duplicate keys are found, only the last value will be used.
|
- If duplicate keys are found, only the last value will be used.
|
||||||
|
|
||||||
> Note: If there is no top-level section identifier, then this parser will
|
|
||||||
> add a key named `_top_level_section_` with the top-level key/values
|
|
||||||
> included.
|
|
||||||
|
|
||||||
> Note: The section identifier `[DEFAULT]` is special and provides default
|
> Note: The section identifier `[DEFAULT]` is special and provides default
|
||||||
> values for the section keys that follow. To disable this behavior you must
|
> values for the section keys that follow. To disable this behavior you must
|
||||||
> rename the `[DEFAULT]` section identifier to something else before
|
> rename the `[DEFAULT]` section identifier to something else before
|
||||||
@ -42,34 +38,28 @@ standard library documentation for more details.
|
|||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ cat example.ini
|
$ cat example.ini
|
||||||
[DEFAULT]
|
foo = bar
|
||||||
ServerAliveInterval = 45
|
baz = buz
|
||||||
Compression = yes
|
|
||||||
CompressionLevel = 9
|
|
||||||
ForwardX11 = yes
|
|
||||||
|
|
||||||
[bitbucket.org]
|
[section1]
|
||||||
User = hg
|
key1 = value1
|
||||||
|
key2 = value2
|
||||||
|
|
||||||
[topsecret.server.com]
|
[section2]
|
||||||
Port = 50022
|
key1 = value1
|
||||||
ForwardX11 = no
|
key2 = value2
|
||||||
|
|
||||||
$ cat example.ini | jc --ini -p
|
$ cat example.ini | jc --ini -p
|
||||||
{
|
{
|
||||||
"bitbucket.org": {
|
"foo": "bar",
|
||||||
"ServerAliveInterval": "45",
|
"baz": "buz",
|
||||||
"Compression": "yes",
|
"section1": {
|
||||||
"CompressionLevel": "9",
|
"key1": "value1",
|
||||||
"ForwardX11": "yes",
|
"key2": "value2"
|
||||||
"User": "hg"
|
|
||||||
},
|
},
|
||||||
"topsecret.server.com": {
|
"section2": {
|
||||||
"ServerAliveInterval": "45",
|
"key1": "value1",
|
||||||
"Compression": "yes",
|
"key2": "value2"
|
||||||
"CompressionLevel": "9",
|
|
||||||
"ForwardX11": "no",
|
|
||||||
"Port": "50022"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user