Code Monkey home page Code Monkey logo

ez-renamer's Introduction

ez-renamer

Description

Ez-renamer or in short ezr is a CLI tool written in Rust for batch renaming files. It's purposefuly not very featureful because it's meant to be used for just some quick renaming.

ezr [FLAGS] [OPTIONS] [file-match]

Instalation

cargo install ezr

You need to have Rust installed on your machine.

Installing from source

git clone https://github.com/krawieck/ez-renamer
cd ez-renamer
cargo install

Args

<file-match>
        regular expression for files that should be renamed [default: .]

Flags

    --dont-cleanup
        By default ez-renamer removes multiple spaces (cleans up)
        after it's done. This flag stops him from doing that

-h, --help
        Prints help information

-e, --include-ext
        Includes extensions in renaming process

    --include-dirs
        include directories in renaming process

-q
        Program is much quieter, it's recommended
        only if you know what you're doing

        -q results in program just asking if u wanna proceed, and
        -qq results in program not letting anything into stdout

-r, --recursive
        recursively goes through directories

-V, --version
        Prints version information

-y
        confirms the rename, recomended only if you know what you're doing

Options

-d, --delete <delete>
        deletes this phrase(s) from names

        example:

        ezr -d "[WEBRip] [720p] [YTS.AM]"

        "Green Book (2018) [WEBRip] [720p] [YTS.AM]" -> "Green Book (2018)"
    --dir <dir>
        directory where should this program look for files
-s, --fix-spaces <fix-spaces>
        whatever you give is replaced by space (but only single chars)

        example:

        `--fix-spaces="_"` results in:

        "the_office_[720p]_[x265]" -> "the office [720p] [x265]"
-t, --rmtags <remove-tags>
        remove tags, they're usually inside [] or (). e.g. -s "() []"

        Syntax for this argument should be '<opening bracket><closing bracket> <repeat>'

        example:

        ezr -s "[] ()"

        "Mind Field S03E02 (2018) [1080p] [x265] [YIFY].mkv" -> "Mind Field S03E02.mkv"
    --trim-left-after <trim-left-after>
        Trim after the given sequence to the left.

        example:

        ezr --trim-left-with Mind

        "[HorribleSubs] Mind Field S03E02.mkv" -> "Mind Field S03E02.mkv"
    --trim-left-with <trim-left-with>
        Trim with the given sequence to the left.

        example:

        ezr --trim-left-with ubs]

        "[HorribleSubs] Mind Field S03E02.mkv" -> "Mind Field S03E02.mkv"
    --trim-right-after <trim-right-after>
        Trim after the given sequence to the right

        example:

        ezr --trim-right-after [1080p]

        "Mind Field S03E02 [1080p] [x265] [YIFY].mkv" -> "Mind Field S03E02 [1080p].mkv"
    --trim-right-with <trim-right-with>
        Trim with the given sequence to the right

        example:

        ezr --trim-right-with [1080p]

        "Mind Field S03E02 [1080p] [x265] [YIFY].mkv" -> "Mind Field S03E02 .mkv"

ez-renamer's People

Contributors

krawieck avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

songlinshu

ez-renamer's Issues

Can't pass strings starting with a hyphen

example

None of these work:

ezr --trim-right-with -ph    # error: -p is not a flag
ezr --trim-right-with "-ph"  # error: -p is not a flag
ezr --trim-right-with \-ph   # error: -p is not a flag
ezr --trim-right-with "\-ph" # no error: but is interpreted as literally `\-ph`

additional info

Clap has a flag to allow hyphens

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.