This project is a text processing tool written in Go that reads text from an input file, applies several transformations, and writes the processed result to an output file.
The program follows good coding practices and performs multiple formatting operations on text.
(up)→ Converts the previous word to uppercase(low)→ Converts the previous word to lowercase(cap)→ Capitalizes the previous word(up, n)→ Converts the previousnwords to uppercase(low, n)→ Converts the previousnwords to lowercase(cap, n)→ Capitalizes the previousnwords
(hex)→ Converts the hexadecimal number before the tag into decimal(bin)→ Converts the binary number before the tag into decimal
-
Removes unnecessary spaces before punctuation marks:
, . ! ? : ;
-
Keeps grouped punctuation like:
...
- Removes spaces inside quotation marks
' '
Example:'I am happy'
-
Automatically converts:
-
a→anwhen the next word starts with a vowel or the letterh
## Project Structure
project-root/
│── main.go
│── README.md
git clone <repository-url>
cd project-folder
Usage
Run the program using:
go run . input.txt output.txt
### Example
echo "Ready, set, go (up) !" > sample.txt
go run . sample.txt result.txt
cat result.txt
Testing
Run tests (if any):
go test ./...
Requirements
Go 1.18 or higher
Author
Onoja Monday Ojonugba