Skip to main content

TXTure

Surgically edit machine-readable ASCII files

TXTure cover

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:

  • lines is 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

txture-0.1.2.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

txture-0.1.2-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file txture-0.1.2.tar.gz.

File metadata

  • Download URL: txture-0.1.2.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for txture-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2a2652688ce42d5bdc825e451f799f0044bcc47f2a939e3445a9f5697a15589a
MD5 c3a4ebd1b129548ce11bc4f8e709aaf2
BLAKE2b-256 078a3ed7c32d143f755c5f61338c0fef55456234af1448001ce12ba523326323

See more details on using hashes here.

File details

Details for the file txture-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: txture-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for txture-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e770d3e84e080a681ea1922a1423edb15b37c78915dd6a9e70dc28635ea3af4b
MD5 048273786cf9a805e18f366b7caf2b62
BLAKE2b-256 9318bcde6ed0e34fae300a68cc68e450756aad4888571203165070db1b575b2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page