Skip to content

Instantly share code, notes, and snippets.

View st33n's full-sized avatar

Steen Lehmann st33n

View GitHub Profile
@aembleton
aembleton / docx2md.md
Last active May 17, 2023 07:04 — forked from vdavez/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

# in one terminal
$ lein deps
$ lein run -m server

# in another terminal
$ curl -i http://localhost:8080/sync
$ curl -i http://localhost:8080/poll
$ curl -i http://localhost:8080/stream
$ ./wsclient ws://localhost:8080/websocket?name=bob

=> hi