No description
Find a file
Alexandre Silva b1c6cb6c2f
Some checks failed
CI / build (3.10) (push) Has been cancelled
CI / build (3.11) (push) Has been cancelled
CI / build (3.12) (push) Has been cancelled
chore: add LICENSE gplv3
2026-02-20 22:15:08 +00:00
.github/workflows Initial commit: project structure and setup 2025-10-23 00:03:48 +01:00
context/shared/plans feat: implement visitor-based list and search traversal 2026-02-20 22:05:27 +00:00
diq refactor: return parsed frontmatter as dict 2026-02-20 22:05:32 +00:00
tests chore: remove empty placeholder test files 2026-02-20 22:05:45 +00:00
.gitignore Initial commit: project structure and setup 2025-10-23 00:03:48 +01:00
AGENTS.md ai: add note about the "cd some/path/prject/root && ..." 2025-10-29 22:49:13 +00:00
DESIGN.md Initial commit: project structure and setup 2025-10-23 00:03:48 +01:00
LICENSE chore: add LICENSE gplv3 2026-02-20 22:15:08 +00:00
pyproject.toml docs: update README usage and tooling config 2026-02-20 22:05:41 +00:00
README.md docs: update README usage and tooling config 2026-02-20 22:05:41 +00:00
uv.lock docs: update README usage and tooling config 2026-02-20 22:05:41 +00:00

DIQ (Document Indexer and Querier)

diq is a CLI tool for searching, indexing, and querying metadata within documents, based on the specification in DESIGN.md.

Current Status

This project is in the initial setup phase. The repository structure and basic tooling have been configured.

Development Notes

  • DAL Parsing: For the initial implementation, we will use regular expressions for parsing the DIQ Annotation Language (DAL). The use of a more robust parsing library like lark is deferred to a future date.
  • Database: The index database will be managed with direct SQL queries using Python's built-in sqlite3 module. An ORM like SQLAlchemy is not being used at this stage.

Setup

To set up the development environment:

# Create a virtual environment & install dependencies
uv sync

# Activate the virtual environment
source .venv/bin/activate

Code Quality

To ensure code quality, run the following checks before committing:

# Lint and format the code
uv run ruff check . --fix
uv run ruff format .

# Run static type checking
uv run mypy .

Usage

Parse YAML frontmatter from a Markdown file and output JSON:

uv run diq frontmatter tests/data/frontmatter/test1.md

List Markdown files with frontmatter (file or directory path, default is .):

uv run diq list tests/data/frontmatter

Include Markdown files that do not have frontmatter:

uv run diq list tests/data/frontmatter --include-no-frontmatter

Attribute search mode (key=value semantics, optional PATH):

uv run diq search tests/data/frontmatter name="Main Requirements Document"

Tag similarity mode (optional --take):

uv run diq search tests/data/frontmatter --tags-similar tag1,tag2 --take 1

CLI changes

  • When making changes to the cli, add or update the README.md with succinct usage examples.