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.jsonwith owner-only file permissions and atomic replacement.
Audit/release status
This source bundle prepares version 0.3.1 for a possible next release. Static syntax/package checks have been run, but a full Django/Wagtail integration suite has not run in the bundle build environment. Do not upload to PyPI until the release checklist in ../../04-docs/UPGRADE_AND_RELEASE.md is complete.
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
Distribution status note (checked 2026-10-29): the URL https://pypi.org/project/wagtail-desktop-publisher/ did not resolve during this audit. If this name is not the intended public distribution name or the project has not been uploaded yet, the command above will fail. To install the source candidate from this bundle, run from this package directory:
python -m pip install .
# For editable development instead:
python -m pip install -e .
pip install wagtail-desktop-publisher selects the version currently published under that distribution name, if it exists. The candidate version shown in pyproject.toml is not published by creating this archive; publish it only after confirming the public project name and completing ../../04-docs/UPGRADE_AND_RELEASE.md.
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:
- Mount Wagtail's API under
/api/v3/. - Create a token for a user that has permission to create/update the target pages and upload images.
- 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.
- Configure the image upload endpoint. This publisher currently posts files to
/api/v3/publisher-images/. The source project containsvsproject/api_images.pyas 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. - If you use
wagtail-image-directories, make sure the endpoint sets the imageyear/slugfields 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.
Recommended combinations
wagtail-image-directoriesis the closest companion: it can organize publisher uploads intoyear/slugpaths, but the target site's custom/api/v3/publisher-images/endpoint must explicitly integrate with that plugin.wagtail-prose-editor-imagesimproves 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.404onpublisher-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
imagesmap 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), andslug.
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wagtail_desktop_publisher-0.3.2.tar.gz | 25.7 kB | Without provenance | Details for wagtail_desktop_publisher-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wagtail_desktop_publisher-0.3.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for wagtail_desktop_publisher-0.3.2-py2.py3-none-any.whl |
Total release size: 52.1 kB
Release files / wagtail_desktop_publisher-0.3.2.tar.gz
| Download URL | wagtail_desktop_publisher-0.3.2.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4c4895f611a17c1528fd909139b25473957dd5e046adbe34f641ee6dd6b80da4
|
|
BLAKE2b-256 checksum How to use checksums |
618282348a841f136ace46cc8a8f1fcfa9ba11b5433ef7a135a1c7f0cb913c9d
|
| 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.2-py2.py3-none-any.whl
| Download URL | wagtail_desktop_publisher-0.3.2-py2.py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
f6e2c3abd0a7a98d6a54750ff0357a75764b3fcf68590ecae7faf488aa25ada6
|
|
BLAKE2b-256 checksum How to use checksums |
42f13ddb660740278037c5941930f29c603f12dfec35e0cfd848f05748aaace2
|
| 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.2
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.