Skip to main content

wxr2md - Convert WXR Files into Markdown

Convert WordPress exPort RSS (WXR) files to Markdown files with YAML frontmatter.

Installation

Install using pip,

pip install wxr2md

Usage

usage: wxr2md [-h] [--output OUTPUT] [--no-frontmatter] [--title-in-body] [--date-in-body] input

Convert WordPress eXport RSS (WXR) into Markdown files

positional arguments:
  input             path to the WXR file to be converted

options:
  -h, --help        show this help message and exit
  --output OUTPUT   output directory, defaults to 'out/' in the current working directory
  --no-frontmatter  don't add YAML frontmatter to the markdown file
  --title-in-body   add title in the markdown body as an h1 element
  --date-in-body    print date at the start of the markdown body

Output

By default, the script will output to out/ folder in the current working directory.

The markdown file output is as follows. The frontmatter mostly follows the frontmatter properties of Hugo, except for id.

---
id: 1
title: Hello, world!
type: post
date: 1970-01-01 12:34:56
lastmod: 1980-02-02 01:02:03
categories:
  - a category
  - another category
tags:
  - my tag
  - your tag
draft: true
---

# Hello, world! <!-- If passing in --title-in-body argument -->

_Mon 01 Jan 1970, 12:34_ <!-- If passing in --date-in-body argument -->

This is the content of the blog post. Perhaps there are a few sentences here.

Limitations:

  • only tested with WXR version 1.2 and a limited set of exports, so might not be compatible for all WXR files
  • date and lastmod is in local timezone and does not include timezone data
  • blog information is not outputed anywhere (e.g. description, url, etc.)
  • no option to customise the output file names and folder structures

Building

This package uses poetry for dependency management and packaging. See their documentation for setup and usage.

Metadata

Release files for wxr2md 0.3.0

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

Source distribution (sdist)

Source distribution for wxr2md 0.3.0
File Size Uploaded Provenance Actions
wxr2md-0.3.0.tar.gz 4.6 kB Without provenance Details for wxr2md-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wxr2md 0.3.0
File Interpreter ABI Platform Actions
wxr2md-0.3.0-py3-none-any.whl Python 3 none any Details for wxr2md-0.3.0-py3-none-any.whl

Total release size: 10.0 kB

Release files / wxr2md-0.3.0.tar.gz

Download URL wxr2md-0.3.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
68d1085ca6f1955bfe0ac4c14dabdcc093ade889b02324ac1b0e2b8ac78e8062
BLAKE2b-256 checksum
How to use checksums
2cf6135b1d2ede16ce192d4b18c77b3e3b1413ee02f5d026e0f895071b7566b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0

Release files / wxr2md-0.3.0-py3-none-any.whl

Download URL wxr2md-0.3.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7424612f724422a7761697e2f0fc892ab1ddaa4a8999de6e2ea0969f788a1ea6
BLAKE2b-256 checksum
How to use checksums
f30761bee2161707c97ee2046f9517a1e9307453fdd8d4714028386e09aea86f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.2.0

Security for wxr2md 0.3.0

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