From 21f9e2c431a6ffaad913661ee7417989f7f4514a Mon Sep 17 00:00:00 2001 From: 24_OskinEA <24_OskinEA@iux.local> Date: Mon, 7 Sep 2026 09:19:34 +0300 Subject: [PATCH] Add project documentation --- README.md | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..721e5d3 --- /dev/null +++ b/README.md @@ -0,0 +1,96 @@ +# Text Analyzer + +A typed command-line tool for text file analysis. + +## Requirements + +- Python 3.12+ + +## Installation + +Create a virtual environment: + +```bash +python3 -m venv .venv +``` + +Activate it: + +```bash +source .venv/bin/activate +``` + +Install dependencies: + +```bash +python -m pip install -r requirements.txt +``` + +Install the package in editable mode: + +```bash +python -m pip install -e . +``` + +## Usage + +Basic analysis: + +```bash +text-analyzer sample.txt +``` + +Show the three most frequent words: + +```bash +text-analyzer sample.txt --top 3 +``` + +Set minimum word length: + +```bash +text-analyzer sample.txt --min-len 4 +``` + +JSON output: + +```bash +text-analyzer sample.txt --format json +``` + +Specify encoding: + +```bash +text-analyzer sample.txt --encoding utf-8 +``` + +## Development checks + +Type checking: + +```bash +mypy src +``` + +Linting: + +```bash +ruff check . +``` + +Formatting: + +```bash +ruff format --check . +``` + +Tests and coverage: + +```bash +pytest +``` + +## Current test results + +- 15 tests passed +- Core coverage: 96%