First attempt at replacing the now offline pimp translator. It's not as good as the original yet though.

This commit is contained in:
Storm Dragon 2020-08-14 13:48:54 -04:00
parent ac2786d629
commit 9cdb9b4f6e

32
modules/pimp/pimp.sh Executable file
View File

@ -0,0 +1,32 @@
[ -f functions.sh ] && source functions.sh
shift
chan="$1"
shift
pimp() {
echo -n "$*" | sed \
-r -e "s/(^| )ask( |\?|\.|!)/\1aks\2/gI" \
-e "s/(^| )A /\1Uh $(shuf -e -n1 "god damn" "motha fuckin'") /gI" \
-e "s/(^| )I /\1Ah /gI" \
-e "s/(^| )is /\1be /gI" \
-e "s/(^| )are /\1is /gI" \
-e "s/(^| )(boy|dude|friend|guy|man)( |\?|\.|!)/\1$(shuf -n1 -e "bruh" "bruh-man" "brutha")\3/gI" \
-e "s/(^| )for( |\?|\.|!)/\1fuh\2/gI" \
-e "s/(^| )(appartment|house)( |\?|\.|!)/\1crib\3/gI" \
-e "s/(\w)ing( |\?|\.|!)/\1in'\2/gI" \
-e "s/(^| )my /\1mah /gI" \
-e "s/(^| )people /\1people /gI" \
-e "s/(^| )that( |\?|\.|!)/\1dat\2/gI" \
-e "s/(^| )this( |\?|\.|!)/\1dis\2/gI"
echo " $(shuf -n1 -e \
"Brace yourself foo'!" \
"What 'chew thinking Gee!" \
"and shit!" \
"sho 'nuff! ya'eard!?" \
"nd git Sheniquah's ass back ova' heeah!" \
)"
}
msg "$chan" "$(pimp "$*")"