Metadata-Version: 2.3
Name: TXTure
Version: 0.1.1
Summary: Add your description here
Author: openSourcerer9000
Author-email: openSourcerer9000 <seanrm100@gmail.com>
Requires-Dist: funkshuns>=0.1.0
Requires-Dist: myst-parser>=3,<4
Requires-Dist: sphinx>=7.4,<8
Requires-Python: >=3.12
Description-Content-Type: text/markdown

# TXTure

## Surgically edit machine-readable ASCII files

<img class="docs-cover" src="cover.png" alt="TXTure cover" width="50%">

TXTure Provides intuitive ways to work with data in text files.

## Installation

Add TXTure to a uv-managed project:

```shell
uv add TXTure
```

Or install it into the active environment:

```shell
uv pip install TXTure
# or
pip install TXTure
```

 ## Usage

```python
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:

  ```text
  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
