From 5a615a6cfbb5b57f815ae569cb23bba02151fde3 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Mon, 15 May 2023 10:07:31 -0700 Subject: [PATCH 1/3] Rename crate to kuchikiki MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a continuation under a new name, so we add an extra `ki` to the name. This reduplication can be re-interpreted as 口利き, meaning "eloquent person", after the original kuchiki as 朽木, meaning "rotten wood". Thanks to Linh for the name suggestion! --- Cargo.toml | 14 +++++++++----- README.md | 16 +++++++++++----- examples/find_matches.rs | 6 ++---- examples/stack-overflow.rs | 6 ++---- src/lib.rs | 2 +- 5 files changed, 25 insertions(+), 19 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9e80df7c..2bdac9c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,18 @@ [package] -name = "kuchiki" +name = "kuchikiki" version = "0.8.1" -authors = ["Simon Sapin "] +authors = [ + "Brave Authors", + "Ralph Giles ", + "Simon Sapin ", +] 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] diff --git a/README.md b/README.md index 199ca83c..18121f8e 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/examples/find_matches.rs b/examples/find_matches.rs index b702eb7a..b496d08f 100644 --- a/examples/find_matches.rs +++ b/examples/find_matches.rs @@ -1,6 +1,4 @@ -extern crate kuchiki; - -use kuchiki::traits::*; +use kuchikiki::traits::*; fn main() { let html = r" @@ -16,7 +14,7 @@ fn main() { "; let css_selector = ".foo"; - let document = kuchiki::parse_html().one(html); + let document = kuchikiki::parse_html().one(html); for css_match in document.select(css_selector).unwrap() { // css_match is a NodeDataRef, but most of the interesting methods are diff --git a/examples/stack-overflow.rs b/examples/stack-overflow.rs index 535b702a..a1cca745 100644 --- a/examples/stack-overflow.rs +++ b/examples/stack-overflow.rs @@ -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; } diff --git a/src/lib.rs b/src/lib.rs index 86b7dee4..11f2c4d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,7 +32,7 @@ pub use tree::{Doctype, DocumentData, ElementData, Node, NodeData, NodeRef}; /// It can be used with: /// /// ```rust -/// use kuchiki::traits::*; +/// use kuchikiki::traits::*; /// ``` pub mod traits { pub use crate::iter::{ElementIterator, NodeIterator}; From 4f4fb63bcb65e4ef516d33dabf694b24f1d184f9 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Mon, 15 May 2023 10:10:10 -0700 Subject: [PATCH 2/3] Remove obsolete docs website. docs.rs does a better job of this, and we don't have upstream's legacy github pages site to maintain. Or at least we won't once me publish a release. --- docs/.nojekyll | 0 docs/404.html | 3 --- docs/index.html | 3 --- 3 files changed, 6 deletions(-) delete mode 100644 docs/.nojekyll delete mode 100644 docs/404.html delete mode 100644 docs/index.html diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 9fef9786..00000000 --- a/docs/404.html +++ /dev/null @@ -1,3 +0,0 @@ - - -Moved to docs.rs diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 9fef9786..00000000 --- a/docs/index.html +++ /dev/null @@ -1,3 +0,0 @@ - - -Moved to docs.rs From 7dc262458627517a97eac7f3607a038153881751 Mon Sep 17 00:00:00 2001 From: Ralph Giles Date: Mon, 15 May 2023 10:25:05 -0700 Subject: [PATCH 3/3] Update doc comment for the crate name change --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 11f2c4d2..3e2a62dc 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ /*! -Kuchiki (朽木), a HTML/XML tree manipulation library for Rust. +Kuchikiki (口利き) is an HTML tree manipulation library for Rust. */ @@ -28,7 +28,7 @@ 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