Topic: crunchy-translator is here!

this is a short script that I dreamed up as a short exercise in shell scripting.

put these both into your /usr/bin directory. make sure to make them executable

there is a know bug. when you have to unencrypt something it will put a "n" at the beginning and a "j" at the end.

to encrypt a file type into your terminal

'crunchy-translator -e (full path to file here)'

to unencrypt something type into your terminal

'crunchy-translator -u (full path to file here)'

note that this does not make any changes to the file selected

please report any other know bugs!

name the following "crunchy-translator"

################################################################################
## This is a script created by Crunchy/Jared
## This script was created to decifer a language created by Crunchy/Jared
## please enjoy!
## name this script: "crunchy-translator"
## put this script into your /usr/bin directory
################################################################################

#!/bin/bash
##help
##===============================================================================
if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    echo "Usage:"
    echo "  -i, --info              information"
    echo "  -h, --help              show this message and exit"
    echo "  -e, --encrypt           encrypt"
    echo "  -u, --unencrypt         unencrypt a text file that has been encrypted"
    echo ""
    echo "   to encrypt something type 'crunchy-translator -e (full path to file here)'"
    echo "   to unencrypt something type 'crunchy-translator -u (full path to file here)'"
    echo ""
fi

##information
##===============================================================================
if [ "$1" = "-i" ] || [ "$1" = "--info" ]; then
   echo ""
   echo "This is a script created by Crunchy/Jared"
   echo "This script was created to decifer a language created by Crunchy/Jared"
   echo "name this script: 'crunchy-translator' no caps"
   echo "put this script into your /usr/bin directory"
   echo "run 'crunchy-translator' to start the script"
   echo ""

fi

##encyriptor
##===============================================================================
if [ "$1" = "-e" ] || [ "$1" = "--encrypt" ]; then

echo ""
sleep 1s
sed -e 's/a/`/g' -e 's/b/~/g' -e 's/c/1/g' -e 's/d/!/g' -e 's/e/2/g' -e 's/f/@/g' -e 's/g/3/g' -e 's/h/#/g' -e 's/i/4/g' -e 's/j/$/g' -e 's/k/5/g' -e 's/l/%/g' -e 's/m/6/g' -e 's/n/^/g' -e 's/o/7/g' -e 's/p/&/g' -e 's/q/8/g' -e 's/r/*/g' -e 's/s/9/g' -e 's/t/(/g' -e 's/u/0/g' -e 's/v/)/g' -e 's/w/-/g' -e 's/x/=/g' -e 's/y/+/g' -e 's/z/|/g' -e 's/\ /_/g' $2
##sed  -e 's/\ /\n/' -e 's/a/oo/' -e 's/b/s/' -e 's/c/c/' -e 's/d/oui/' -e 's/e/ne/' -e 's/f/ye/' -e 's/g/e/' -e 's/h/ee/' -e 's/i/j/' -e 's/j/m/' -e 's/k/l/' -e 's/l/o/' -e 's/m/rr/' -e 's/n/a/' -e 's/o/p/' -e 's/p/v/' -e 's/q/x/' -e 's/r/r/' -e 's/s/t/' -e 's/t/wa/' -e 's/u/`a/' -e 's/v/qua/' -e 's/w/ka/' -e 's/x/y/' -e 's/y/x/' -e 's/z/ze/' -e 's/\n/\ /' $2
##sed -e 's/\ /\n/g' $2
sleep 1s
echo ""
fi

##unencryptor
##==============================================================================
if [ "$1" = "-u"  ] || [ "$1" = "--unencrypt"  ]; then

echo ""
sleep 1s
sed -e 's/`/a/g' -e 's/~/b/g' -e 's/1/c/g' -e 's/!/d/g' -e 's/2/e/g' -e 's/@/f/g' -e 's/3/g/g' -e 's/#/h/g' -e 's/4/i/g' -e 's/$/j/g' -e 's/5/k/g' -e 's/%/l/g' -e 's/6/m/g' -e 's/^/n/g' -e 's/7/o/g' -e 's/&/p/g' -e 's/8/q/g' -e 's/*/r/g' -e 's/9/s/g' -e 's/(/t/g' -e 's/0/u/g' -e 's/)/v/g' -e 's/-/w/g' -e 's/=/x/g' -e 's/+/y/g' -e 's/|/z/g' -e 's/_/\ /g' $2
sleep 1s
echo ""
fi

##end of script

---------------------------


put the following into your /usr/bin directory too press A-f2 then type in "crunchy-translator run" to run it

##==============================================================================
##a script to run crunchy translator
##please run "crunchy-translator -i" for more info
##==============================================================================
#!/bin/bash

    exec terminator --command="crunchy-translator -h"
    exit

name the first "crunchy translator"

please post any questions or comments!

this is my first attempt at any type of runnable program like this if you have any improvements please post

enjoy! big_smile

registered Linux user: #533379
registered #! user: #6769
Whenever someone calls me a computer 'nerd' or a 'Unix-based-system'
all I can think is: You just wait. In a couple of years. I'll be your IT. Then where will you be!

Re: crunchy-translator is here!

Nice workaround with the sed commands---No duplicate letters means no problem un-encrypting! smile

Although, I don't think you need the second script...you could just open a terminator window and run crunchy-translator. Even bind that command in the second strip straight to a key or in the menu would work.

Leave the gun. Take the cannoli.

Re: crunchy-translator is here!

Hi folks,

try: www.goosh.org

It brings the command line back to GOOGLE. To translate "nevertheless" from English to German, hack this:

   guest@goosh.org:/web> translate en de nevertheless
   translating "nevertheless" from english to german:

"dennoch"

Easy?

Have a nice day #!

Regards

Last edited by hochrappenkopf (2011-03-08 07:58:23)

"If you can dream it, you can do it!" [Walt Disney]