{"id":46133929,"url":"https://github.com/theroyalwhee0/brik","last_synced_at":"2026-03-02T04:34:04.073Z","repository":{"id":320630997,"uuid":"1080710598","full_name":"theroyalwhee0/brik","owner":"theroyalwhee0","description":"Brik HTML Parser","archived":false,"fork":false,"pushed_at":"2025-11-11T20:25:39.000Z","size":494,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-11T21:22:58.734Z","etag":null,"topics":["css-selectors","dom","html-parser","rust","web-scraping"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/brik","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theroyalwhee0.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-21T18:55:28.000Z","updated_at":"2025-11-11T20:24:19.000Z","dependencies_parsed_at":"2025-10-24T23:12:40.057Z","dependency_job_id":"5a788e54-7f11-42a2-8263-158808736c01","html_url":"https://github.com/theroyalwhee0/brik","commit_stats":null,"previous_names":["theroyalwhee0/brik"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/theroyalwhee0/brik","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theroyalwhee0%2Fbrik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theroyalwhee0%2Fbrik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theroyalwhee0%2Fbrik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theroyalwhee0%2Fbrik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theroyalwhee0","download_url":"https://codeload.github.com/theroyalwhee0/brik/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theroyalwhee0%2Fbrik/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29992326,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css-selectors","dom","html-parser","rust","web-scraping"],"created_at":"2026-03-02T04:34:03.554Z","updated_at":"2026-03-02T04:34:04.065Z","avatar_url":"https://github.com/theroyalwhee0.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brik\n\n[![Documentation](https://docs.rs/brik/badge.svg)](https://docs.rs/brik)\n[![Crates.io](https://img.shields.io/crates/v/brik.svg)](https://crates.io/crates/brik)\n[![License](https://img.shields.io/crates/l/brik.svg)](https://github.com/theroyalwhee0/brik/blob/main/LICENSE)\n\nA Rust library for parsing, manipulating, and querying HTML documents using CSS selectors.\n\n## About\n\nThis is a fork of [Kuchiki (朽木)](https://github.com/kuchiki-rs/kuchiki) by way of Brave's [Kuchikiki fork](https://github.com/brave/kuchikiki). The original Kuchiki is now unmaintained.\n\n**Brik** is a building block for HTML manipulation - simple, solid, and stackable.\n\nThis fork maintains compatibility with current servo crates (html5ever, selectors, etc.) and provides ongoing updates. See the [Changelog](CHANGELOG.md) for version history and updates.\n\n## Features\n\n- ✨ **Full HTML5 parsing** via [html5ever](https://github.com/servo/html5ever)\n- 🎯 **CSS selector queries** via [selectors](https://github.com/servo/stylo/tree/main/selectors)\n- 🌳 **Tree manipulation** - append, prepend, insert, detach nodes\n- 🔍 **Node inspection** - traverse ancestors, siblings, descendants\n- 📝 **Serialization** - convert trees back to HTML\n- 🔖 **Namespace support** - optional XML/SVG namespace handling (not enabled by default)\n- 🛡️ **Optional safe mode** - build without unsafe code\n\n## Installation\n\n\u003e ⚠️ **Status: Alpha** - Passes all tests but not yet recommended for production use.\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nbrik = \"0.10.0\"\n```\n\n### Migrating from Kuchiki or Kuchikiki\n\nThis migration applies to both Kuchiki and Kuchikiki.\n\n```toml\n[dependencies]\nbrik = \"0.10.0\"  # Changed from \"kuchiki\" or \"kuchikiki\"\n```\n\nUpdate your code:\n\n```rust\nuse brik::parse_html;  // Changed from kuchiki or kuchikiki\nuse brik::traits::*;\n```\n\n## Quick Start\n\n```rust\nuse brik::parse_html;\nuse brik::traits::*;\n\n// Parse HTML and query with CSS selectors\nlet document = parse_html().one(\"\u003cp class='greeting'\u003eHello, world!\u003c/p\u003e\");\nlet greeting = document.select_first(\".greeting\").unwrap();\nprintln!(\"{}\", greeting.text_contents());\n```\n\nFor more detailed examples, see the [examples](examples/) directory.\n\n## Feature Flags\n\n### Safe Mode\n\nBy default, brik uses unsafe code for performance. To build without any unsafe blocks:\n\n```toml\n[dependencies]\nbrik = { version = \"0.10.0\", features = [\"safe\"] }\n```\n\nOr via command line:\n\n```bash\ncargo build --features safe\ncargo test --features safe\n```\n\n**Note:** This only affects brik's code, not its dependencies.\n\n### Namespace Support\n\nXML/SVG namespace support is available via the `namespaces` feature:\n\n```toml\n[dependencies]\nbrik = { version = \"0.10.0\", features = [\"namespaces\"] }\n```\n\nThis enables:\n\n- Namespace-aware CSS selectors (e.g., `svg|rect`, `[xlink|href]`)\n- Element namespace inspection methods (`namespace_uri()`, `prefix()`)\n- Namespace-aware attribute methods (`get_ns()`, `insert_ns()`, etc.)\n- Filtering elements by namespace\n\nOr via command line:\n\n```bash\ncargo build --features namespaces\ncargo test --features namespaces\ncargo run --example namespaces --features namespaces\n```\n\n**Note:** HTML-only users can omit this feature to reduce binary size.\n\n## Documentation\n\nFull API documentation is available at [docs.rs/brik](https://docs.rs/brik).\n\n## Examples\n\nRun examples with:\n\n```bash\ncargo run --example quickstart\ncargo run --example find_matches\n```\n\nSee the [examples](examples/) directory for all available examples.\n\n## Security\n\nSee the [Security Policy](SECURITY.md) for information on reporting vulnerabilities.\n\n## Credits\n\nThis project builds on the work of:\n\n- **Original Kuchiki library**: [kuchiki-rs/kuchiki](https://github.com/kuchiki-rs/kuchiki) by Simon Sapin\n- **Brave fork**: [brave/kuchikiki](https://github.com/brave/kuchikiki) maintained by the Brave Authors and Ralph Giles\n\n**Brik** is maintained by Adam Mill ([@theroyalwhee0](https://github.com/theroyalwhee0))\n\n## Contributing\n\nContributions are welcome! Please see our [Contributing Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) before submitting a Pull Request.\n\n## License\n\nLicensed under the MIT license. See [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheroyalwhee0%2Fbrik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheroyalwhee0%2Fbrik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheroyalwhee0%2Fbrik/lists"}