https://github.com/continuous-foundation/doc-convert
Utilities for working with Docx and converting, written in Node and Typescript.
https://github.com/continuous-foundation/doc-convert
Last synced: 6 days ago
JSON representation
Utilities for working with Docx and converting, written in Node and Typescript.
- Host: GitHub
- URL: https://github.com/continuous-foundation/doc-convert
- Owner: continuous-foundation
- License: mit
- Created: 2025-02-20T20:39:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-06-02T12:28:00.000Z (13 days ago)
- Last Synced: 2026-06-02T14:08:29.861Z (13 days ago)
- Language: TypeScript
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `doc-convert` Command Line Tool
Convert Word (`.docx`) manuscripts into [MyST](https://mystmd.org/) projects suitable for JDH publishing — structured `myst.yml`, `article.md`, extracted figures, citations, and author metadata.
The CLI runs a fixed pipeline (Pandoc → cleanup → figures/tables/crossrefs → citations → ROR enrichment). Example inputs for this monorepo live under [../docx-examples/](../docx-examples/); conversion quality is tracked in [../gap-analysis/](../gap-analysis/).
## Install
You need [Bun](https://bun.sh/) and [Pandoc](https://pandoc.org/installing.html) on your `PATH`.
```bash
cd doc-convert
bun install
bun run build
```
Optional: link the CLI globally (`bun link` after build).
## Quick start
Convert one manuscript (writes to `_improved/` under the project root):
```bash
bun src/index.ts path/to/manuscript.docx --project-root path/to/project --workdir _improved
```
From the monorepo root, run all bundled examples:
```bash
../scripts/convert-docx-examples.sh
```
List all 13 pipeline steps with planned `[run]` / `[skip]` / `[warn-skip]` dispositions (no workdir, no Pandoc):
```bash
bun src/index.ts path/to/manuscript.docx --list-steps
```
Optional per-directory pipeline config — run from the project directory where you convert:
```bash
cd path/to/project
bun ../../doc-convert/src/index.ts configure
bun ../../doc-convert/src/index.ts manuscript.docx --list-steps # preview after edits
```
## Documentation
Full author guide, CLI reference, and pipeline details: **[docs/](docs/)** ([guide](docs/guide/index.md), [reference](docs/reference/cli.md)).
## License
MIT — see [LICENSE](LICENSE).
Made with love by
Continuous Science Foundation