Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agusmakmun/changewords
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.
https://github.com/agusmakmun/changewords
changewords python python-tools text text-processing text-replace text-replacer words-changer words-replacer
Last synced: 5 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/agusmakmun/changewords
- Owner: agusmakmun
- License: mit
- Created: 2018-08-24T10:29:36.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-25T09:13:13.000Z (about 6 years ago)
- Last Synced: 2024-10-12T19:34:58.973Z (about 1 month ago)
- Topics: changewords, python, python-tools, text, text-processing, text-replace, text-replacer, words-changer, words-replacer
- Language: Python
- Homepage: https://asciinema.org/a/198512
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: changewords/__init__.py
- License: LICENSE
Awesome Lists containing this project
README
===================
changewords
===================|pypi version| |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 replacementExample
--------------::
$ 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
.. |pypi version|
image:: https://img.shields.io/pypi/v/changewords.svg
:target: https://pypi.python.org/pypi/changewords.. |build status| image:: https://travis-ci.org/agusmakmun/changewords.svg?branch=master
:target: https://travis-ci.org/agusmakmun/changewords