Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjonbrazil committed Dec 22, 2023
1 parent 3903d81 commit 9a52c4f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ jc changelog
- Add `kv-dup` parser for Key/Value files with duplicate keys
- Enhance `proc-net-tcp` parser to add opposite endian support for architectures
like the s390x
- Enhance `url` parser to add `parent`, `filename`, `stem`, and `extension` fields
- Fix `ini` and `ini-dup` parsers to consistently handle null values as empty strings
- Add source link to online parser documentation
- Refactor parser aliases for `kv`, `pkg_index_deb`, `lsb_release`, and `os-release`
Expand Down
39 changes: 38 additions & 1 deletion docs/parsers/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ are included in the output. Encoding and Decoding is best effort.
This parser will work with naked and wrapped URL strings:

- `/path`
- `scheme://host/path`
- `URL:scheme://host/path`
- `<scheme://host/path>`
Expand All @@ -35,6 +36,10 @@ Schema:
"scheme": string or null,
"netloc": string or null,
"path": string or null,
"parent": string or null,
"filename": string or null,
"stem": string or null,
"extension": string or null,
"path_list": [ array or null
string
],
Expand All @@ -54,6 +59,10 @@ Schema:
"scheme": string or null,
"netloc": string or null,
"path": string or null,
"parent": string or null,
"filename": string or null,
"stem": string or null,
"extension": string or null,
"path_list": [ array or null
string
],
Expand All @@ -69,6 +78,10 @@ Schema:
"scheme": string or null,
"netloc": string or null,
"path": string or null,
"parent": string or null,
"filename": string or null,
"stem": string or null,
"extension": string or null,
"path_list": [ array or null
string
],
Expand Down Expand Up @@ -96,6 +109,10 @@ Examples:
"scheme": "http",
"netloc": "example.com",
"path": "/test/path",
"parent": "/test",
"filename": "path",
"stem": "path",
"extension": null,
"path_list": [
"test",
"path"
Expand All @@ -120,6 +137,10 @@ Examples:
"scheme": "http",
"netloc": "example.com",
"path": "/test/path",
"parent": "/test",
"filename": "path",
"stem": "path",
"extension": null,
"path_list": [
"test",
"path"
Expand All @@ -136,6 +157,10 @@ Examples:
"scheme": "http",
"netloc": "example.com",
"path": "/test/path",
"parent": "/test",
"filename": "path",
"stem": "path",
"extension": null,
"path_list": [
"test",
"path"
Expand All @@ -155,6 +180,10 @@ Examples:
"scheme": "ftp",
"netloc": "localhost",
"path": "/filepath",
"parent": "/",
"filename": "filepath",
"stem": "filepath",
"extension": null,
"path_list": [
"filepath"
],
Expand All @@ -170,6 +199,10 @@ Examples:
"scheme": "ftp",
"netloc": "localhost",
"path": "/filepath",
"parent": "/",
"filename": "filepath",
"stem": "filepath",
"extension": null,
"path_list": [
"filepath"
],
Expand All @@ -185,6 +218,10 @@ Examples:
"scheme": "ftp",
"netloc": "localhost",
"path": "/filepath",
"parent": "/",
"filename": "filepath",
"stem": "filepath",
"extension": null,
"path_list": [
"filepath"
],
Expand Down Expand Up @@ -222,4 +259,4 @@ Compatibility: linux, darwin, cygwin, win32, aix, freebsd

Source: [`jc/parsers/url.py`](https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/url.py)

Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
Version 1.1 by Kelly Brazil (kellyjonbrazil@gmail.com)

0 comments on commit 9a52c4f

Please sign in to comment.