Git Product home page Git Product logo

agusmakmun / changewords Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 12 KB

Simply python tool to change or replace the text string in the files. This tool pretty nice for programmers if somehow they want to replace/change their codes for many files, eg: function, class, variable, etc for recursive files or not.

Home Page: https://asciinema.org/a/198512

License: MIT License

Python 97.21% Shell 2.79%
words-replacer python-tools changewords words-changer text text-replacer text-replace python text-processing

changewords's Introduction

changewords

build status

Simply python tool to change or replace the text string in the files. This tool pretty nice for programmers if somehow they want to replace/change their codes for many files, eg: function, class, variable, etc for recursive files or not.

Installation

Install from PyPI:

$ pip install changewords

Usage

usage: changewords.py [-h] [-p PATH] [-ft FILE_TYPE] [-fs FROM_STRING]
                      [-ts TO_STRING]

Python tool to change or replace the strings in files.

optional arguments:
  -h, --help            show this help message and exit
  -p PATH, --path PATH  the starting path or parent path name
                        by default is current path/folder.
  -ft FILE_TYPE, --file_type FILE_TYPE
                        file type you are looking for, eg: '.py', '.txt'
                        by default is '.py' (python files)
  -fs FROM_STRING, --from_string FROM_STRING
                        the string to change/replace
  -ts TO_STRING, --to_string TO_STRING
                        the string replacement

Example

$ changewords -p=changewords_test -ft=.py -fs=helloworld -ts=mantabjiwa

# or

$ changewords --path=changewords_test --file_type=.py --from_string=helloworld --to_string=mantabjiwa

Running tests

To run the test use:

$ python tests.py

changewords's People

Contributors

agusmakmun avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.