Change your project name in seconds.
java \
-Djava.util.logging.manager=io.yupiik.logging.jul.YupiikLogManager \
-cp "target/renamer-*-fat.jar" \
io.yupiik.renamer.Renamer \
--dry "${DRYRUN:-true}" \
--from /opt/myproject \
--to /opt/myrenamedproject \
--rename-folders true \
--exclude auto \
--renaming Text1=Text2 \
--renaming text1=text2 \
--renaming TEXT1=TEXT2 \
--renaming txt1-=txt2- \
--renaming .txt1=.txt2
This command will rename all text (exact replacement with this configuration but you can use regexes prefixing the left part of the renaming configuration with r/
)
from files in /opt/myproject
to /opt/myrenamedproject
.
The --rename-folders
option enables to apply the renaming on folders too.
- --dry [true|false]
-
should the renaming be executed or just logged (to test some configuration).
- --overwrite [true|false]
-
if the target file exists, should it be overwriten or not (enables to execute it, fix some issues manually and rerun it if configuration changed).
- --rename-folders [true|false]
-
should folder also get renamed with the renaming rules.
- --from [string]
-
source folder to rename file from.
- --to [string]
-
target folder to write renamed file to. Note it can be the same as from (if not set it defaults to it) but it is not recommended since you can loose original state.
- --exclude [string]
-
list of files/folders to ignore. Value can be a name (example:
.git
ornode_modules
ortarget
), a prefix (prefix*
), a suffix (*suffix
) or a regex (r/<regex>
). Note thatauto
use common java defaults. Can be set N times. - --exclude-filtering [string]
-
files to rename without doing any replacement in them (binaries, images). It behaves as
--exclude
. Can be set N times. - --renaming [string]
-
the renaming rules to do (can be set N times). The value uses this pattern:
before=after
wherebefore
is the searched string andafter
its replacement. Note that ifbefore
starts withr/
it will use a regex to match the text. Finally you can append?ext=ext1,ext2,…
to the string to filter the replacement for some file extensions only, for exampleclass=interface?ext=java
.