Skip to content

Commit

Permalink
Merge pull request #15 from brave/speedreader-0.8.2
Browse files Browse the repository at this point in the history
Speedreader 0.8.2
  • Loading branch information
rillian authored Jun 22, 2023
2 parents 2b538b7 + 436b4e2 commit cd91a54
Show file tree
Hide file tree
Showing 9 changed files with 687 additions and 28 deletions.
659 changes: 659 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
[package]
name = "kuchiki"
version = "0.8.1"
authors = ["Simon Sapin <simon.sapin@exyr.org>"]
name = "kuchikiki"
version = "0.8.2"
authors = [
"Brave Authors",
"Ralph Giles <rgiles@brave.com>",
"Simon Sapin <simon.sapin@exyr.org>",
]
license = "MIT"
description = "(朽木) HTML/XML tree manipulation library"
repository = "https://github.com/kuchiki-rs/kuchiki"
description = "(口利き) HTML tree manipulation library"
repository = "https://github.com/brave/kuchikiki"
edition = "2018"

[lib]
name = "kuchiki"
name = "kuchikiki"
doctest = false

[dependencies]
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Kuchiki (朽木)
# Kuchikiki (口利き)

HTML tree-manipulation library for Rust.

Upstream has archived their repository, since they've been unable
to maintain the crate. However, the Brave project is still using
a branch, and so will continue to maintain a fork.
[Documentation](https://docs.rs/kuchikiki)

[Documentation](https://docs.rs/kuchiki)
This is a fork of the Kuchiki (朽木) library, which in now unmaintained.
The Brave project is still using a branch, and so will continue to
support this repository. You can use this version by updating the name
in your `Cargo.toml` (add an extra `ki`!) and then remap code references
to the new name, e.g. with

```rust
use kuchikiki as kuchiki
```

See the [Security Policy](SECURITY.md) for information on reporting vulnerabilities.
Empty file removed docs/.nojekyll
Empty file.
3 changes: 0 additions & 3 deletions docs/404.html

This file was deleted.

3 changes: 0 additions & 3 deletions docs/index.html

This file was deleted.

6 changes: 2 additions & 4 deletions examples/find_matches.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
extern crate kuchiki;

use kuchiki::traits::*;
use kuchikiki::traits::TendrilSink;

fn main() {
let html = r"
Expand All @@ -16,7 +14,7 @@ fn main() {
";
let css_selector = ".foo";

let document = kuchiki::parse_html().one(html).document_node;
let document = kuchikiki::parse_html().one(html).document_node;

for css_match in document.select(css_selector).unwrap() {
// css_match is a NodeDataRef, but most of the interesting methods are
Expand Down
6 changes: 2 additions & 4 deletions examples/stack-overflow.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
extern crate kuchiki;

fn main() {
let mut depth = 2;
// 20 M nodes is a few GB of memory.
while depth <= 20_000_000 {
let mut node = kuchiki::NodeRef::new_text("");
let mut node = kuchikiki::NodeRef::new_text("");
for _ in 0..depth {
let parent = kuchiki::NodeRef::new_text("");
let parent = kuchikiki::NodeRef::new_text("");
parent.append(node);
node = parent;
}
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
Kuchiki (朽木), a HTML/XML tree manipulation library for Rust.
Kuchikiki (口利き) is an HTML tree manipulation library for Rust.
*/

Expand Down Expand Up @@ -28,11 +28,11 @@ pub use parser::{parse_fragment, parse_html, parse_html_with_options, ParseOpts,
pub use select::{Selector, Selectors, Specificity};
pub use tree::{Doctype, DocumentData, ElementData, Node, NodeData, NodeRef};

/// This module re-exports a number of traits that are useful when using Kuchiki.
/// This module re-exports a number of traits that are useful when using Kuchikiki.
/// It can be used with:
///
/// ```rust
/// use kuchiki::traits::*;
/// use kuchikiki::traits::*;
/// ```
pub mod traits {
pub use crate::iter::{ElementIterator, NodeIterator};
Expand Down

0 comments on commit cd91a54

Please sign in to comment.