TXTure
Surgically edit machine-readable ASCII files
TXTure Provides intuitive ways to work with data in text files.
Installation
Add TXTure to a uv-managed project:
uv add TXTure
Or install it into the active environment:
uv pip install TXTure
# or
pip install TXTure
Usage
import TXTure as txt
lines = txt.read(path_to_txt_file) # list of lines
i = txt.findKey(lines, ['key1', 'key2'])
found_line = lines[i]
print(found_line)
Below are the basic primitives used. By convention:
-
linesis a list of strings previously read from a text file. -
A key is a string or list of strings specifying where to search within the lines from the text file.
-
A list of keys searches for each string in sequence and stops after finding the final key. The matching line index, the full line, or the text following the key may be important.
-
A sequence is a group of lines that all start with the same key, for example:
Plan File=p01 Plan File=p03 Plan File=p04 Plan File=p02
-
A block is a continuous partition of lines delimited by the lines found at two keys.
-
Free software: MIT license
Metadata
Release files for TXTure 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| txture-0.1.2.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| txture-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.2 kB
Release files / txture-0.1.2.tar.gz
| Download URL | txture-0.1.2.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2a2652688ce42d5bdc825e451f799f0044bcc47f2a939e3445a9f5697a15589a
|
|
BLAKE2b-256 checksum How to use checksums |
078a3ed7c32d143f755c5f61338c0fef55456234af1448001ce12ba523326323
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / txture-0.1.2-py3-none-any.whl
| Download URL | txture-0.1.2-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e770d3e84e080a681ea1922a1423edb15b37c78915dd6a9e70dc28635ea3af4b
|
|
BLAKE2b-256 checksum How to use checksums |
9318bcde6ed0e34fae300a68cc68e450756aad4888571203165070db1b575b2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|