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.8.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 ctrl-kd 4.8.0
File Size Uploaded Provenance Actions
ctrl_kd-4.8.0.tar.gz 1.0 MB With provenance Details for ctrl_kd-4.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.6 MB

Release files / ctrl_kd-4.8.0.tar.gz

Download URL ctrl_kd-4.8.0.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
5a7d9aaa44e73e1bab06e1a79500247b14d4691a46c86f2eb928f5cc508f15ae
BLAKE2b-256 checksum
How to use checksums
fcedd70542b58e19404d999b297330bc6e7845584c7ce71be24388c51ffbbc6d
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 16, 2026.

Transparency log

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

Download URL ctrl_kd-4.8.0-py3-none-any.whl
Size 560.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f1a21f12d816e221529b2642f5ae00b367c8ace09f10d2522c2fea9f75428cc
BLAKE2b-256 checksum
How to use checksums
9c826391a37c3eeca7b0616a84228d80ab351fd63478917ba5103b70c0528547
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 16, 2026.

Transparency log

Security for ctrl-kd 4.8.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.

Full provenance

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

Select from 2 files

Attestation for ctrl_kd-4.8.0.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 16, 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