forked from crony/udict
Compare commits
6 Commits
ae75c93921
...
c19da56ab5
Author | SHA1 | Date | |
---|---|---|---|
c19da56ab5 | |||
|
d5601fa866 | ||
720d5121d9 | |||
|
5e522c78e8 | ||
e9ff47bab6 | |||
|
10976e8340 |
12
Makefile
Normal file
12
Makefile
Normal file
@ -0,0 +1,12 @@
|
||||
PREFIX = /usr/local
|
||||
|
||||
make:
|
||||
@echo "usage: make [install|uninstall]"
|
||||
|
||||
install:
|
||||
mkdir -p ${PREFIX}/bin
|
||||
cp -f udict ${PREFIX}/bin
|
||||
chmod 755 ${PREFIX}/bin/udict
|
||||
|
||||
uninstall:
|
||||
rm -f ${PREFIX}/bin/udict
|
@ -6,9 +6,11 @@ Simple script that uses simple dictionary to get the most liked/correct definiti
|
||||
|
||||
```bash
|
||||
$ udict smh
|
||||
meaning, "[shaking my head]", smh is typically used when something is obvious, [plain old stupid], or [disappointment].
|
||||
meaning, "shaking my head", smh is typically used when something is obvious, plain old stupid, or disappointment.
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
just copy the script to your path
|
||||
> as root
|
||||
```bash
|
||||
sudo make install
|
||||
```
|
||||
|
4
udict
4
udict
@ -7,4 +7,6 @@ term="$@"
|
||||
|
||||
term="$(printf '%s\n' "${term}" | sed 's/ /\\/g' )"
|
||||
|
||||
curl -s "https://api.urbandictionary.com/v0/define?term=${term}" | jq -r '.list[0].definition'
|
||||
curl -s "https://api.urbandictionary.com/v0/define?term=${term}" |
|
||||
jq -r '.list[0].definition' |
|
||||
sed 's/\[/\o033[1m/g;s/\]/\o033[0m/g'
|
||||
|
Loading…
Reference in New Issue
Block a user