定制 realodix/haiku 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

realodix/haiku

最新稳定版本:v1.13.6

Composer 安装命令:

composer require realodix/haiku

包简介

A tool to manage and maintain Adblock filter lists.

README 文档

README

Ask DeepWiki

Realodix Haiku

Haiku is a powerful command-line tool for managing adblock filter lists efficiently. It automates repetitive tasks such as merging sources, optimizing, and tidying up filter lists effortlessly.

# Features

  1. Fixing: Sorts, combines, normalizes, and optimizes filter rules to produce cleaner and easier-to-maintain filter list.
  2. Lint: Analyzes your filter list to quickly identify potential issues.
  3. Building: Compiles multiple filter list sources (local files and/or remote URLs) into single unified output files, including regenerating headers metadata and removing unnecessary lines such as comments.

Haiku supports multiple adblock syntaxes including Adblock Plus, AdGuard, and uBlock Origin. It uses an incremental caching system to skip unchanged files, enabling efficient processing of large filter lists.

!## BEFORE
[$path=/page.html,domain=b.com|a.com]##.textad
example.com##+js(aopw, Fingerprint2)
-banner-$image,domain=example.org
-banner-$image,domain=example.com
b.com,a.com##.ads

!## AFTER
-banner-$image,domain=example.com|example.org
a.com,b.com##.ads
[$domain=a.com|b.com,path=/page.html]##.textad
example.com##+js(aopw, Fingerprint2)

For a complete list of transformations, see docs/fixer-feature.md.

##.ads
example.com##.ads
example.com##+js(nowolf)
------ ----------------------------------------------------------------------------
Line   filter.txt
------ ----------------------------------------------------------------------------
:2     Redundant filter: 'example.com##.ads' already covered by '##.ads' on line 1.
        ✏️  filter.txt:2
:3     Unknown scriptlet: "nowolf"
        💡 Did you mean "nowoif"?
        ✏️  filter.txt:3

Installation

Install the package via Composer:

composer require realodix/haiku

Composer will install Haiku executable in its bin-dir which defaults to vendor/bin.

Commands

Initialize configuration

Creates a haiku.yml configuration file in your project.

vendor/bin/haiku init

Fixer

vendor/bin/haiku fix

Linter

vendor/bin/haiku lint

Builder

vendor/bin/haiku build

For detailed command usage, available options, and more examples, see docs/usage.md.

Configuration

See configuration file documentation or AdBlockID-src/haiku.yml for a production configuration example.

Contributing

Contributions are welcome! Please:

  1. Fork the repo and create a feature branch.
  2. Add tests for new features.
  3. Ensure code passes composer check.
  4. Submit a PR with a clear description.

Report bugs or suggest features via Issues.

License

This project is licensed under the MIT License.

统计信息

  • 总下载量: 1.46k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固