File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ PRONOUNCE_VERSION=" 1.1.0"
4+
35echo -e " \e[0;32m"
46echo " The pronounce: Frontend for English Words Pronunciation"
57echo " Copyright © 2013 Behnam Momeni"
@@ -73,7 +75,22 @@ function run_external_program {
7375
7476}
7577
76- if [ " a$2 " = " a" ]; then
78+ if [ " $1 " = " -h" ]; then
79+ echo -e " Usage: \e[1;33m"
80+ echo -e " \t<word> Plays 1st pronunciation of <word>"
81+ echo -e " \t<word> <num> Plays <num>-th pronunciation of <word>"
82+ echo -e " \t<word> f Opens definition page of <word> in Mozilla Firefox"
83+ echo -e " \t<word> w Opens definition page of <word> in w3m command line browser"
84+ echo -e " \t-c Purges the local audio files cache (rm -f)"
85+ echo -e " \t-v Prints version"
86+ echo -e " \t-h Prints this message"
87+ echo -e " \e[0m"
88+ elif [ " $1 " = " -c" ]; then
89+ echo " Purging the cache"
90+ rm -f ~ /pronunciation.wavs/*
91+ elif [ " $1 " = " -v" ]; then
92+ echo " Version: $PRONOUNCE_VERSION "
93+ elif [ " a$2 " = " a" ]; then
7794 main $1 1
7895elif [ " $2 " = " f" ]; then
7996 run_external_program firefox " http://www.merriam-webster.com/dictionary/$1 #headword"
You can’t perform that action at this time.
0 commit comments