summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorGreg Hogan <code@greghogan.com>2022-11-07 20:05:38 +0000
committerLudovic Courtès <ludo@gnu.org>2022-12-09 08:46:22 +0100
commit63a483265ae4ac853367f7af070e88f98dcc82ad (patch)
treed8c46d7b465c7c62b7997ec5eb1e8a9d5d484c11 /gnu
parent8c7c571d445b8ca15c7a64218ae418c8b8154bc9 (diff)
gnu: Add htmlq.
* gnu/packages/rust-apps.scm (htmlq): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/rust-apps.scm25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 9c8c1ba4d4..20a1ebd4aa 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -22,6 +22,7 @@
;;; Copyright © 2022 Mathieu Laparie <mlaparie@disr.it>
;;; Copyright © 2022 ( <paren@disroot.org>
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2325,3 +2326,27 @@ let handle = &mut _stdout.lock();")))))))
track of the directories you use most frequently, and uses a ranking algorithm
to navigate to the best match.")
(license license:expat)))
+
+(define-public htmlq
+ (package
+ (name "htmlq")
+ (version "0.4.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "htmlq" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0912cdkz5xji1hzfj1cf42zh1kd860b52xmwwhb7q2jhp6qk25jh"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-clap" ,rust-clap-2)
+ ("rust-html5ever" ,rust-html5ever-0.25)
+ ("rust-kuchiki" ,rust-kuchiki-0.8)
+ ("rust-lazy-static" ,rust-lazy-static-1)
+ ("rust-url" ,rust-url-2))))
+ (home-page "https://github.com/mgdm/htmlq")
+ (synopsis "Like jq, but for HTML")
+ (description "Extract content from HTML files using CSS selectors.")
+ (license license:expat)))