1
0
forked from crony/udict

Compare commits

...

6 Commits

Author SHA1 Message Date
c19da56ab5 Merge pull request 'added makefile!' (#3) from TlasT/udict:makefile into main
Reviewed-on: crony/udict#3
2023-06-11 07:52:21 +00:00
Raymaekers Luca
d5601fa866 updated readme 2023-06-10 20:53:42 +02:00
720d5121d9 Merge branch 'main' into makefile 2023-06-10 18:51:58 +00:00
Raymaekers Luca
5e522c78e8 added makefile! 2023-06-10 20:51:26 +02:00
e9ff47bab6 Merge pull request 'words between brackets are bold.' (#1) from TlasT/udict:bold into main
Reviewed-on: crony/udict#1
I will allow this
2023-06-08 18:55:46 +00:00
Raymaekers Luca
10976e8340 words between brackets are bold. 2023-06-08 20:32:39 +02:00
3 changed files with 20 additions and 4 deletions

12
Makefile Normal file
View 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

View File

@ -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
View File

@ -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'