Skip to content

Onoja217/go-reloaded

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Processor Project (Go)

Project Description

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.


Features

Case Transformations

  • (up) → Converts the previous word to uppercase
  • (low) → Converts the previous word to lowercase
  • (cap) → Capitalizes the previous word
  • (up, n) → Converts the previous n words to uppercase
  • (low, n) → Converts the previous n words to lowercase
  • (cap, n) → Capitalizes the previous n words

Number Conversions

  • (hex) → Converts the hexadecimal number before the tag into decimal
  • (bin) → Converts the binary number before the tag into decimal

Punctuation Formatting

  • Removes unnecessary spaces before punctuation marks:

    • , . ! ? : ;
  • Keeps grouped punctuation like:

    • ...

Quote Formatting

  • Removes spaces inside quotation marks ' '

Example:'I am happy'


Article Correction

  • Automatically converts:

  • aan when the next word starts with a vowel or the letter h


## Project Structure
project-root/
│── main.go
│── README.md

This project is designed to be a single-file Go program.


Installation

Clone the Repository

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages