1 { lib, buildNpmPackage, fetchFromGitHub, runCommand, hred, jq }:
7 src = fetchFromGitHub {
11 hash = "sha256-rnobJG9Z1lXEeFm+c0f9OsbiTzxeP3+zut5LYpGzWfc=";
14 npmDepsHash = "sha256-POxlGWK0TJMwNWDpiK5+OXLGtAx4lFJO3imoe/h+7Sc=";
19 simple = runCommand "${pname}-test" {} ''
21 echo '<i id="foo">bar</i>' | ${hred}/bin/hred 'i#foo { @id => id, @.textContent => text }' -c | ${jq}/bin/jq -c > $out
22 [ "$(cat $out)" = '{"id":"foo","text":"bar"}' ]
27 description = "A command-line tool to extract data from HTML";
29 license = lib.licenses.mit;
30 homepage = "https://github.com/danburzo/hred";
31 maintainers = with lib.maintainers; [ tejing ];