Coder Social home page Coder Social logo

saragiotto / rename_python Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 8 KB

Script to find and replace strings across all projects folder. A very handful rename tool for a day-to-day usage.

Python 100.00%
python rename rename-files rename-script renamer

rename_python's Introduction

Rename Script

Rename files content, files name and folders recursively.

Usage

$ python3 /Path/To/rename.py oldNameToFind newNameToReplace

Arguments

  • -fc Changes only files content

  • -fn Changes only files names

  • -dn Changes only directories names

  • --dry-run No changes will be made, only printed to sysout.

  • -v Super detailed information and all changes are printed on the terminal.

If none of the above arguments is informed, all the changes will be executed.

Ex:

$ python3 /Path/To/rename.py OldControllerName NewControllerName -v

The same effect occur with this command

$ python3 /Path/To/rename.py OldControllerName NewControllerName -v -fc -fn -dn

This command will print all detected changes but none will be applied

$ python3 /Path/To/rename.py OldControllerName NewControllerName -v --dry-run

Execution Process

  • Find and replace all files content that match given string
  • Find and replace all files name that match given string
  • Find and replace all folders and subfolders that match given string, from the nested level all the way up until the top folder

This steps will occur in this order.

Ex. Given this folder and file location: src/controller/OldNameController/OldNameControllerHelper/OldNameHelper.js

After the execution, the result will be this: src/controller/NewLongNameController/NewLongNameControllerHelper/NewLongNameHelper.js

Add Texto to Fire Hooks

This should fire some new webhooks. Testing web hooks. Add somenthing to existent pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.