Skip to main content
        __       __      __       __
  _____/ /______/ /     / /______/ /
 / ___/ __/ ___/ /_____/ //_/ __  /
/ /__/ /_/ /  / /_____/ ,< / /_/ /
\___/\__/_/  /_/     /_/|_|\__,_/

ctrl-kd

Convert WordStar for DOS v4-v7 files to modern formats. ^KD: save and done.

ctrl-kd reads WordStar for DOS documents, WordStar print stream files, and MailMerge data files, and writes plain text, Markdown, HTML, RTF, or PDF (set on a viewer's built-in base-14 fonts — no dependencies, nothing embedded, the page as it would have printed: printed mode follows the document's own font blocks and its own layout arithmetic, while modern mode is the same document reflowed for today: its fonts, headers, and footnotes all carried.

$ ctrl-kd ESSAY.WS                      # -> ESSAY.rtf: modern reflow, the
                                        #    document's own fonts carried
$ ctrl-kd --mode printed LETTER.WS      # -> LETTER.pdf: the 1990 facsimile
$ ctrl-kd ESSAY.WS -t md                # modern markdown instead
$ ctrl-kd ESSAY.WS -t html -t rtf       # multiple formats
$ ctrl-kd --page-settings sawyer X.WS   # a known machine's page defaults
$ ctrl-kd --diagnose MYSTERY.FIL        # what IS this file?
$ ctrl-kd --comments MEMO.WS            # include the author's hidden comments
$ ctrl-kd --no-notes PAPER.WS           # body text only, no notes
$ ctrl-kd --samples DIR                 # write 4 bundled public-domain sample .WS files into DIR

Modes

  • --mode modern (default; bare runs produce RTF): the document brought to a modern audience — reflowed, its own fonts and styles carried, footnotes at the page bottom, gaps the file never specified filled with today's conventions (a comfortable serif at reading size, one-inch margins).
  • --mode printed (bare runs produce PDF): every line as laid out, on the era's own page — how it came off the printer. Gaps are filled with 1990's conventions instead; --page-settings supplies a particular machine's.

More information: FAQ.md, and ERAS.md.

Install

$ brew install jonmichaels/tap/ctrl-kd     # macOS / Linuxbrew
$ pipx install ctrl-kd                     # or: pip install ctrl-kd

Download Windows x86_64: Latest Version

Python ≥ 3.9, no dependencies. Library API: ctrlkd.convert(data, to='html').

Adding an output format

An output format is one function over the parsed document — register it with the @ctrlkd.emitter decorator, or ship it as a pip-installable plugin via the ctrlkd.emitters entry-point group and it appears in the CLI automatically. EXTENDING.md has the IR contract, a complete worked example (BBCode in ~40 lines), and a checklist.

Siblings

Soft Return — macOS viewer and converter plus QuickLook extension. Includes a Swift command line utility.

Lineage

I wanted to be able to see the 70-some WordStar 4 files I had from junior high and high school. In about an hour and half my agent had my files looking pretty good. And then I fell down the research rabbit hole...

ctrl-kd wouldn't have been possible without the tools and documentation that kept WordStar readable: Yohanes Nugroho's WS-CON, Michael Petrie's English port, the wsconvertproject, Robert J. Sawyer's WordStar archive, and the WordStar format documentation community.

My own test files are personal and are not distributed — this repo's tests use synthetic fixtures and some public domain docs I retyped in WordStar 4 and WordStar 7 in DOSBox-X, plus Robert J. Sawyer's public WS7 archive (opt-in, pytest -m sawyer; see tests/SAWYER-CORPUS.md) you can run your own tests against that if you have a copy: download the archive, point CTRLKD_SAWYER_ARCHIVE at its top-level directory (the one holding CONVERT.WS, INSET/, ARTICLES/), and verify the path before arming — tests/SAWYER-CORPUS.md has a one-line smoke check. A CTRLKD_PRIVATE_CORPUS variable also exists, for my own private regression fixtures — it has no effect unless you're me.

Credits

Written by Jon Michaels — whose 1987–1992 WordStar files, and the need to read them again, are the reason this exists — with Athena (Claude, Anthropic) as co-author.

Metadata

Release files for ctrl-kd 4.7.1

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

Source distribution (sdist)

Source distribution for ctrl-kd 4.7.1
File Size Uploaded Provenance Actions
ctrl_kd-4.7.1.tar.gz 970.0 kB With provenance Details for ctrl_kd-4.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ctrl-kd 4.7.1
File Interpreter ABI Platform Actions
ctrl_kd-4.7.1-py3-none-any.whl Python 3 none any Details for ctrl_kd-4.7.1-py3-none-any.whl

Total release size: 1.5 MB

Release files / ctrl_kd-4.7.1.tar.gz

Download URL ctrl_kd-4.7.1.tar.gz
Size 970.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ea438f32a016be6b6cad358092b7dfb162fa3df04b6b5102e97946e77bf5a2ef
BLAKE2b-256 checksum
How to use checksums
a1828d0607cfbbdc32caa63ab1790557226a4a42e4a9681a76e7fa1eb24f7ce3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / ctrl_kd-4.7.1-py3-none-any.whl

Download URL ctrl_kd-4.7.1-py3-none-any.whl
Size 538.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78b58f65d39265637dfc83620ef380199a868c7f8a18d974a5530afb5a8428f6
BLAKE2b-256 checksum
How to use checksums
ca4929b15c317354fc73c2021c9e5751e9a5f08029dc896a99c588f382221c4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Security for ctrl-kd 4.7.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ctrl_kd-4.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

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