Barenames
Commandline tool for batch renaming files using regular expressions.
Usage
Usage: barenames [OPTIONS] PATTERN REPLACEMENT
Batch file rename tool with regex substitution.
Example:
barenames "myfile-(\d+)" "yourfile-\g<1>"
Options:
--dir PATH Directory to perform actions in (default: current
working directory)
--preview / --no-preview Show preview of renames with confirmation prompt.
-r, --recursive Search files to rename recursively
--help Show this message and exit
Barenames uses regex to change file names, which is very powerful tool.
But power comes with responsibility, it is adviced to use --preview option to
view what program is gonna do, before it does it, cause with regex you never truly know....
Change file extension:
This example changes extension of all .md files in
current working directory to .rst
barenames --preview "(?P<filename>.+)\.md" "\g<filename>.rst"
If your files are not in current working directory just pass
--dir option to override dir.
barenames --dir ~/my-notes/ --preview "(?P<filename>.+)\.md" "\g<filename>.rst"
If you wish to rename files in subdirectories too, use --recursive or -r for short.
barenames --recursive --preview "(?P<filename>.+)\.md" "\g<filename>.rst"
Use this option with caution though.
Release files for barenames 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| barenames-0.1.2.tar.gz | 13.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| barenames-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.0 kB
Release files / barenames-0.1.2.tar.gz
| Download URL | barenames-0.1.2.tar.gz |
|---|---|
| Size | 13.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
334dd3e44fa6049c32208eaa20aaae362816ac6879c90926aae4070d79adc339
|
|
BLAKE2b-256 checksum How to use checksums |
cbdd81720710b00a78a0f1f17d062545ad56f901162fbc303f1f897c284f19e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.2 Windows/10
|
Release files / barenames-0.1.2-py3-none-any.whl
| Download URL | barenames-0.1.2-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf72a428b1f07fa6f7a7bb488aa84a05e24126ff6fca0db6b46209a0b9d50c7c
|
|
BLAKE2b-256 checksum How to use checksums |
0499c3e2c0f6eaecd7a3cd07da36727181482d0217fbfad9d48f155beed28b58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.4 CPython/3.9.2 Windows/10
|