This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

superconfig / 5pkgs / urban / default.nix
480 B 21 lines
1{ pkgs, ... }: 2 3pkgs.writeScriptBin "urban" '' 4 #!/bin/sh 5 set -euf 6 term=$1 7 curl -LsS 'http://www.urbandictionary.com/define.php?term='"$term" \ 8 | sed 's/<\/\?a\>[^>]*>//g' \ 9 | sed 's/<\([^>]*\)>/\n<\1\n/g' \ 10 | grep . \ 11 | sed -n '/<div class=.meaning./,/<\/div/p' \ 12 | sed 's/<div class=.meaning./-----/' \ 13 | grep -v '^</div\>' \ 14 | grep -v '^<br\>' \ 15 | sed ' 16 s/&quot;/"/g 17 s/&#39;/'\'''/g 18 s/&gt;/>/g 19 s/&lt;/>/g 20 ' 21''