frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: DOM-docx – HTML to native, editable Word docs (MIT)

https://github.com/floodtide/dom-docx
12•fishbone•58m ago

Comments

fishbone•58m ago
Hey HN, author here.

I do a lot of backend document (docx file) generation work, and updating our templates and backend code is one of my least favorite development tasks. Cryptic errors, minute-plus rebuild loops. I’d much prefer building these reports in JS rendered HTML (e.g., Vue or React), but existing HTML-to-docx libraries in the OSS ecosystem don't produce output that's actually valid, editable Word structure.

I'd had good luck applying Karpathy's Autoresearch pattern (agent runs iterations against an objective score, keeps what improves, discards what doesn't) to a couple of other problems, and figured OOXML fidelity was a good fit.

The Autoresearch process goes like this: render HTML and take a screenshot, use dom-docx to convert to docx, rasterize the docx file with LibreOffice and take another screenshot, score the browser HTML screenshot vs LibreOffice screenshot and measure layout fidelity + editability + speed as a quality metric, feed score back in, and repeat to drive higher fidelity within the constraints of editability and performance. It’s a beautiful thing to watch.

Burned some tokens and ran that loop against 37 real-world HTML patterns such as nested lists, tables, flex layouts and blockquotes (stuff that often breaks converters) and "brute forced" my way to what I hope is a high-fidelity HTML to docx converter.

A few things about where it landed:

- Native OOXML output, real Word structure, not a screenshot or a 1x1 table pretending to be a document - Works in Node, in the browser (no Playwright needed for the default path), and as a CLI (npx dom-docx input.html -o output.docx) - MIT licensed - Full benchmark methodology + results vs the established OSS alternatives: https://github.com/floodtide/dom-docx/blob/main/docs/BENCHMA...

Live demo if you want to test HTML conversion in the browser: https://dom-docx.com

Happy to answer anything about the scoring loop or anything else.

PS: This is the first thing I've open sourced and I'm excited to see where it leads!

Octoth0rpe•24m ago
That's an interesting approach. I'm concerned about the use of LibreOffice as your source of truth. Would it be possible to swap out LibreOffice for actual MS Word in this workflow? This also could reveal some libreoffice rendering bugs/edge cases that are worth filing bugs over.
fishbone•3m ago
I don’t have MS word installed on my development machine, so I haven’t done much testing with Word, but that does sound like a good idea to run the suite using Word. For what it’s worth I did not notice any issues with LibreOffice, even after running many iterations and tests.
noufalibrahim•16m ago
Surely I can't be the only one who misread the heading and clicked expecting to see DOOM implemented using just HTML DOM. :-/

Minlz v1.2: Search compressed data with without decompression

https://github.com/minio/minlz/releases/tag/v1.2.0
1•klauspost•1m ago•1 comments

"Houston, we have 1 problem(s)."

https://unsung.aresluna.org/houston-we-have-1-problems/
1•Looky1173•3m ago•0 comments

Anduril CEO Warns AI and Defense Valuations Are Becoming Dangerously Overvalued

https://finance.yahoo.com/technology/ai/articles/anduril-ceo-warns-ai-defense-180112499.html
2•jack1689•5m ago•0 comments

Musk's Starlink Socks Customers with $1500 'High Demand' Surcharge

https://www.techdirt.com/2026/07/13/musks-starlink-socks-customers-with-1500-high-demand-surcharge/
3•defrost•6m ago•0 comments

Open source AI matters more than ever, according to Hugging Face's Clem Delangue

https://techcrunch.com/podcast/open-source-ai-matters-more-than-ever-according-to-hugging-faces-c...
1•jack1689•7m ago•0 comments

Show HN: A Sims-style house builder in the browser (Three.js, no back end)

https://github.com/ch-bas/threejs-sims-house-builder
2•ch-bas•8m ago•1 comments

Show HN: OSS Web Based AI Video Studio (Vivijure)

1•skyphusion•10m ago•0 comments

I Stopped Destructuring Everything

https://allthingssmitty.com/2026/07/13/i-stopped-destructuring-everything/
1•AllThingsSmitty•10m ago•0 comments

Show HN: Costbase – See what each of your AI apps costs, without a proxy

https://costbase.co
2•yidaman•12m ago•0 comments

The Emperor's New Xerox

https://ianreppel.org/the-emperors-new-xerox/
2•mvac•13m ago•0 comments

Show HN: Hypothesis Prism, a graph representation of a paper's hypothesis

https://hypothesisprism.com
1•ayasamadzelkava•13m ago•0 comments

The Chinese Communist Party turns 105 amidst technological splendor

https://english.elpais.com/international/2026-07-10/the-chinese-communist-party-turns-105-amidst-...
2•geox•16m ago•0 comments

UK Bans Support for Iran's Islamic Revolutionary Guard Corps

https://www.bbc.co.uk/news/articles/cz0jkj7e87go
1•jjgreen•18m ago•0 comments

Christopher Nolan says people disdain AI, idea it'll replace humans is nonsense

https://www.theguardian.com/film/2026/jul/13/christopher-nolan-odyssey-director-comments-ai-artif...
2•thm•20m ago•0 comments

Borrow-Checking Surprises

https://www.scattered-thoughts.net/writing/borrow-checking-surprises/
1•surprisetalk•20m ago•0 comments

Building AI Agents? Here Are Some Anti-Patterns to Avoid

https://machinelearningmastery.com/building-ai-agents-here-are-some-anti-patterns-to-avoid/
1•eigenBasis•20m ago•0 comments

TeamBrain – Git-Native Shared Memory for Claude Code, Cursor and Codex

https://teambrain-site.netlify.app/
1•DonatienMigue•22m ago•0 comments

MCP with Keycloak, Claude, Codex and a Whole Lot of Coffee

https://blog.priyavijai-kalyan2007.workers.dev/mcp-via-keycloak-with-claude-codex-coffee/
1•oldnewthing•22m ago•0 comments

Major Setbacks for Nvidia Kyber NVL144

https://twitter.com/SemiAnalysis_/status/2073874671498387899
1•doener•22m ago•0 comments

Hoarding in Summer

https://matt-schellhas.medium.com/hoarding-in-summer-fdaf9ec1834d
1•mooreds•28m ago•0 comments

Agentgateway adds token exchange, JWT-assertion, and Entra OBO

https://agentgateway.dev/blog/2026-07-12-agentgateway-token-exchange-jwt-assertion-entra-obo/
1•mooreds•30m ago•0 comments

AI boom to drive €6.8B in water spend for European data centres by 2036

https://www.watermagazine.co.uk/2026/07/13/ai-boom-to-drive-e6-8-billion-in-water-spend-for-europ...
1•technewssss•32m ago•0 comments

A Linux compatible kernel written in Zig that runs Linux binaries in the browser

https://github.com/michaelkremenetsky/linuxemu
2•michaelkrem•32m ago•0 comments

Alomware Toolbox: Windows tool prevents OLED screen burn-in

https://www.computerbild.de/artikel/Tipps-Windows-Alomware-Toolbox-Windows-Tool-verhindert-OLED-B...
1•BarryGuff•33m ago•1 comments

Mistral, Europe's AI Darling, Fails FLI Safety Index

https://mrkt30.com/mistral-europes-ai-darling-fails-fli-safety-index/
2•technewssss•33m ago•0 comments

MongoDB Query Mistakes That Return the Wrong Results

https://visualeaf.com/blog/mongodb-query-mistakes-wrong-results/
2•mike_codes•34m ago•0 comments

A restaurant menu demonstrates the frightening power of inflation

https://tipswatch.com/2026/07/12/a-restaurant-menu-demonstrates-the-frightening-effects-of-inflat...
1•mooreds•38m ago•0 comments

Show HN: Live MRR in your X bio, on autopilot. Screenshots expire–Nuvio doesn't

https://www.nuvio.so
2•launchpact_io•39m ago•0 comments

Intel Invests €5B to Expand Manufacturing in Europe

https://newsroom.intel.com/intel-foundry/intel-invests-5-billion-euro-to-expand-manufacturing-in-...
1•osnium123•40m ago•0 comments

ITR 3 vs. ITR 4 Difference: Key Rules, Benefits and Process – SMFG India Credit

https://www.smfgindiacredit.com/knowledge-center/itr-3-vs-itr-4-difference.aspx
1•saumyaraut11•40m ago•0 comments