Files
CLI_repozitory/README.md
2026-09-07 22:15:27 +03:00

47 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Text Analyzer CLI
CLI-инструмент на Python для анализа текстовых файлов (подсчёт строк, слов, символов и популярных слов).
## Установка
1. Перейдите в папку проекта и активируйте виртуальное окружение:
```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
pip install -r requirements.txt
```
## Использование
Обычный запуск анализа файла:
```Bash
text-analyzer sample.txt
```
Вывод результата в формате JSON:
```Bash
text-analyzer sample.txt --format json
```
Показать топ-5 частых слов:
```Bash
text-analyzer sample.txt --top 5
```
### Тестирование и проверка качества
Запуск авто-тестов с проверкой покрытия:
```Bash
pytest --cov=src/text_analyzer
```
Проверка типов и стиля кода:
```Bash
mypy src
ruff check .
```