/Text-Manipulator

Text Manipulator: A Python command-line tool designed to empower users with text manipulation functionalities, including counting characters and words, fixing capitalization, and removing excessive spaces, showcasing interactive command-line tool development.

Primary LanguagePython

Text Manipulator

Introduction

Welcome to the Text Manipulator project! This command-line Python application is designed to empower users with the ability to manipulate and analyze text strings according to their preferences. By offering a menu of options, users can modify inputted text in various ways, such as counting characters and words, fixing capitalization, and removing excessive spaces. This project highlights my proficiency in developing interactive command-line tools that offer users practical and flexible text manipulation functionalities.

Features

  • Count Non-Whitespace Characters: Calculate and display the number of characters in the inputted string excluding whitespaces.

  • Count Words: Calculate and display the number of words in the inputted string.

  • Fix Capitalization: Capitalize the first letter of each sentence in the inputted string and provide the corrected text.

  • Shorten Spaces: Remove extra spaces between words in the inputted string and display the cleaned text.

  • Quit: Exit the program gracefully.

Usage

  1. Clone the repository to your local machine:
  1. Navigate to the repository directory:
  • cd Text-Manipulator
  1. Run the program:
  • python Text-Manipulator.py
  1. Enter a sample text when prompted. Choose an option from the menu by typing the corresponding letter and press Enter. Depending on the chosen option, the program will display the relevant output or perform the specified manipulation on the inputted text.

Example

  1. Input:
  • Hello World!

Output:

You entered: Hello World!

Menu
c - Number of non-whitespace characters
w - Number of words
f - Fix Capitalization
s - Shorten spaces
q - Quit

Choose an option: c
Number of non-Whitespace characters: 12

Menu
c - Number of non-whitespace characters
w - Number of words
f - Fix Capitalization
s - Shorten spaces
q - Quit

Choose an option: w
Number of words: 2

Menu
c - Number of non-whitespace characters
w - Number of words
f - Fix Capitalization
s - Shorten spaces
q - Quit

Choose an option: f
Number of letters capitalized: 2
Edited text: Hello world!

Menu
c - Number of non-whitespace characters
w - Number of words
f - Fix Capitalization
s - Shorten spaces
q - Quit

Choose an option: s
Edited text: Hello world!

Menu
c - Number of non-whitespace characters
w - Number of words
f - Fix Capitalization
s - Shorten spaces
q - Quit

Choose an option: q

Conclusion

The Text Manipulator project showcases my Python programming proficiency in creating a terminal-based application for string manipulation and analysis. By offering a range of options, users can interact with the program to count characters, words, fix capitalization, and clean up spaces within inputted strings. This project demonstrates my ability to design user-friendly interfaces, manipulate strings effectively, and create functional command-line tools using Python.

For any questions or feedback, please feel free to contact me at anfaalmahbub25@gmail.com.