Giter Site home page Giter Site logo

zone01's Introduction

A Simple Text Completion/Editing/Auto-correction Tool

This Go program processes a text file, applies various transformations based on specified commands, and writes the result to an output file.

Features

  • Punctuation Mark Correction: Corrects spacing around punctuation marks.
  • Word Case Transformation: Supports capitalizing, uppercasing, and lowercasing of words.
  • Numeric Conversion: Converts hexadecimal and binary numbers to decimal.
  • Custom Commands: Supports custom commands like (cap, n) to capitalize the last n words, (up, n) to uppercase the last n words, and (low, n) to lowercase the last n words.

Usage

Input File Format

The input file should contain the text to be processed.

Output File Format

The processed text will be written to the output file.

Command-Line Usage

Replace <inputfile> with the path to the input file and <outputfile> with the desired path for the output file.

Custom Commands

The following custom commands are supported:

  • (cap): Capitalizes the preceding word.
  • (up): Converts the preceding word to uppercase.
  • (low): Converts the preceding word to lowercase.
  • (hex): Converts the preceding hexadecimal number to decimal.
  • (bin): Converts the preceding binary number to decimal.
  • (cap, n): Capitalizes the last n words.
  • (up, n): Uppercases the last n words.
  • (low, n): Lowercases the last n words.

Example

Suppose we have an input file input.txt with the following content:

Running the program with the command:

will produce an output file output.txt with the following content:

Dependencies

  • Go 1.15 or higher

Author

[Abraham Maiko King'oo]

License

This project is licensed under the MIT License.

zone01's People

Contributors

abrakingoo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.