https://github.com/jiro4989/rena
rena is a tiny fire/directory renaming command.
https://github.com/jiro4989/rena
cli command nim rename
Last synced: 9 days ago
JSON representation
rena is a tiny fire/directory renaming command.
- Host: GitHub
- URL: https://github.com/jiro4989/rena
- Owner: jiro4989
- License: mit
- Created: 2020-03-26T11:50:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-06T00:54:43.000Z (about 4 years ago)
- Last Synced: 2025-03-31T17:50:48.243Z (about 2 months ago)
- Topics: cli, command, nim, rename
- Language: Nim
- Homepage:
- Size: 316 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
====
rena
====|gh-actions| |nimble-version| |nimble-install|
rena is a tiny file/directory renaming command.
|demo-replace|
.. contents:: Table of contents
:depth: 3Overview
========I hate a file name that has whitespace.
Sometimes, it occurs a bug of program (Especially, shell script).
Renaming is boring and takes times.
So I created ``rena`` command. This will resolve this problem.Development
===========Nim 1.0.6
Usage
=====You can do ``dry-run`` with ``-d`` or ``--dry-run``.
It means that you can check file name before real renaming with your eyes.
Files or directories will be renamed if you didn't use ``-d`` options.replace
-------``replace`` sub-command runs replacing characters, ``--from-str`` to ``--to-str``.
``replace`` replaces whitespace in default.This code runs dry-run.
.. code-block:: shell
$ rena replace --dry-run -t _ target_dir
# or
$ rena replace -d -t _ target_dir
This code actually runs renaming.
.. code-block:: shell
$ rena replace -t _ target_dir
# '-p' prints results
$ rena replace -p -t _ target_dir
You should use the ``--from-strs`` or ``-f`` options if you want to replace multiple characters.
Examples: Replacing ``(`` and ``)`` to ``_`` .
.. code-block:: shell
$ rena replace -f '(' -f ')' -t "_" target_dir
delete
------You should use the ``delete`` sub-command if you want to delete characters.
``delete`` deletes whitespace in default... code-block:: shell
$ rena delete target_dir
You should use ``-f`` options if you change delete target characters.
.. code-block:: shell
$ rena delete -f '(' -f ')' target_dir
lower
-----``lower`` sub-command renames *all* characters to lower character.
.. code-block:: shell
$ rena lower target_dir
upper
-----``upper`` sub-command renames *all* characters to upper character.
.. code-block:: shell
$ rena upper target_dir
Install
=======.. code-block:: shell
nimble install rena
Download binary from `Release `_.
License
=======MIT
.. |gh-actions| image:: https://github.com/jiro4989/rena/workflows/build/badge.svg
:target: https://github.com/jiro4989/rena/actions
.. |nimble-version| image:: https://nimble.directory/ci/badges/rena/version.svg
:target: https://nimble.directory/ci/badges/rena/nimdevel/output.html
.. |nimble-install| image:: https://nimble.directory/ci/badges/rena/nimdevel/status.svg
:target: https://nimble.directory/ci/badges/rena/nimdevel/output.html.. |demo-replace| image:: ./docs/demo_replace.gif