Skip to main content

Renamer

CLI tool written in Python 3 used to systemically rename files in a directory while adhering to a variety of criteria.

This program attempts to emulate the simplicity of the CLI program FFmpeg but for renaming files. Basic operations are straight-forward, while complex operations only invovle adding more flags and parameters to your operation. A directory with files that contain some numerical pattern are all that's required to get started. The application is well-paired for other software that require strict naming schemes, such as Plex, Kodi, or image managers.

Installation

PyPI

Install renamer-kt using pip:

bash

pip install renamer-kt

Make sure you have Python and pip installed.

Usage

Operation Flag Flag(Formal) Parameter(s) Example Description
Shift -s --shift Number Shift (int) --shift -1 Shifts all numerical values by the specified offset
Zeroes -z --zeroes Leading Zeroes [int] -z 3 Prepends numerical values with the specified or inferred number of leading zeroes
Format -f --fmt Output Format (str) -f "Episode $d" Customizes filename output (see wiki for usage)
Extension -e --ext File Extension (str) --ext png Changes the extension of all files to the specified extension
Random -n --random Random Seed [int] -n 839693 Shuffles numerical values using the specified seed, or randomly
Consecutive -c --consecutive Flattens numerical values such that they are all consecutive
Mute -m --mute Squelches the console output of filenames and their renamed filename
Confirm -y --yes Confirms the operation and makes changes to your file system according to the parameters
Version -v --version Prints the version number of the program
Help -h --help Prints the help text for the program

Usage Examples

The following usage snippets use this directory as a template:

mydir/
  2021vacation0001.jpeg
  2021vacation0003.jpeg
  2021vacation0004.jpeg
  2021vacation0010.jpeg

Clean-up

e.g. 1.jpeg, 3.jpeg, 4.jpeg, 10.jpeg

renamer mydir

Formalize & Fix Ordering

01.jpeg, 02.jpeg, 03.jpeg, 04.jpeg

renamer mydir -z 1 -c

Format & Modify Extension

2021 Vacation - 1.png, 2021 Vacation - 3.png, 2021 Vacation - 4.png, 2021 Vacation - 10.png

renamer mydir -e png -f "2021 Vacation - $d"

Shift & Flatten

4.jpeg, 5.jpeg, 6.jpeg, 7.jpeg

renamer mydir -s 3 -c

Meta

Kevin Tyrrell – KevinTearUl@gmail.com

Distributed under the GPL3 license. See LICENSE for more information.

https://github.com/KevinTyrrell

Contributing

  1. Fork it (https://github.com/KevinTyrrell/Renamer)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Release files for renamer-kt 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for renamer-kt 1.0.2
File Size Uploaded
renamer_kt-1.0.2.tar.gz 26.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for renamer-kt 1.0.2
File Interpreter ABI Platform
renamer_kt-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 53.0 kB

Release files / renamer_kt-1.0.2.tar.gz

Download URL renamer_kt-1.0.2.tar.gz
Size 26.7 kB
Tags Source
SHA-256 checksum
How to use checksums
173fd0d2cf0107bd4db45519eb1765c0a66b3efe3a8030daf26c99a3796b5607
BLAKE2b-256 checksum
How to use checksums
c9026e86371818c1e0f1d89732e2e47b2a672c894d63a9fed0a34aada30ad253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / renamer_kt-1.0.2-py3-none-any.whl

Download URL renamer_kt-1.0.2-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c2d7c1973ce0df098dbc3d0aae0910047e2b734a76b095165b6f8142b728f82c
BLAKE2b-256 checksum
How to use checksums
54cc0cf9dd26913021ac4dc38e2124656e4cb19762c35285418f57b1f8ad53d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page