-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
71e1d68
commit 68485d2
Showing
3 changed files
with
29 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,19 +50,19 @@ | |
|
||
#### Method 1: Download binaries | ||
|
||
[brename v2.8.1](https://github.com/shenwei356/brename/releases/tag/v2.8.1) | ||
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/brename/v2.8.1/total.svg)](https://github.com/shenwei356/brename/releases/tag/v2.8.1) | ||
[brename v2.9.0](https://github.com/shenwei356/brename/releases/tag/v2.9.0) | ||
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/brename/v2.9.0/total.svg)](https://github.com/shenwei356/brename/releases/tag/v2.9.0) | ||
|
||
***Tip: run `brename -V` to check update !!!*** | ||
|
||
OS |Arch |File, 中国镜像 |Download Count | ||
:------|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
Linux |32-bit |[brename_linux_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_linux_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_linux_386.tar.gz) | ||
Linux |**64-bit**|[**brename_linux_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_linux_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_linux_amd64.tar.gz) | ||
OS X |32-bit |[brename_darwin_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_darwin_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_darwin_386.tar.gz) | ||
OS X |**64-bit**|[**brename_darwin_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_darwin_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_darwin_amd64.tar.gz) | ||
Windows|32-bit |[brename_windows_386.exe.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_windows_386.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_386.exe.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_windows_386.exe.tar.gz) | ||
Windows|**64-bit**|[**brename_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_windows_amd64.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.8.1/brename_windows_amd64.exe.tar.gz) | ||
Linux |32-bit |[brename_linux_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_linux_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_linux_386.tar.gz) | ||
Linux |**64-bit**|[**brename_linux_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_linux_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_linux_amd64.tar.gz) | ||
OS X |32-bit |[brename_darwin_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_darwin_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_darwin_386.tar.gz) | ||
OS X |**64-bit**|[**brename_darwin_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_darwin_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_darwin_amd64.tar.gz) | ||
Windows|32-bit |[brename_windows_386.exe.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_windows_386.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_386.exe.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_windows_386.exe.tar.gz) | ||
Windows|**64-bit**|[**brename_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_windows_amd64.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.9.0/brename_windows_amd64.exe.tar.gz) | ||
|
||
|
||
Just [download](https://github.com/shenwei356/brename/releases) compressed | ||
|
@@ -75,12 +75,9 @@ And then: | |
|
||
sudo cp brename /usr/local/bin/ | ||
|
||
1. Or add the current directory of the executable file to environment variable | ||
`PATH`: | ||
|
||
echo export PATH=\$PATH:\"$(pwd)\" >> ~/.bashrc | ||
source ~/.bashrc | ||
1. Or copy to anywhere in the environment variable `PATH`: | ||
|
||
mkdir -p $HOME/bin/; cp brename $HOME/bin/ | ||
|
||
1. **For windows**, just copy `brename.exe` to `C:\WINDOWS\system32`. | ||
|
||
|
@@ -98,7 +95,7 @@ And then: | |
brename -- a practical cross-platform command-line tool for safely batch renaming files/directories via regular expression | ||
Version: 2.8.1 | ||
Version: 2.9.0 | ||
Author: Wei Shen <[email protected]> | ||
|
@@ -159,6 +156,7 @@ Flags: | |
-k, --kv-file string tab-delimited key-value file for replacing key with value when using "{kv}" in -r (--replacement) | ||
-l, --list only list paths that match pattern | ||
-a, --list-abs list absolute path, using along with -l/--list | ||
-s, --list-sep string separater for list of found paths (default "\n") | ||
--max-depth int maximum depth for recursive search (0 for no limit) | ||
--nr-width int minimum width for {nr} in flag -r/--replacement. e.g., formating "1" to "001" by --nr-width 3 (default 1) | ||
--only-dir only rename directories | ||
|
@@ -170,6 +168,7 @@ Flags: | |
-u, --undo undo the LAST successful operation | ||
-v, --verbose int verbose level (0 for all, 1 for warning and error, 2 for only error) (default 0) | ||
-V, --version print version information and check for update | ||
``` | ||
|
||
|
||
|
@@ -266,7 +265,6 @@ Take a directory for example: | |
├── b.html | ||
└── b.jpg | ||
|
||
|
||
1. Renaming directory too (`-D/--including-dir`) | ||
|
||
$ brename -p "a" -r "A" -R -D | ||
|
@@ -330,7 +328,6 @@ Take a directory for example: | |
[INFO] checking: [ ok ] 'b.jpeg' -> 'pic-002.jpeg' | ||
[INFO] 2 path(s) to be renamed | ||
|
||
|
||
1. Replace submatch with corresponding value via key-value file (`-k/--kv-file`) | ||
|
||
$ more kv.tsv | ||
|
@@ -437,8 +434,6 @@ Take a directory for example: | |
|
||
# if you make more changes after renaming, you can | ||
brename -U | ||
|
||
|
||
|
||
## Real-world examples | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters