Hoa Kỳyshavit/mdq
like jq but for Markdown: find specific elements in a md doc
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository của tuần
#2 Repository của tuần
#3 Repository của tuần
🔍 mdq: jq cho Markdown
Truy vấn tài liệu Markdown như JSON với jq — đơn giản, trực quan, hiệu quả.
mdq là một công cụ dòng lệnh (CLI) viết bằng Rust, mang lại khả năng "tìm kiếm và trích xuất" các phần tử cụ thể trong tài liệu Markdown, tương tự như cách jq làm với JSON. Thay vì phải dùng các biểu thức regex phức tạp và khó debug, mdq cung cấp một cú pháp filter trực quan, lấy cảm hứng từ chính cú pháp Markdown.
✨ Điểm nổi bật
- Cú pháp filter tương tự Markdown: chọn sections bằng
#, lists bằng-hoặc1., links bằng[text](url), images bằng, blockquotes bằng>, code blocks bằng```, tables bằng:-:... - Hỗ trợ nhiều loại phần tử: bao gồm sections, lists (ordered/unordered, tasks checklist), links, images, block quotes, code blocks, raw HTML, paragraphs, tables, và front matter.
- Lọc linh hoạt: dùng chuỗi không đặt trong dấu ngoặc (không phân biệt hoa/thường), chuỗi trong dấu ngoặc (phân biệt hoa/thường), anchor (
^/$), hoặc regex. - Nối filter bằng pipe
|: kết hợp nhiều điều kiện để truy vấn phức tạp, ví dụ: tìm sections chứa "usage" rồi trong đó chọn các list items. - Dễ dàng cài đặt: có sẵn trên Homebrew, Docker, binary release, hoặc cài bằng
cargo install(yêu cầu Rust >= 1.85.1). - Playground trực tiếp trên trình duyệt: có thể thử nghiệm mdq ngay tại https://yshavit.github.io/mdq-playground mà không cần cài đặt.
💡 Vì sao值得关注
mdq solves a real pain point: extracting structured information from Markdown documents without writing brittle regexes. Its filter syntax mirrors Markdown itself, lowering the barrier to entry for developers and non-developers alike. Whether you're enforcing PR templates, auditing documentation, or building documentation tooling, mdq turns ad-hoc queries into composable pipelines. Built in Rust, it offers strong performance and safety guarantees, while its Apache 2.0/MIT licensing makes it flexible for both open-source and commercial use.
#jq #Markdown #CLI #Rust #TiniX
Dự án tương tự
Khám phá các dự án và mô hình AI khác có sự tương đồng.
A terminal markdown viewer. Browse a document by its outline in the TUI, or query its sections from the CLI with a jq-like language.
Firecrawl is the knowledge infrastructure to make your agents smarter. It connects your agents to the web, and to Alexandria, our library of everything else.
Python tool for converting files and office documents to Markdown.
Fast Rust library for PDF inspection, classification, and text extraction. Intelligently detects scanned vs text-based PDFs to enable smart routing decisions.
A fast static site generator in a single binary with everything built-in. https://www.getzola.org