Skip to main content

wagtail-desktop-publisher

Published on PyPI: versions 0.3.0–0.3.2 are live at https://pypi.org/project/wagtail-desktop-publisher/ — pip install wagtail-desktop-publisher installs the current release. Source: https://github.com/vovansrnd/wagtail-desktop-publisher

English · Русский · Deutsch · Español · Français · Italiano · Português (Brasil) · Nederlands · Polski · Türkçe · 简体中文 · 日本語 · 한국어

Publish Markdown articles from your desktop to a Wagtail site. The package provides a command-line interface (wagtail-publisher) and a native GUI (wagtail-publisher-gui). Write content in any local Markdown editor, keep article images beside the Markdown file, and sync pages and images over Wagtail's v3 API.

The local Markdown document remains editable: relative image paths are preserved in the file, while the publisher substitutes uploaded image URLs in the API payload. A content hash allows unchanged files to be skipped, reducing unnecessary API calls and Wagtail page revisions.

Features

  • Create or update a page from Markdown and YAML frontmatter; publish it or leave it as a draft.
  • Upload local images and reuse them when their SHA-256 content is unchanged.
  • Track the Wagtail page ID, content hash, publication state, image map, slug, and URL in frontmatter.
  • Recursively process directories; inspect local sync state offline; refresh metadata from the server; unpublish pages.
  • GUI with OS dark/light appearance, site/parent selection from the API, scan-and-sync flow, background network operations, logs, and 13 UI locales.
  • Configuration stored in ~/.wagtail_publisher.json with owner-only file permissions and atomic replacement.

Audit/release status

Requirements

The package depends on requests, python-frontmatter, markdown, and customtkinter. It targets Wagtail's v3 API with write support. The original package documentation states Wagtail 7.0+ and reports verification against Wagtail 8.0; do not treat that as a guarantee for every later version. Verify the API endpoints and writable fields on your site before production use.

Installation

pip install wagtail-desktop-publisher

The package installs two commands:

wagtail-publisher --help
wagtail-publisher-gui

A desktop environment is required for the GUI. The CLI is preferable for SSH sessions, automation, and CI jobs.

Article layout and frontmatter

A typical local layout is:

articles/
└── 2026/rca-connectors/
    ├── index.md
    └── images/
        ├── front.png
        └── rear.png

Example index.md:

---
title: "Budget RCA connectors"
slug: rca-connectors
excerpt: "Short summary."
date: 2026-10-28
year: 2026
tags: [audio, diy]
category_ids: [12]
---

Article text with a local image:

> The optional desktop GUI is implemented in `wagtail_desktop_publisher/gui/`. This source bundle does not include a GUI screenshot.

slug is required because the publisher needs a stable target URL. The available fields depend on your page model and API configuration. Use the same Markdown file for later updates; do not delete the synchronization metadata from frontmatter unless you intentionally want to rebind the article.

CLI quick start

Initialize the API connection (use your site's real API URL and a token created by a Wagtail administrator):

wagtail-publisher init --url https://example.com/api/v3 --token YOUR_TOKEN --site example.com

Create or update a draft under the Wagtail parent page with ID 42:

wagtail-publisher publish articles/2026/rca-connectors/index.md --parent 42

Publish it immediately:

wagtail-publisher publish articles/2026/rca-connectors/index.md --parent 42 --publish

Other commands:

wagtail-publisher status articles/       # local/offline status
wagtail-publisher pull articles/         # refresh metadata from Wagtail
wagtail-publisher unpublish article.md   # unpublish a bound page
wagtail-publisher publish articles/ --json

publish walks a directory recursively and processes .md files except README.md. --force sends an article even if its content hash matches. --type selects the page type, and --year overrides the image directory year for the operation.

Prepare the Wagtail site

The target site must expose the v3 API and allow token-authenticated write requests. Check all of the following in staging:

  1. Mount Wagtail's API under /api/v3/.
  2. Create a token for a user that has permission to create/update the target pages and upload images.
  3. Mark the intended page API fields writable using the API mechanism supported by your Wagtail version. Typical fields include the rich-text body, excerpt, main image, publication date, tags, and categories; actual field names differ by project.
  4. Configure the image upload endpoint. This publisher currently posts files to /api/v3/publisher-images/. The source project contains vsproject/api_images.py as a reference implementation. Copy/adapt and register that endpoint in your own project, or adapt the client to your existing secure image-upload endpoint. Do not assume a stock Wagtail API installation automatically provides this custom route.
  5. If you use wagtail-image-directories, make sure the endpoint sets the image year/slug fields and uses that model's collection/path behavior.

Do not expose a write-capable token in scripts committed to Git or share it in logs. Use a token with only the privileges needed to publish to the intended site and rotate it if it leaks.

Configuration and local files

The API URL, token, site, and optional default parent are stored in ~/.wagtail_publisher.json. The file is written with mode 0600 where supported. Treat it as a secret because it contains a bearer token. The publisher also maintains a separate site metadata cache in the user's home directory; it contains category/tag lookup data, not a replacement for the authoritative site database.

The publisher resolves local image paths relative to the article directory and rejects paths that escape that directory. Missing image files are reported rather than silently converted to arbitrary local filesystem paths.

Storage and revisions

Wagtail creates revisions when page content is updated. The publisher skips unchanged articles by comparing a content hash that includes relevant metadata and local image bytes. Images are reused when their hashes match. A change to a local image should therefore trigger upload even if the Markdown body does not change.

Before bulk publishing, run status, test a small sample, and back up the target database and media. Review the number of revisions and uploaded originals after the first run. The publisher does not automatically prune old Wagtail page revisions or unused image renditions.

  • wagtail-image-directories is the closest companion: it can organize publisher uploads into year/slug paths, but the target site's custom /api/v3/publisher-images/ endpoint must explicitly integrate with that plugin.
  • wagtail-prose-editor-images improves editing in Wagtail's admin; it is not required by the desktop publisher.
  • Comments and forum packages are independent of Markdown synchronization.

Troubleshooting

  • 401/403: verify the token and the user's API/page/image permissions.
  • 404 on publisher-images/: install or register the custom endpoint, or configure the client to use your own endpoint.
  • Missing/wrong fields: inspect the page model's v3 API schema and writable field configuration.
  • Unexpected duplicate uploads: preserve the images map in frontmatter and do not edit the image file metadata manually; the publisher uses content hashes to determine reuse.
  • Incorrect destination: verify the parent page ID, site, page type (--type), and slug.

Development and license

pip install -e .
python scripts/build_locales.py

Run the CLI against a staging site before release. The source bundle does not include an automated test suite, so GUI behavior, API write operations, error handling, and cross-version compatibility need explicit verification. MIT.

Metadata

Release files for wagtail-desktop-publisher 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-desktop-publisher 0.3.3
File Size Uploaded Provenance Actions
wagtail_desktop_publisher-0.3.3.tar.gz 25.0 kB Without provenance Details for wagtail_desktop_publisher-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-desktop-publisher 0.3.3
File Interpreter ABI Platform Actions
wagtail_desktop_publisher-0.3.3-py2.py3-none-any.whl Python 2, Python 3 none any Details for wagtail_desktop_publisher-0.3.3-py2.py3-none-any.whl

Total release size: 51.1 kB

Release files / wagtail_desktop_publisher-0.3.3.tar.gz

Download URL wagtail_desktop_publisher-0.3.3.tar.gz
Size 25.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bff3a86a2d3867755c5fca6301614b4d0e224f9c5e48ae7ee5f40c74936b384d
BLAKE2b-256 checksum
How to use checksums
155eb666365b9dd594a2f28b62f26c151ec13f8d8830db2b2f9c5a53aa7dd648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / wagtail_desktop_publisher-0.3.3-py2.py3-none-any.whl

Download URL wagtail_desktop_publisher-0.3.3-py2.py3-none-any.whl
Size 26.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f707a1ac76c0c6af86efdc4545f9550b5d8535bfd3bceb010d8c849c052263a5
BLAKE2b-256 checksum
How to use checksums
1a87570156fe585fb65c4c96a1e921c87b063304a6c1ca026776da1bca9b6965
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Security for wagtail-desktop-publisher 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page