# qingtian1927/seartxt-and-texter architecture

> Architecture diagram of the GitHub repository qingtian1927/seartxt-and-texter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/qingtian1927/seartxt-and-texter
- Repository: https://github.com/qingtian1927/seartxt-and-texter

## Overview

SearTxT and Texter are complementary command-line tools: Texter converts supported documents in a chosen directory to text, then SearTxT searches text files there for exact or approximate matches. Their interactive command loops also configure directories, list files, and control conversion or search options; shared utilities provide configuration, path, display, and thread helpers. The main scripts and shared utility are indexed and excerpted; the branches are older variants, not a separate runtime stage. Conversion-to-search is documented, but no direct invocation between the tools is shown.

Main entry points: [`SearTxT.py`](https://github.com/qingtian1927/seartxt-and-texter/blob/main/SearTxT.py) (SearTxT CLI), [`Texter.py`](https://github.com/qingtian1927/seartxt-and-texter/blob/main/Texter.py) (Texter CLI), [`coreutils.py`](https://github.com/qingtian1927/seartxt-and-texter/blob/main/coreutils.py) (Shared helpers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_search["Text search"]
  node_seartxt["SearTxT CLI<br/>[SearTxT.py]"]
  node_search_modes["Search modes<br/>[SearTxT.py]"]
  node_txt_files["Target text files"]
  node_search_results["Match results<br/>[SearTxT.py]"]
end

subgraph group_convert["Document conversion"]
  node_texter["Texter CLI<br/>[Texter.py]"]
  node_conversion_jobs["Conversion jobs<br/>[Texter.py]"]
  node_format_handlers["Format handlers<br/>[Texter.py]"]
  node_pandoc["Pandoc runtime"]
  node_pdfminer["pdfminer.six"]
  node_converted_text["Converted text files"]
end

subgraph group_shared["Shared utilities"]
  node_shared_utils["Shared helpers<br/>[coreutils.py]"]
  node_settings["Settings files"]
  node_target_dir["Target directory"]
end

node_user(("CLI user"))

node_user -->|"enters queries"| node_seartxt
node_seartxt -->|"dispatches search"| node_search_modes
node_search_modes -->|"reads text"| node_txt_files
node_search_modes -->|"returns matches"| node_search_results
node_user -->|"starts conversion"| node_texter
node_texter -->|"starts jobs"| node_conversion_jobs
node_conversion_jobs -->|"dispatches files"| node_format_handlers
node_format_handlers -->|"converts DOCX"| node_pandoc
node_format_handlers -->|"extracts PDF text"| node_pdfminer
node_format_handlers -->|"writes text"| node_converted_text
node_converted_text -->|"enables search"| node_txt_files
node_seartxt -->|"uses helpers"| node_shared_utils
node_texter -->|"uses helpers"| node_shared_utils
node_shared_utils -->|"reads and writes"| node_settings
node_seartxt -->|"searches directory"| node_target_dir
node_texter -->|"converts directory"| node_target_dir

click node_seartxt "https://github.com/qingtian1927/seartxt-and-texter/blob/main/SearTxT.py"
click node_search_modes "https://github.com/qingtian1927/seartxt-and-texter/blob/main/SearTxT.py"
click node_search_results "https://github.com/qingtian1927/seartxt-and-texter/blob/main/SearTxT.py"
click node_texter "https://github.com/qingtian1927/seartxt-and-texter/blob/main/Texter.py"
click node_conversion_jobs "https://github.com/qingtian1927/seartxt-and-texter/blob/main/Texter.py"
click node_format_handlers "https://github.com/qingtian1927/seartxt-and-texter/blob/main/Texter.py"
click node_shared_utils "https://github.com/qingtian1927/seartxt-and-texter/blob/main/coreutils.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_seartxt,node_search_modes,node_txt_files,node_search_results,node_user toneBlue
class node_texter,node_conversion_jobs,node_format_handlers,node_pandoc,node_pdfminer,node_converted_text toneAmber
class node_shared_utils,node_settings,node_target_dir toneMint
```

## Components

### Text search

- [SearTxT CLI](https://github.com/qingtian1927/seartxt-and-texter/blob/main/SearTxT.py): `SearTxT.py`
- [Search modes](https://github.com/qingtian1927/seartxt-and-texter/blob/main/SearTxT.py): `SearTxT.py`
- **Target text files**
- [Match results](https://github.com/qingtian1927/seartxt-and-texter/blob/main/SearTxT.py): `SearTxT.py`

### Document conversion

- [Texter CLI](https://github.com/qingtian1927/seartxt-and-texter/blob/main/Texter.py): `Texter.py`
- [Conversion jobs](https://github.com/qingtian1927/seartxt-and-texter/blob/main/Texter.py): `Texter.py`
- [Format handlers](https://github.com/qingtian1927/seartxt-and-texter/blob/main/Texter.py): `Texter.py`
- **Pandoc runtime**
- **pdfminer.six**
- **Converted text files**

### Shared utilities

- [Shared helpers](https://github.com/qingtian1927/seartxt-and-texter/blob/main/coreutils.py): `coreutils.py`
- **Settings files**
- **Target directory**

### Other components

- **CLI user**

## Connections

- CLI user → SearTxT CLI: enters queries (evidence: `README.md`)
- SearTxT CLI → Search modes: dispatches search (evidence: `SearTxT.py`)
- Search modes → Target text files: reads text (evidence: `README.md`)
- Search modes → Match results: returns matches (evidence: `SearTxT.py`)
- CLI user → Texter CLI: starts conversion (evidence: `README.md`)
- Texter CLI → Conversion jobs: starts jobs (evidence: `Texter.py`)
- Conversion jobs → Format handlers: dispatches files (evidence: `Texter.py`)
- Format handlers → Pandoc runtime: converts DOCX (evidence: `Texter.py`)
- Format handlers → pdfminer.six: extracts PDF text (evidence: `Texter.py`)
- Format handlers → Converted text files: writes text (evidence: `README.md`)
- Converted text files → Target text files: enables search (evidence: `README.md`)
- SearTxT CLI → Shared helpers: uses helpers (evidence: `SearTxT.py`)
- Texter CLI → Shared helpers: uses helpers (evidence: `Texter.py`)
- Shared helpers → Settings files: reads and writes (evidence: `coreutils.py`)
- SearTxT CLI → Target directory: searches directory (evidence: `README.md`)
- Texter CLI → Target directory: converts directory (evidence: `README.md`)
