embedded-text
Tool for extracting embedded text data in python script.
Requirement
Python >= 3.9
pip3
Usage
Install
``` % pip install embedded-text ```
import in your script
import embedded_text
Embeddig text data at the end of your script with head/tail lines
```
if False:
############# Embedded Code Start #######################
#!/usr/bin/env python3
def main():
print ('This is the sample : ____OUTPUT_WORDS____')
if __name__ == '__main__':
main()
############# Embedded Code End #######################
```
Initialize class with regular expression of head/tail lines
```
s_pttrn = r'\s*#{5,}\s*Embedded\s+Code\s+Start\s*#{5,}',
e_pttrn = r'\s*#{5,}\s*Embedded\s+Code\s+End\s*#{5,}'},
extractor = EmbeddedText(s_marker=s_pttrn,
e_marker=e_pttrn, ...)
```
You can do iterator access by EmbeddedText.lines()
for line in extractor.lines(input_path=None): sys.stdout.write(line)You can save to other file by EmbeddedText.dump()
extractor.dump(output_path, input_path=None)
It is possible to apply the keyword replacement and text filtering. You can see the example in "main()" function in "embedded_text.py"
Metadata
Release files for embedded-text 0.0.4
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 |
|---|---|---|---|---|
| embedded_text-0.0.4.tar.gz | 12.3 kB | Without provenance | Details for embedded_text-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| embedded_text-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for embedded_text-0.0.4-py3-none-any.whl |
Total release size: 21.0 kB
Release files / embedded_text-0.0.4.tar.gz
| Download URL | embedded_text-0.0.4.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b81bdc83a5dfa878f0ad9d34e7c5bfbcd8de5347ee8fed717d0c73e6934d664
|
|
BLAKE2b-256 checksum How to use checksums |
b1e241a7ded083d4c5fb00d9f8f9c75952879f8e57a03dc318e1e3010c49d88f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / embedded_text-0.0.4-py3-none-any.whl
| Download URL | embedded_text-0.0.4-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c49ad1ec75a1cb56a84fed9e316e3e0e1729a3c33fb7bb6bae35bbe1858a132
|
|
BLAKE2b-256 checksum How to use checksums |
6e4c17769d573122aa3a72655368620817b16f0ec06723dbc1f9109790599977
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for embedded-text 0.0.4
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.