1
Fork 0

Rewrite readme, add license header, move to Gitea.

This commit is contained in:
Bauke 2022-09-23 17:40:30 +02:00
parent 9aab3f5132
commit 527a61f0ec
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
3 changed files with 51 additions and 15 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "select-html"
description = "A command-line tool to extract HTML using CSS selectors"
repository = "https://github.com/Bauke/select-html"
description = "Extract HTML using CSS selectors in the command-line."
repository = "https://git.bauke.xyz/Bauke/select-html"
license = "AGPL-3.0-or-later"
version = "0.1.0"
authors = ["Bauke <me@bauke.xyz>"]

View File

@ -1,8 +1,28 @@
# select-html
# Select 👁️ HTML
> A command-line tool to extract HTML using CSS selectors.
> **Extract HTML using CSS selectors in the command-line.**
*AGPL-3.0-or-later*
## Features
* Input HTML using stdin or a file.
* Output full elements, inner text or attribute values.
* Trim excess whitespace from output.
## Installation
### Cargo
With a working [Rust and Cargo](https://www.rust-lang.org/learn/get-started) installation, you can install `select-html` from [Crates.io](https://crates.io/crates/select-html).
```
cargo install select-html
```
### Binaries
Precompiled `x86_64-unknown-linux-gnu` binaries are available on the [Releases page](https://git.bauke.xyz/Bauke/select-html/releases).
## Examples
```sh
# Use stdin to pipe HTML to select-html.
@ -21,14 +41,7 @@ select-html '.example' --text
select-html '[property^="og:"]' -a 'property' -a 'content'
```
## Installation
You can download a precompiled executable from the [GitHub Releases] page, or install via [crates.io] (`cargo install select-html`).
[GitHub Releases]: https://github.com/Bauke/select-html/releases
[crates.io]: https://crates.io/crates/select-html
## `--help`
## Usage
```
USAGE:
@ -46,3 +59,11 @@ OPTIONS:
--trim Trim whitespace from selected items
-V, --version Print version information
```
## Feedback
Found a problem or want to request a new feature? Email [me@bauke.xyz](mailto:me@bauke.xyz) and I'll see what I can do for you.
## License
Distributed under the [AGPL-3.0-or-later](https://spdx.org/licenses/AGPL-3.0-or-later.html) license, see [LICENSE](https://git.bauke.xyz/Bauke/select-html/src/branch/main/LICENSE) for more information.

View File

@ -1,6 +1,21 @@
//! # select-html
// Copyright (C) 2022 Bauke <me@bauke.xyz>
//
// This program is free software: you can redistribute it and/or modify it under
// the terms of the GNU Affero General Public License as published by the Free
// Software Foundation, either version 3 of the License, or (at your option) any
// later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
// details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! # Select 👁️ HTML
//!
//! > A command-line tool to extract HTML using CSS selectors
//! > **Extract HTML using CSS selectors in the command-line.**
#![forbid(unsafe_code)]
#![warn(missing_docs, clippy::missing_docs_in_private_items)]