uri_parser_gdv

Crates.iouri_parser_gdv
lib.rsuri_parser_gdv
version0.1.5
sourcesrc
created_at2024-11-13 18:08:27.561714
updated_at2024-11-19 23:30:37.970106
descriptionURI Parser is a pest-based parser that breaks URIs into structured components.
homepagehttps://github.com/greedy-dev/uri_parser_gdv
repositoryhttps://github.com/greedy-dev/uri_parser_gdv
max_upload_size
id1446898
size24,430
(greedy-dev)

documentation

README

uri_parser_gdv

Crates.io: https://crates.io/crates/uri_parser_gdv/


URI Parser is a pest-based parser that breaks URIs into structured components

Parsing Logic

Parsing logic

The following components are supported:

  • Scheme
  • Authority: username and password
  • Domain / IPv4
  • Port
  • Path (segmented by /)
  • Query params
  • Subdomain: Optional subdomain that appears before the main domain.

Usage

Parsing URIs

uri_parser_gdv parse <URI>

Subcommands

  about          Print author's details

Args and opts

  -h, --help     Print help
  -V, --version  Print version

Example

uri_parser_gdv parse wss://user:pass@greedydev.io:1234/hello/world?msg=message&type=2

Output:

scheme: wss
authority:
  - username: user
  - password: pass
domain: greedydev.io
port: 1234
path: /hello/world
query:
  - msg: message
  - type: 2
Commit count: 18

cargo fmt