[PATCH 0/2] Add htmlq.

  • Done
  • quality assurance status badge
Details
2 participants
  • Greg Hogan
  • Ludovic Courtès
Owner
unassigned
Submitted by
Greg Hogan
Severity
normal
G
G
Greg Hogan wrote on 7 Nov 2022 21:04
(address . guix-patches@gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
cover.1667851396.git.code@greghogan.com
Greg Hogan (2):
gnu: Add rust-kuchiki-0.8.
gnu: Add htmlq.

gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++
gnu/packages/rust-apps.scm | 25 +++++++++++++++++++++++++
2 files changed, 51 insertions(+)

--
2.38.0
G
G
Greg Hogan wrote on 7 Nov 2022 21:05
[PATCH 1/2] gnu: Add rust-kuchiki-0.8.
(address . 59111@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
70d6add66e24f38e65606b5e004ded902a0e465e.1667851396.git.code@greghogan.com
* gnu/packages/crates-io.scm (rust-kuchiki-0.8): New variable.
---
gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 1118ebbc35..f6939790b9 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2022 Evgenii Lepikhin <e.lepikhin@corp.mail.ru>
;;; Copyright © 2022 Gabriel Arazas <foo.dogsquared@gmail.com>
;;; Copyright © 2022 ( <paren@disroot.org>
+;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25955,6 +25956,31 @@ (define-public rust-hts-sys-2
(description "This library provides Rust bindings to HTSlib.")
(license license:expat)))
+(define-public rust-kuchiki-0.8
+ (package
+ (name "rust-kuchiki")
+ (version "0.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "kuchiki" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0n53hhscgf4az58nnbjfxlqz9k96h3f02c7fhbzpqdriw33fka0y"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:skip-build? #t
+ #:cargo-inputs
+ (("rust-cssparser" ,rust-cssparser-0.27)
+ ("rust-html5ever" ,rust-html5ever-0.25)
+ ("rust-matches" ,rust-matches-0.1)
+ ("rust-selectors" ,rust-selectors-0.22))))
+ (home-page "https://github.com/SimonSapin/kuchiki")
+ (synopsis "HTML/XML tree manipulation library")
+ (description "A library for parsing and serializing HTML and XML documents
+and traversing, manipulating, and querying the document tree.")
+ (license license:expat)))
+
(define-public rust-http-0.2
(package
(name "rust-http")
--
2.38.0
G
G
Greg Hogan wrote on 7 Nov 2022 21:05
[PATCH 2/2] gnu: Add htmlq.
(address . 59111@debbugs.gnu.org)(name . Greg Hogan)(address . code@greghogan.com)
41ca4e09bc7e9d131d53bdd166f2e4c5e3d14915.1667851396.git.code@greghogan.com
* gnu/packages/rust-apps.scm (htmlq): New variable.
---
gnu/packages/rust-apps.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 693489264d..b7c3e67ee6 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2022 Gabriel Arazas <foo.dogsquared@gmail.com>
;;; Copyright © 2022 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2022 Mathieu Laparie <mlaparie@disr.it>
+;;; Copyright © 2022 Greg Hogan <code@greghogan.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2062,3 +2063,27 @@ (define-public zoxide
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)))
--
2.38.0
L
L
Ludovic Courtès wrote on 8 Dec 2022 22:58
Re: bug#59111: [PATCH 0/2] Add htmlq.
(name . Greg Hogan)(address . code@greghogan.com)(address . 59111-done@debbugs.gnu.org)
87mt7xblsi.fsf@gnu.org
Hi,

Greg Hogan <code@greghogan.com> skribis:

Toggle quote (3 lines)
> gnu: Add rust-kuchiki-0.8.
> gnu: Add htmlq.

Applied, thanks!

Ludo’.
Closed
?