pathcify

Crates.iopathcify
lib.rspathcify
version0.0.1
created_at2025-07-07 10:57:18.215894+00
updated_at2025-07-07 10:57:18.215894+00
descriptionCLI tool to recursively slugify file and directory names using dots, removing special characters and normalizing names.
homepagehttps://github.com/ewilan-riviere/pathcify
repositoryhttps://github.com/ewilan-riviere/pathcify
max_upload_size
id1741039
size25,448
Ewilan Rivière (ewilan-riviere)

documentation

README

pathcify

rust tests

Rust CLI tool to recursively slugify file and directory names using dots, removing special characters and normalizing names.

Available on crates.io.

For examples:

  • La Quête d'Ewilan vol.1 : D'un monde à l'autre-·/_,:; (1), [Bottero, Pierre]Author @{1} <book> ?!//& to la.quete.dewilan.vol.1.dun.monde.a.lautre-._.1.bottero.pierre.author.{1}.book with lowercase
  • 00 - Préface to 00-Preface
  • Góðan daginn to Godan.Daginn

Requirements

Installation

You can install pathcify with Cargo.

cargo install pathcify

Usage

You can execute pathcify on a directory or a file:

pathcify /path/to/dir

All files and directories will be recursively pathcified, converting their names to a format suitable for URLs or filenames.

  • Remove all special characters
  • Replace all spaces with a dot
  • Remove all dots at the beginning and the end of the string
  • Replace all dots that are repeated more than once with a single dot
  • Keep - and _ characters (and remove spaces before and after them)
  • Full lowercase with option -l

Options

pathcify --help
  • -l, --lowercase: Convert all names to lowercase.
  • -h, --help: Print help information.
  • -V, --version: Print the version of the tool.

Build and publish

Build and test the package:

cargo build --release
cargo test

Test publishing:

cargo publish --dry-run

Publish the package to crates.io:

cargo publish

License

This project is licensed under the MIT License - see the LICENSE file for details.

Commit count: 0

cargo fmt