A Clojure application designed to shorten SQL table names.
- Download the latest release
- Unzip the release folder, it contains the
tnmin
bash script,tmin.jar
and.abbreviations
- Place them in the same directory somewhere in your
$PATH
- Run it
A quick TLDR:
$ tnmin long_table_name_that_should_become_minified # lng_tbl_nm_tht_shld_bcm_mnfd
$ tnmin short_table_name # short_table_name
$ tnmin pound_remains_special_in_long_names # lb_rmns_spcl_n_lng_nms
$ tnmin pound_is_special # lb_is_special
$ tnmin --max 10 pound_is_special # lb_s_spcl
$ tnmin --max 10 --noabbr pound_is_special # pnd_s_spcl
Ignore the .abbreviations
file when minifying the table name. Words that would normally be substituted for abbreviations are minified like all other words.
Set the maximum length of the table name. Input over this length will be minified. Words that can be substituted for abbreviations are still replaced even if the input is under the specified length.
Print the help screen.
tnmin
ships with an .abbreviations
file that is pre-configured with common word/abbreviation pairs. Users can modify this list as needed. Each pair should be on a seperate line, lines can be commented by putting a #
character in the first column.
For example:
...
geometry,geom
government,govt
# Months
january,jan
february,feb
...
Copyright © 2019 Joshua Radecki
Distributed under the Eclipse Public License.