dnnrly / abbreviate Goto Github PK
View Code? Open in Web Editor NEWSupporting your devops by shortening your strings using common abbreviations and clever guesswork
License: Apache License 2.0
Supporting your devops by shortening your strings using common abbreviations and clever guesswork
License: Apache License 2.0
What word do you think needs abbreviating?
Go on, what's too long?
What should it be abbreviated to?
What's better?
Is your feature request related to a problem? Please describe.
The current list of abbreviations is OK but l feel a little lacking.
Describe the solution you'd like
Is your feature request related to a problem? Please describe.
The English language has a lot of short connector words which have a grammatical function but don't necessarily provide meaning. Thus they can be omitted when creating abbreviations.
Describe the solution you'd like
A simple solution would be to save a list of stopwords and to have a flag that the user could use to remove them.
Here is an example:
$ abbreviate snake "The strategy of limited science" --stopwords tstg_ltd_sci
versus the current behavior (so without the flag):
$ abbreviate snake "The strategy of limited science" --stopwords the_stg_of_ltd_sci
Additional context
Initially we could curate our own list of stopwords. Eventually we could use this as a possible source:
https://github.com/bbalet/stopwords
Is your feature request related to a problem? Please describe.
Creating a pull request does not check whether the change has broken current working test cases. Although it is encouraged to run all the tests before someone submits a PR but being double sure is good.
Describe the solution you'd like
Add a github workflow that will trigger all the tests to run when someone raises a PR.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
At the moment, the PR build action doesn't provide all of the features that I would expect. It would be nice if this repo could follow some of the later best practices.
Describe the solution you'd like
Perhaps using wait-for as an example, update the PR workflow action to include (and not limited to):
What word do you think needs abbreviating?
We should add support for abbreviating using title casing.
Title Case:
What should it be abbreviated to?
Usage example:
$ abbreviate title prestrategy-limitedment
Prstg Ltdmnt
What's better?
NA
Is your feature request related to a problem? Please describe.
At the moment camel, pascal and snake cases are available. Kebab case is another popular ways to combine strings and abbreviate doesn't provide this option.
Describe the solution you'd like
It would be nice to have also the kebab
command available that can be used to abbreviate a string and convert it to kebab case.
Example
$ abbreviate kebab StrategyLimited
stg-ltd
Is your feature request related to a problem? Please describe.
Related to #13
Describe the solution you'd like
Add list of common prefixes and suffixes and their abbreviations (e.g. -ible -> bl)
When predefined word does not exist, attempt to remove common prefix or suffix (e.g. in-access-ible -> access-ible)
Look up remaining word again
Repeat prefix/suffix removal as many times as necessary (e.g. access-ible -> access)
Concatenate prefix abbreviation, word abbreviation, and suffix abbreviation (e.g. in-access-ible -> in-acc-bl)
cc @FungusHumungus
Is your feature request related to a problem? Please describe.
At the moment, we have to include non-go dependencies to run acceptance tests. This is bash based and tricky to get right. We could achieve just as much with godog, without having to switch to another language. And go has more testing features/libraries available.
Describe the solution you'd like
BATS acceptance tests replaced with Godog ones.
Is your feature request related to a problem? Please describe.
At the moment, there is a defined list of abbreviations that are looked up. Where an abbreviation isn't present, it just won't be abbreviated.
Describe the solution you'd like
It would be good if the tool could attempt to shorten words taht it doesn't already know about.
A couple of different strategies we could explore:
Additional context
How would this work with other languages?
Is your feature request related to a problem? Please describe.
At the moment, the algorithm used starts from the last 'word' in the string and works backwards. This makes an assumption about how the string should be shortened that may not work for everyone.
A good option might be to shorten from the front instead.
Describe the solution you'd like
$ abbreviate --length 15 strategy-limited
strategy-ltd
$ abbreviate --from-front --length 15 strategy-limited
stg-limited
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.