Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.72 KB

README.md

File metadata and controls

58 lines (39 loc) · 1.72 KB

urldecoder

English | 简体中文

A tool to batch decode URLs in your files. A toy project written in Rust.

Decoding URLs shortens the string length and increases readability. Example:

- https://github.com/lxl66566/my-college-files/tree/main/信息科学与工程学院/嵌入式系统
+ https://github.com/lxl66566/my-college-files/tree/main/信息科学与工程学院/嵌入式系统

Install

All platforms

Download binary from Release.

Windows

In addition to the above methods, you can also install it via scoop:

scoop install https://raw.githubusercontent.com/lxl66566/urldecoder/main/urldecoder.json

Usage

Usage: urldecoder [OPTIONS] <FILES>...

Arguments:
  <FILES>...  Files to convert, uses glob("{file}") to parse given pattern

Options:
  -d, --dry-run            Show result only, without overwrite
  -v, --verbose            Show full debug and error message
  -e, --exclude <EXCLUDE>  Exclude file or folder
      --escape-space       Do not decode ` ` to space
  -h, --help               Print help
  -V, --version            Print version

Examples:
urldecoder test/t.md        # decode test/t.md
urldecoder *.md -e my.md    # decode all markdown files in current folder except `my.md`
urldecoder **/*             # decode all files recursively in current folder

and exclude node_modules by default.

Real example of how I use it:

urldecoder -e src/.vuepress/.cache -e src/.vuepress/.temp -e src/.vuepress/dist --escape-space "src/**/*.md"

to auto decode my vuepress blog before committing.