riptr
Text substitution similar to tr or sed s// but without the frustration. Uses plain old python regex style.
Installing
Now deployed to pypi, install with:
pip install riptr
This adds the riptr and rtr cli tools to your python environment path.
Usage
echo "some example text 1234" > test.file
# default output is stdout
riptr -m "^(.*?)([\d]{2})" -s "\g<1>56" test.file
some example text 5634
# specify patch mode 'p'
riptr -m "^(.*?)([\d]{2})" -s "\g<1>56" -o p test.file
---
+++
@@ -1 +1 @@
-some example text 1234
+some example text 5634
# or inplace
riptr -m "^(.*?)([\d]{2})" -s "\g<1>56" -o i test.file
cat test.file
some example text 5634
Metadata
Release files for riptr 1.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| riptr-1.2.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for riptr-1.2.2-py2.py3-none-any.whl |
Release files / riptr-1.2.2-py2.py3-none-any.whl
| Download URL | riptr-1.2.2-py2.py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b743033473f35b9b0617e9089855fc04aea97a1dad80272a4000c206c38301a7
|
|
BLAKE2b-256 checksum How to use checksums |
048636765460d353dbf4c60ec5442bcfca2362b30fffe894d4d90ace0f4a244e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for riptr 1.2.2
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.