Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .claude/commands/add-to-changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Update Changelog

This command adds a new entry to the project's CHANGELOG.md file.

## Usage

```
/add-to-changelog <version> <change_type> <message>
```

Where:
- `<version>` is the version number (e.g., "1.1.0")
- `<change_type>` is one of: "added", "changed", "deprecated", "removed", "fixed", "security"
- `<message>` is the description of the change

## Examples

```
/add-to-changelog 1.1.0 added "New markdown to BlockDoc conversion feature"
```

```
/add-to-changelog 1.0.2 fixed "Bug in HTML renderer causing incorrect output"
```

## Description

This command will:

1. Check if a CHANGELOG.md file exists and create one if needed
2. Look for an existing section for the specified version
- If found, add the new entry under the appropriate change type section
- If not found, create a new version section with today's date
3. Format the entry according to Keep a Changelog conventions
4. Commit the changes if requested

The CHANGELOG follows the [Keep a Changelog](https://keepachangelog.com/) format and [Semantic Versioning](https://semver.org/).

## Implementation

The command should:

1. Parse the arguments to extract version, change type, and message
2. Read the existing CHANGELOG.md file if it exists
3. If the file doesn't exist, create a new one with standard header
4. Check if the version section already exists
5. Add the new entry in the appropriate section
6. Write the updated content back to the file
7. Suggest committing the changes

Remember to update the package version in `__init__.py` and `setup.py` if this is a new version.
9 changes: 3 additions & 6 deletions .github/workflows/python-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ jobs:
python -m pip install --upgrade pip
python -m pip install .[dev]

- name: Lint with flake8
- name: Lint and check formatting with ruff
run: |
flake8 blockdoc tests

- name: Check formatting with black
run: |
black --check blockdoc tests
ruff check blockdoc tests examples
ruff format --check blockdoc tests examples

- name: Type check with mypy
run: |
Expand Down
4 changes: 4 additions & 0 deletions .repomixignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add patterns to ignore here, one per line
# Example:
# *.log
# tmp/
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.0] - 2025-04-25

### Added

- New `markdown_to_blockdoc` converter for transforming Markdown documents to BlockDoc format
- Comprehensive parser that handles all core Markdown elements:
- Headings (ATX and Setext styles)
- Paragraphs with proper line break handling
- Lists (ordered and unordered)
- Code blocks with language detection
- Block quotes with attribution
- Images with captions
- Horizontal rules
- Semantic ID generation based on content
- Example implementation in `examples/markdown_conversion_example.py`
- Test suite for the converter functionality

## [1.0.1] - 2024-09-15

### Fixed

- Fixed pyproject.toml syntax error and installation method in CI

## [1.0.0] - 2024-09-01

### Added

- Initial release of BlockDoc
- Core Block and BlockDocDocument classes
- HTML and Markdown renderers
- JSON schema validation
- Basic utility functions
7 changes: 5 additions & 2 deletions blockdoc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"""
BlockDoc

A simple, powerful standard for structured content that works beautifully with LLMs, humans, and modern editors.
A simple, powerful standard for structured content that works beautifully with LLMs,
humans, and modern editors.
"""

from blockdoc.conversions.markdown import markdown_to_blockdoc
from blockdoc.core.block import Block
from blockdoc.core.document import BlockDocDocument
from blockdoc.renderers.html import render_to_html
Expand All @@ -15,7 +17,8 @@
"BlockDocDocument",
"render_to_html",
"render_to_markdown",
"markdown_to_blockdoc",
"schema",
]

__version__ = "1.0.1"
__version__ = "1.1.0"
8 changes: 8 additions & 0 deletions blockdoc/conversions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""BlockDoc Conversion Utilities

Utilities for converting between BlockDoc and other formats
"""

from blockdoc.conversions.markdown import markdown_to_blockdoc

__all__ = ["markdown_to_blockdoc"]
Loading
Loading