mirror of
https://github.com/nushell/nushell.git
synced 2024-11-24 17:34:00 +01:00
4fe0f860a8
# Description This PR adds a new subcommand `query webpage-info` to `plugin_nu_query`. The subcommand is a basic wrapper for the [`webpage`](https://crates.io/crates/webpage) crate. Usage: ``` http get https://phoronix.com | query webpage-info ``` and it returns a `Record` version of [`webpage::HTML`](https://docs.rs/webpage/latest/webpage/struct.HTML.html). The PR also takes a shot at bringing @lily-mara 's [nu-serde::to_value](https://github.com/nushell/nushell/pull/3878/files) back to life, updating it for the latest version of nushell. That's not the main focus of the PR though - I just didn't want to have to implement a custom converter for `webpage::HTML` 😅. If it looks reasonable we could move it to `nu_protocol`(?) either in this PR or a future one (along with adding tests for it). # User-Facing Changes no breaking changes
29 lines
726 B
TOML
29 lines
726 B
TOML
[package]
|
|
authors = ["The Nushell Project Developers"]
|
|
description = "A Nushell plugin to query JSON, XML, and various web data"
|
|
repository = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_query"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
name = "nu_plugin_query"
|
|
version = "0.95.1"
|
|
|
|
[lib]
|
|
doctest = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "nu_plugin_query"
|
|
bench = false
|
|
|
|
[dependencies]
|
|
nu-plugin = { path = "../nu-plugin", version = "0.95.1" }
|
|
nu-protocol = { path = "../nu-protocol", version = "0.95.1" }
|
|
|
|
gjson = "0.8"
|
|
scraper = { default-features = false, version = "0.19" }
|
|
sxd-document = "0.3"
|
|
sxd-xpath = "0.4"
|
|
webpage = { version = "2.0.1", features = ["serde"] }
|
|
serde_json.workspace = true
|
|
serde.workspace = true
|