xurl

Crates.ioxurl
lib.rsxurl
version0.1.0
sourcesrc
created_at2021-06-15 10:55:01.057346
updated_at2021-06-15 10:55:01.057346
descriptionA command-line utility to manipulate urls
homepage
repositoryhttps://https://github.com/squioc/xurl
max_upload_size
id410339
size20,077
Sébastien Quioc (squioc)

documentation

README

Xurl

A little tool to manipulate urls.

Building for source

To build the binary just:

cargo build

Installation

To install Xurl, type:

cargo install xurl

Commands

Xurl offer severals commands:

Dissect

The dissect command splits and prints the different parts of the url. These parts are:

  • The scheme

  • For urls with authentication information, the username and the password

  • The host

  • The port

  • The path to the document

  • The query string

  • The fragment

$ xurl https://username:password@github.com/squioc/xurl?token=1234#Dissect
scheme: https
username: username
password: password
host: github.com
port: 443
path: /squioc/xurl
query: token=1234
fragment: Dissect

Join

The join command joins an url and a new path together.

$ xurl join https://github.com/squioc/xurl /rust-lang/rust
https://github.com/rust-lang/rust

Encode

The encode command applies the percent-encoding on the url

$ xurl encode https://github.com/squioc/xurl
https%3A%2F%2Fgithub.com%2Fsquioc%2Fxurl

Decode

The decode command reverses the percent-encoding applyied on an url

$ xurl encode https%3A%2F%2Fgithub.com%2Fsquioc%2Fxurl
https://github.com/squioc/xurl

Idna Encode

The idna-encode command applies the punycode translation on an internationalized domain name.

$ xurl idna-encode https://lafierté-bernard.ça/
https://xn--lafiert-bernard-hnb.xn--a-5fa/

Idna Decode

The idna-decode command reverses the punycode translation applied on an internationalized domain name.

$ xurl idna-encode https://xn--lafiert-bernard-hnb.xn--a-5fa/
https://lafierté-bernard.ça/
Commit count: 0

cargo fmt