stockholm/lass/5pkgs/acronym/default.nix

17 lines
285 B
Nix
Raw Normal View History

2016-03-15 13:08:29 +00:00
{ pkgs, ... }:
pkgs.writeScriptBin "acronym" ''
2016-04-13 14:48:32 +00:00
2016-03-15 13:08:29 +00:00
#! ${pkgs.bash}/bin/bash
acro=$1
2017-09-20 16:17:19 +00:00
curl -L -s http://www.acronymfinder.com/$acro.html \
2016-04-13 14:48:32 +00:00
| grep 'class="result-list__body__rank"' \
| sed '
s/.*title="\([^"]*\)".*/\1/
s/^.* - //
s/'/'\'''/g
'
2016-03-15 13:08:29 +00:00
''