A lightweight Python CLI tool to analyze text files with ease. Built to count lines, characters, words, unique words, and search for keywords, this project showcases clean code, error handling, and command-line argument parsing using Python's argparse module. Perfect for developers, data analysts, or anyone curious about text file insights!
I created this tool to explore file I/O, text processing, and CLI development in Python while solving a practical problem: quickly extracting meaningful stats from text files. Whether you're analyzing logs, manuscripts, or datasets, this tool delivers fast, reliable results with a user-friendly interface.
- Line Count: Total number of lines in the file.
- Character Count: Total characters (excluding newlines).
- Word Count: Total words (punctuation removed).
- Unique Words: Case-insensitive count of unique words.
- Keyword Search: Find occurrences of a specific word (case-insensitive).
- Robust Error Handling: Gracefully handles missing files and unexpected errors.
- Python 3.x: Core programming language.
- argparse: For parsing command-line arguments.
- File I/O: Reading and processing text files.
- String Manipulation: Cleaning and analyzing text data.
- Clone the repository:
git clone https://github.com/bryanlokhim/text-file-analyzer.git
