Skip to content

Latest commit

 

History

History
198 lines (140 loc) · 8.26 KB

File metadata and controls

198 lines (140 loc) · 8.26 KB

Changelog

0.9.0

Added

  • Preserve image editor attributes through Markdown export and update with python-substack-image:v1 markers.
  • Add allow_image_replacement=False and substack drafts update --allow-image-replacement for explicit image replacement authorization.

Fixed

  • Preserve absolute and home-relative local Markdown image paths during upload, retain existing root-relative asset fallback, and report missing files or failed uploads instead of saving broken image sources.

  • Return draft records from the Substack drafts response envelope so drafts list works with the current API response.

0.8.0

Added

  • Add allow_unsupported_change=False parameter to Api.update_draft_from_markdown to safely allow or restrict unsupported node changes.
  • Add --allow-unsupported-change CLI argument to substack drafts update, which requires --yes flag to confirm intentional removal/replacement.
  • Preserve and reinsert unrecognized/unsupported Substack widgets verbatim from python-substack-node:v1 markers during Markdown rendering and draft updates.
  • Parse block-level and inline-level HTML comment markers containing URL-safe base64-encoded JSON nodes.
  • Strictly validate comment markers on base64 integrity, UTF-8 JSON structure, and minimum schema compliance (non-empty type) to reject corrupt or malicious inputs.
  • Safely ignore ordinary HTML comments without turning them into Substack nodes.

0.7.0

Added

  • Add Api.update_draft_from_markdown(draft_id, markdown, ...) method to safely update draft content.
  • Add substack drafts update DRAFT_ID MARKDOWN_FILE CLI command with --dry-run validation.
  • Refuse to update drafts containing unsupported nodes to prevent remote data loss.
  • Added --yes flag to bypass interactive confirmation for script usage.

Dependencies

  • Bump fastmcp from 3.4.7 to 4.0.3 (#74).

0.6.0

Added

  • Add read-only Api.export_draft_to_markdown(draft_id) with the original draft, exported Markdown, and unsupported-node details.
  • Add substack drafts export DRAFT_ID, including stable JSON output and safe --output and --force file handling.
  • Reverse-render every Substack node supported by Markdown import, including formatting, nested lists, images and captions, code languages, footnotes, math, pull quotes, and callouts.
  • Preserve unsupported nodes and unknown fields as versioned, decodable python-substack-node:v1 markers instead of silently dropping them.

0.5.0

Added

  • Resolve publication_url dynamically against Substack subdomains and custom domains.
  • Allow optional timeout configuration for the API client and CLI.
  • Detect local image MIME types (JPEG, PNG, GIF, WebP) for uploads instead of defaulting to JPEG.
  • Add Dependabot configuration (#74).

Improved

  • Raise SubstackRequestException explicitly instead of failing silently when a publication is unavailable.
  • Expand secret redaction to cookie-like values in request error messages to prevent credential leaks.
  • Ensure bounded retries apply strictly to safe GET and DELETE requests only.
  • Bump fastmcp from 3.2.0 to 3.4.7 (#73).
  • Bump markdown-it-py from 3.0.0 to 4.2.0 (#72).
  • Bump pre-commit from 4.6.1 to 4.6.2 (#71).
  • Bump requests from 2.33.0 to 2.34.2 (#70).
  • Bump python-dotenv from 1.2.2 to 1.2.3 (#69).

0.4.0

Added

  • Seven new MCP tools for read operations and safe publishing: get_status, list_publications, list_drafts, get_draft, schedule_draft, unschedule_draft, and publish_draft_checked.
  • Pre-publish validation, interactive confirmation requirements, and no-email defaults for the new publish_draft_checked MCP tool.
  • Verified MCP client configuration examples in docs/mcp.md.
  • Documentation for local agent workflows.

Improved

  • Simplify MCP draft creation by routing through the existing Api.create_draft_from_markdown SDK helper, preserving response format.
  • Document the legacy publish_draft MCP tool as the compatibility interface.
  • Bump cryptography dependency from 48.0.1 to 50.0.0 (#68).

0.3.0

Added

  • GitHub Pages documentation with a task-oriented index for installation, authentication, CLI, Python, Markdown, MCP, safety, and troubleshooting.
  • A five-minute Markdown-to-unpublished-draft walkthrough using the existing before and after images.
  • Tested examples for draft creation, scheduling, publication selection, stable JSON automation, and cookie authentication verification.
  • A documentation project link in package metadata and repository navigation.

Improved

  • Add Jekyll front matter to existing documentation while preserving every previous documentation path.
  • Keep creating, scheduling, publishing, and deleting clearly separated in the onboarding and safety guides.

No runtime interface changed in this release.

0.2.0

Added

  • Outcome-focused documentation for authentication, legacy CLI commands, low-level Python construction, YAML drafts, MCP, compatibility, security, contributing, and adoption metrics.
  • Offline tests for the documented unauthenticated installation checks and local documentation links.
  • A documented compatibility commitment covering the Python API, five console scripts, unified CLI, JSON keys, environment variables, and MCP tools.

Improved

  • Reposition the package around safe writer-side Markdown automation.
  • Put the unpublished draft workflow and publishing safeguards first in the README.
  • Classify the package as Beta after four years of compatible releases.
  • Update pre-commit, formatting, and import-sorting hooks to current verified releases.
  • Validate the hook runner as a locked development dependency.
  • Publish through short-lived PyPI Trusted Publishing credentials instead of a long-lived API token.

Existing Python APIs, CLI commands, console scripts, defaults, JSON contracts, environment variables, and MCP tools remain unchanged.

0.1.27

Added

  • Unified substack drafts create MARKDOWN_FILE command for safe draft-only Markdown creation.
  • Markdown rendering for LaTeX, superscript, subscript, pull quotes, and callouts.
  • Registered live test marker with documented opt-in API and CLI smoke commands.

Fixed

  • Support Substack subscriber responses that provide a subscribers list instead of subscriberCount.
  • Use Substack's current scheduled-release endpoint for scheduling and unscheduling drafts.
  • Retry rate-limited GET and DELETE requests with bounded backoff without retrying write-producing POST requests.

Improved

  • Validate offline tests separately from live integrations.
  • Validate wheel metadata, console entry points, base installations, and MCP-extra installations on Python 3.10 and 3.14.
  • Require release tags, package metadata, and substack.__version__ to agree before publishing.

0.1.26

Added

  • Unified substack CLI for publication status and draft operations.
  • Commands to list publications, inspect drafts, schedule, unschedule, publish, and delete.
  • Stable --json output for automation and --publication-url overrides.
  • Interactive confirmation and non-interactive --yes protection for publishing and deletion.
  • Pull-request CI across Python 3.10 through 3.14.

Improved

  • Clear CLI error output, exit codes, timezone validation, and secret redaction.
  • Package positioning, keywords, operational examples, and release validation.
  • PyPI publishing now uploads the exact tested wheel and source distribution.

0.1.25

Added

  • Markdown-first draft helper: Api.create_draft_from_markdown(...).
  • CLI commands:
    • substack-auth-check
    • substack-publish-markdown
    • substack-publish-yaml
    • substack-mcp
  • Optional MCP extra: python-substack[mcp].
  • .env.example for setup.
  • GitHub issue templates for auth bugs and feature requests.

Fixed

  • Include substack_mcp in packaged distributions.
  • Fix examples/publish_post.py --publish so the flag publishes.
  • Correct MCP documentation to use substack_mcp.mcp_server.

Improved

  • Reworked README around Markdown, cookie auth, CLI usage, and MCP setup.
  • Added PyPI classifiers and project links.
  • Added focused tests for CLI behavior and Markdown draft creation.