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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

## 0.11.0

### Added

- Text color and highlight marks (`textStyle` / `highlight`), settable via
Expand Down Expand Up @@ -42,6 +44,12 @@
workflows so every clone retains the development roadmap.
- Keep environment credentials and generated tool environments out of Git.

### Dependencies

- Update markdown-it-py to 4.3.0 and PyYAML to 6.0.4.
- Update the optional MCP extra to FastMCP 4.1.8.
- Refresh the dnspython and pytest versions in the lockfile.

## 0.10.0

### Added
Expand Down
9 changes: 8 additions & 1 deletion RELEASE_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ progress` and record the failure.
| 0.9.0 | released, 2026-09-27 | Editor image preservation |
| 0.9.1 | released, 2026-10-04 | Image-sync safety |
| 0.10.0 | released, 2026-10-07 | Conflict-aware draft updates |
| 0.11.0 | planned | Markdown fidelity contract |
| 0.11.0 | in progress | Markdown formatting and local images |
| 0.12.0 | planned | Authentication resilience |
| 0.13.0 | planned | Safe draft lifecycle |
| 0.14.0 | planned | CLI automation contract |
Expand Down Expand Up @@ -139,6 +139,13 @@ draft changes made after export.

## 0.11.0: Markdown fidelity contract

The 0.11.0 release candidate covers the merged Markdown formatting and local
image improvements, the default draft filter fix, and dependency updates. The
expanded fidelity fixture matrix below remains roadmap work.

Candidate validation on 2026-12-03: 318 offline tests passed, eight live tests
skipped with opt-ins unset, and 326 tests collected with strict markers.

**Objective:** Make supported Markdown conversion deterministic and make every
unsupported editor construct visible and safe.

Expand Down
53 changes: 53 additions & 0 deletions docs/releases/0.11.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
layout: default
title: Release 0.11.0
parent: Releases
---

# Release 0.11.0

## Added

- Text color and highlight marks (`textStyle` / `highlight`), settable via
`substack.nodes.text_style_mark()` / `highlight_mark()` for direct node
construction, and in Markdown via Pandoc-style span attributes
(`[text]{style="color:#hex"}` / `{style="background-color:#hex"}`), parsed
and exported round-trip. Verified against Substack's real editor schema
(confirmed by applying both to a live draft and reading the rendered HTML
back: `textStyle` becomes a `<span data-color>` with inline `color`,
`highlight` becomes a `<mark data-color>` with inline `background-color`).
- Optional `markdown_dir` argument on `Post.from_markdown`,
`Api.create_draft_from_markdown`, `Api.update_draft_from_markdown`, and
`mdrender.markdown_to_doc`. A relative local image path that is not found in
the working directory is then looked up in that folder. The `substack drafts
create`, `substack drafts update`, `substack-publish-markdown`, and
`substack-publish-yaml` commands pass the Markdown file's folder (the YAML
file's folder for inline Markdown), so images stored beside a post are found
from any working directory. Paths that resolve today resolve to the same file.

## Fixed

- Nested color and highlight spans override inherited styles of the same type
without creating duplicate ProseMirror marks or changing sibling styles.
Repeated style properties use the last nonempty declaration.
- `Api.get_drafts()` now asks for drafts by default. Substack rejects the
request with `400 Invalid value` when no filter is sent, so calling it
without arguments always failed.
- Local Markdown images now carry the real width, height, byte size, and
content type that Substack reports for the upload, instead of every image
being recorded as 1456x819 whatever its real shape.

## Development

- Add a portable cloud setup script that installs pinned Poetry, locked
development dependencies, the MCP extra, and repository hooks.
- Document cloud configuration, offline validation, and maintainer handover.
- Track the maintainer-approved release plan, project guidance, and release
workflows so every clone retains the development roadmap.
- Keep environment credentials and generated tool environments out of Git.

## Dependencies

- Update markdown-it-py to 4.3.0 and PyYAML to 6.0.4.
- Update the optional MCP extra to FastMCP 4.1.8.
- Refresh the dnspython and pytest versions in the lockfile.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "python-substack"
version = "0.10.0"
version = "0.11.0"
description = "Write and safely manage Substack drafts from Markdown with Python, CLI, and MCP."
authors = [
{ name = "Paolo Mazza", email = "mazzapaolo2019@gmail.com" }
Expand Down
2 changes: 1 addition & 1 deletion substack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
__author__ = "Paolo Mazza"
__email__ = "mazzapaolo2019@gmail.com"
__license__ = "MIT License"
__version__ = "0.10.0"
__version__ = "0.11.0"
__url__ = "https://github.com/ma2za/python-substack"
__download_url__ = "https://pypi.python.org/pypi/python-substack"
__description__ = (
Expand Down