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.1.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.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: txture-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 dac56c55541ab76156462a60580e8a57af22413a555b9ecf51e688e6133ac836
MD5 1f6f1941e97ba4baef8926f17ff62ab0
BLAKE2b-256 31600c2118eb9144d6a27d028f8eb9d29670b0a4e48a2c923cf7ef7e769ff2b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: txture-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b7c1ef83607df4f8db87d4a68001c883dfe4ab080a85c454247fb58343e4062
MD5 08fd5347b6b6e8eee132370c7a24511d
BLAKE2b-256 3f1000a325b5152ffc86232ac3aaa6582bd81b2e9250cf6eb4ea0958153fef34

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

2 files

Supported by

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