Skip to content
CAI
Software that uses CAICheck a score

benbalter/word-to-markdown

62.3

Adequate · 6 November 2026

646

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Ruby gem that converts Microsoft Word documents to Markdown by leveraging LibreOffice as the underlying conversion engine. It provides a command-line interface and a library API that handle input validation, security scrubbing of links and images, and semantic formatting of headings, tables, and lists. The project is currently maintained for existing users while directing new development to a JavaScript successor.

Features

Add dependency path, version, and process-status helpers

Cliver now provides convenient shortcuts for working with detected dependencies. Users can call \detected\_path\ (aliased as \path\) to get the resolved binary path, which is memoized for efficiency. The \version\ method returns the detected version string (excluding Windows platforms), and \major\_version\ extracts the first component of that version. Additionally, \open?\ checks whether the detected dependency process is currently running by inspecting the process table, with graceful handling of potential argument errors.

lib/cliver · high confidence

Add w2m command-line tool for Word to Markdown conversion

Introduces the new \w2m\ executable script, allowing users to convert Word documents to Markdown directly from the terminal. The tool accepts a document path as an argument and provides help (\-h\) and version (\-v\) flags, with version output conditionally excluding LibreOffice details on Windows platforms.

bin · high confidence

Behavioural changes

Default font size for XML elements set to 12

The \Nokogiri::XML::Element\ class now includes a \font\_size\ method that returns the element's font size from its styles, defaulting to 12.0 if no font-size style is present. This change introduces a standard baseline for font sizing within the library's XML element handling.

lib/nokogiri · high confidence

Major architectural refactor to use LibreOffice for conversion

The library has been completely rewritten to replace the previous HTML-based parsing approach with a conversion pipeline using LibreOffice (soffice). The new architecture introduces separate Document and Converter classes, utilizes the Cliver gem for dependency resolution, and adds support for configurable timeouts and logging. This change shifts the core conversion mechanism from direct HTML manipulation to an external process execution model, requiring LibreOffice version 4.0 or higher.

lib · high confidence

Project modernization and successor guidance

The project now explicitly directs users to its JavaScript successor, word-to-markdown-js, for new projects while maintaining the Ruby gem for existing users. The Ruby gem has been updated to target Ruby 3.2, with a new Dockerfile and docker-compose setup for containerized execution using LibreOffice. Documentation has been expanded to include command-line usage, support for implicit headings, tables, and images, and security guidance for converting untrusted documents. Development tooling includes RuboCop configuration, Hadolint, and Renovate for dependency updates.

(repo-wide) · high confidence

Restructure Word-to-Markdown conversion with security and semantic improvements

The library has been refactored into distinct components (Converter, Document, InputFormat, UrlScrubber) to improve maintainability and security. The conversion process now validates input files by checking file signatures rather than relying on extensions, preventing accidental processing of non-Word files. A new UrlScrubber module restricts link and image schemes to safe values (http, https, mailto) and escapes link destinations to prevent Markdown injection. Additionally, the converter now produces more semantic Markdown by converting implicit headings based on font size, normalizing table headers, and cleaning up list markers and whitespace.

lib/word-to-markdown · high confidence

Standardized development and CI scripts with RuboCop and Pry

The project now includes a set of bootstrap and CI scripts to streamline setup and verification. The new script/bootstrap installs dependencies, while script/cibuild automates the test suite, RuboCop linting, and gem packaging. Additionally, the development console has been updated to use Pry instead of IRB for an improved interactive experience.

script · high confidence

Test coverage

Migrate test suite to Minitest and add comprehensive coverage; Updated HTML test fixtures for document conversion.

Dependencies

Major dependency overhaul and Ruby 3.2 requirement

The gem has been updated to require Ruby 3.2 or higher and replaced the local reverse\_markdown dependency with a version constraint of \>= 1, \< 3. Several new dependencies were added, including cliver, logger, nokogiri-styles, premailer, and sys-proctable, while older dependencies like descriptive\_statistics and rake were removed or updated. Development dependencies were also refreshed, introducing rubocop, minitest, mocha, and pry, and removing rdoc and bundler from dev deps.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 62 → 62 (-0.1)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 76 → 76 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 56 → 56 (+0.0)
  • Readiness 61 → 61 (+0.0)
  • Security 96 → 94 (-1.8)

Resolved (1)

  • Redundant accessor: The class exposes both a property timeout and a method timeout(). In most languages, these serve the same purpose (getting the timeout value), creating confusion about which to use.

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

benbalter/word-to-markdown was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 69194c4566b9b4ca2f97d80094bec9445e15000b — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.