# turbo-forcing/logrec-and-pycmd architecture

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

- Interactive diagram: https://gitdiagram.com/turbo-forcing/logrec-and-pycmd
- Repository: https://github.com/turbo-forcing/logrec-and-pycmd

## Overview

This repository provides two complementary Python tools: PYcmd for interactive or argument-driven file and system tasks, and logrec for recording and managing log files. The principal PYcmd workflow routes user commands through its command interface to file, directory, calculation, random, and time operations; those operations report activity through logrec. Separately, logrec exposes timestamped levels and log-file management, search, parsing, and export capabilities. README statements supplement the sampled implementation where code paths were not excerpted; unsampled internal relationships are omitted.

Main entry points: [`logrec/logrec.py`](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py) (Logging API), [`PYcmd/PYcmd.py`](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py) (Command interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pycmd["PYcmd command tool"]
  node_commandloop["Command interface<br/>[PYcmd.py]"]
  node_fileops["File operations<br/>[PYcmd.py]"]
  node_dirops["Directory operations<br/>[PYcmd.py]"]
  node_calc["Calculations<br/>[PYcmd.py]"]
  node_utilities["Random and time<br/>[PYcmd.py]"]
end

subgraph group_logging["Log recording"]
  node_logapi["Logging API<br/>[logrec.py]"]
  node_logstore[("Log files")]
end

subgraph group_logmgmt["Log management"]
  node_logedit["Log management<br/>[logrec.py]"]
  node_logsearch["Search and parse<br/>[logrec.py]"]
  node_logexport["Export and metadata<br/>[logrec.py]"]
end

node_operator(("User"))

node_operator -->|"enters commands"| node_commandloop
node_commandloop -->|"dispatches file tasks"| node_fileops
node_commandloop -->|"dispatches directory tasks"| node_dirops
node_commandloop -->|"dispatches calculations"| node_calc
node_commandloop -->|"dispatches utilities"| node_utilities
node_fileops -->|"records outcomes"| node_logapi
node_dirops -->|"records outcomes"| node_logapi
node_calc -.->|"records outcomes"| node_logapi
node_utilities -->|"records outcomes"| node_logapi
node_logapi -->|"appends entries"| node_logstore
node_operator -->|"records entries"| node_logapi
node_logedit -->|"reads and modifies"| node_logstore
node_logsearch -->|"searches entries"| node_logstore
node_logexport -.->|"parses and exports"| node_logstore

click node_commandloop "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py"
click node_fileops "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py"
click node_dirops "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py"
click node_calc "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py"
click node_utilities "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py"
click node_logapi "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py"
click node_logedit "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py"
click node_logsearch "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py"
click node_logexport "https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.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_commandloop,node_fileops,node_dirops,node_calc,node_utilities,node_operator toneBlue
class node_logapi,node_logstore toneAmber
class node_logedit,node_logsearch,node_logexport toneMint
```

## Components

### PYcmd command tool

- [Command interface](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py): `PYcmd/PYcmd.py`
- [File operations](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py): `PYcmd/PYcmd.py`
- [Directory operations](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py): `PYcmd/PYcmd.py`
- [Calculations](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py): `PYcmd/PYcmd.py`
- [Random and time](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/PYcmd/PYcmd.py): `PYcmd/PYcmd.py`

### Log recording

- [Logging API](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py): `logrec/logrec.py`
- **Log files**

### Log management

- [Log management](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py): `logrec/logrec.py`
- [Search and parse](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py): `logrec/logrec.py`
- [Export and metadata](https://github.com/turbo-forcing/logrec-and-pycmd/blob/main/logrec/logrec.py): `logrec/logrec.py`

### Other components

- **User**

## Connections

- User → Command interface: enters commands (evidence: `README.md`)
- Command interface → File operations: dispatches file tasks (evidence: `PYcmd/PYcmd.py`)
- Command interface → Directory operations: dispatches directory tasks (evidence: `PYcmd/PYcmd.py`)
- Command interface → Calculations: dispatches calculations (evidence: `PYcmd/PYcmd.py`)
- Command interface → Random and time: dispatches utilities (evidence: `PYcmd/PYcmd.py`)
- File operations → Logging API: records outcomes (evidence: `PYcmd/PYcmd.py`)
- Directory operations → Logging API: records outcomes (evidence: `PYcmd/PYcmd.py`)
- Calculations → Logging API: records outcomes (evidence: `PYcmd/PYcmd.py`)
- Random and time → Logging API: records outcomes (evidence: `PYcmd/PYcmd.py`)
- Logging API → Log files: appends entries (evidence: `logrec/logrec.py`)
- User → Logging API: records entries (evidence: `README.md`)
- Log management → Log files: reads and modifies (evidence: `logrec/logrec.py`)
- Search and parse → Log files: searches entries (evidence: `logrec/logrec.py`)
- Export and metadata → Log files: parses and exports
