BookBot is a simple command-line tool for browsing, previewing, and analyzing text files (books) in the books/ directory.
- Lists all
.txtfiles in thebooks/directory. - Lets you select a book to preview its content (first 500 characters).
- Counts the number of words in the selected book.
- Displays a frequency count of each character (case-insensitive, with whitespace and special characters shown clearly).
-
Add Books
Place your.txtfiles inside thebooks/directory.
Example:bookbot/ books/ alice_in_wonderland.txt moby_dick.txt main.py -
Install Python
Make sure you have Python 3.x installed.
You can check with:python --version
-
Run the Program
python main.py -
Follow the Prompts
- The program will list all
.txtfiles in thebooks/directory. - Enter the number corresponding to the book you want to read.
- The program will show a preview of the book (first 500 characters).
- It will then display the total word count and a character frequency table (case-insensitive).
- The program will list all
- Only
.txtfiles are listed as books. - The preview shows the first 500 characters of the book.
- Character frequency output displays whitespace and special characters clearly (e.g.,
' ','\n','\t').
See LICENSE.