Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.72 KB

File metadata and controls

31 lines (24 loc) · 1.72 KB

📝 Text File Analyzer

Climber scaling a steep cliff

Python License Status

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!

🚀 Why I Built This

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.

✨ Features

  • 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.

🛠️ Tech Stack

  • 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.

📦 Installation

  1. Clone the repository:
    git clone https://github.com/bryanlokhim/text-file-analyzer.git