Giter VIP home page Giter VIP logo

abbreviate's Introduction

abbreviate

Shorten your strings using common abbreviations.

build status codecov godoc report card

Motivation

This tool comes out of a frustration of the name of resources (in my specific case, AWS stack names) being too long. Wouldn't it be nice if we could have a tool that would be able to suggest shorter alternatives if your original name is too long.

Installation

go get github.com/dnnrly/abbreviate
make build

Usage

This tool will attempt to shorten the string provided using common abbreviations
specified by language and 'set'.

Word boundaries will detect camel case and non-letter

Usage:
  abbreviate [string] [flags]

Flags:
  -c, --custom string     Custom abbreviation set
  -h, --help              help for abbreviate
  -l, --language string   Language to select (default "en-us")
      --list              List all abbreviate sets by language
  -m, --max int           Maximum length of string, keep on abbreviating while the string is longer than this limit
  -n, --newline           Add newline to the end of the string (default true)
  -s, --set string        Abbreviation set (default "common")

Examples:

$ abbreviate strategy-limited
stg-ltd

$ abbreviate strategy-limited --max 11
strategy-ltd

Code of Conduct

This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code.

Contributing

Pull requests are welcome. See the contributing guide for more details.

Please make sure to update tests as appropriate.

License

Apache 2

abbreviate's People

Contributors

dnnrly avatar milesmcc avatar scottyeck avatar

Watchers

 avatar  avatar  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.