Skip to content

arcaartem/urlendec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

urlendec

A command-line URL encoder/decoder.

CI Crates.io License: MIT

Features

  • Encode or decode percent-encoded URLs
  • Read from a file or stdin, write to a file or stdout
  • Processes input line-by-line
  • Single static binary — no runtime dependencies

Installation

From crates.io

cargo install urlendec

From source

git clone https://github.com/arcaartem/urlendec.git
cd urlendec
cargo build --release

The binary is placed at target/release/urlendec.

Pre-built binaries

Download a binary for your platform from the releases page:

  • macOS Intel (x86_64-apple-darwin)
  • macOS Apple Silicon (aarch64-apple-darwin)
  • Linux musl static binary (x86_64-unknown-linux-musl)

Usage

Encode a string:

$ urlendec -s "Hello, world!"
Hello%2C%20world%21

Decode a string:

$ urlendec -d -s "Hello%2C%20world%21"
Hello, world!

Encode from stdin:

$ echo "Hello, world!" | urlendec
Hello%2C%20world%21

Encode a file and write to another file:

urlendec -i input.txt -o output.txt

Decode a file to stdout:

urlendec -d -i encoded.txt

Options

Flag Description
-d, --decode Decode input instead of encoding (default is encode)
-s, --string <STRING> Encode/decode a literal string (mutually exclusive with -i)
-i, --input-file <PATH> Read line-by-line from a file (default: - = stdin)
-o, --output-file <PATH> Write output to a file (default: - = stdout)
-h, --help Print help information
-V, --version Print version information

Building from source

cargo build --release   # release build
cargo test              # run all tests
cargo clippy            # lint

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup instructions, style guidelines, and the PR process.

License

This project is licensed under the MIT License. See LICENSE for details.

About

A simple command-line application to URL encode/decode strings or files

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages