Abstract
This is a CLI application that provides string replacement with JSON and YAML files.
Regular expressions are not supported.
Japanse document is here.
How To Install
pip install simple-text-replacer
Package Dependencies
The following packages may not work properly if they are not installed:
- PyYAML: Most popular YAML parser for Python.
Example
my_pet.txt:
I have one dog and one cat.
replacer.json:
{"dog":"wolf", "cat":"lion"}
> simrep replacer.json my_pet.txt
> cat my_pet.txt
I have one wolf and one lion.
Sytax
simrep <replacer> <text_file>
replacer is in JSON or YAML format.
replacer must be written by key-value like {original_word: replacement_word}.
text_file can also be specified as a directory, but note that in this case, it will replace all files within that directory and its subdirectories.
If you prefer not to overwrite text_file, you can use the -n option to output to a new file or directory.
Options
[-h|--help]
Show help message.
[-v|--version]
Show version message.
[-n|--new] <new file or new directory>
Ouput as an anther file or directory.
Metadata
Release files for simple-text-replacer 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simple_text_replacer-1.0.1.tar.gz | 4.1 kB | Without provenance | Details for simple_text_replacer-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_text_replacer-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for simple_text_replacer-1.0.1-py3-none-any.whl |
Total release size: 8.7 kB
Release files / simple_text_replacer-1.0.1.tar.gz
| Download URL | simple_text_replacer-1.0.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
91e91d346ef0746f3270a8b2274940074acb4c314a83816737b87f768109d970
|
|
BLAKE2b-256 checksum How to use checksums |
c152734b38790a7c42c86847f078c25a226f1a365f54942f8f4dece165b81e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Release files / simple_text_replacer-1.0.1-py3-none-any.whl
| Download URL | simple_text_replacer-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a98ac9c278418ccaba0e18fb9771361a312b8e0fce3a0fcd3f3b3ad023fdc857
|
|
BLAKE2b-256 checksum How to use checksums |
bb12acf703ae5833543c4eefd9371f5b18874b340331a7d7fc4b31d9c0e688df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Security for simple-text-replacer 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.