Skip to content
/ yuri Public
forked from mwarkentin/yuri

CLI tool to parse URIs into their components

License

Notifications You must be signed in to change notification settings

robatwave/yuri

 
 

Repository files navigation

yuri

CLI tool to parse URIs into their components

Installation

Homebrew

This application can be installed via Homebrew:

$ brew install eqnxio/michael_warkentin/yuri

Command line

Command line installation instructions can be found on equinox.

Source

If you want to install from source:

$ git clone git@github.com:mwarkentin/yuri.git
$ cd yuri
$ make install

Examples

CLI

$ yuri "https://username:password@stage.example.com:443/path+to+foo?query1=1&query2=2#FRAG" | jq
{
  "fragment": "FRAG",
  "host": "stage.example.com:443",
  "hostname": "stage.example.com",
  "port": "443",
  "opaque": "",
  "password": "password",
  "path": "/path+to+foo",
  "rawpath": "/path+to+foo",
  "rawquery": "query1=1&query2=2",
  "scheme": "https",
  "username": "username"
}

Available fields

Here are the JSON fields provided by yuri:

  • scheme: type of URI
  • opaque: encoded opaque data
  • username: basic auth username
  • password: basic auth password
  • host: host or host:port
  • hostname: host without port
  • port: port
  • path: path
  • rawpath: encoded path
  • rawquery: encoded query values, without ?
  • fragment: fragment for references, without #

Developing yuri

Running tests

Run make test.

Updating dependencies

Run make vendor and check in updates.

Releasing

  • Set EQUINOX_TOKEN environment variable
  • Ensure equinox.key file exists
  • Push tag to Github
  • Run make release version=<maj>.<min>.<patch>

About

CLI tool to parse URIs into their components

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 87.7%
  • Makefile 12.3%