summaryrefslogtreecommitdiffstats
path: root/lass/5pkgs/acronym/default.nix
blob: 53d5d015a6b5a567235c48d5b750bab87bdaef0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
{ pkgs, ... }:

pkgs.writeScriptBin "acronym" ''
  #! ${pkgs.bash}/bin/bash

  acro=$1

  curl -s http://www.acronymfinder.com/$acro.html \
  | grep 'class="result-list__body__rank"' \
  | sed 's/.*title="\([^"]*\)".*/\1/' \
  | sed 's/^.* - //' \
  | sed "s/'/'/g"
''