Live data from Hacker News

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

github.com

21–30 of 43 posts

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

#21
post #2

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…

Sounds to good to be true, but it works for the given examples! What is the scope though? It produces garbage with larger documents with tables and figures. For example this large document, even with removed menu and headings: https://docs.redhat.com/en/documentation/red_hat_enterprise_... Could it be it has only been fed small documents?

All of the suite test cases are small fragments of HTML to test specific things, so I probably do need a way to test bigger documents. Thanks for the feedback. I’ll add that to the to-do list.

I’ll try the red hat example later this evening.

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

#22

this is cool. I'm curious how many tokens ($) it cost you to build? i'm also building in this space (an MCP for agents to manipulate docx)

I did everything with the Cursor $20 plan and the Claude Code $20 plan, so in this particular case it wasn’t actually that many tokens. This was over the course of about four weeks of weekend and evening work.

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

#23
post #2

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…

Interesting but how is an "autoresearch loop" different than creating a spec and X number of testcases and letting an agent run against these testcases and the spec?

Scoring would probably be the big difference because the outcome is to optimize performance or optimize a score or a metric versus just a pass fail.

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

#25
post #2

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…

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.

In my experience a docx that looks good in libreoffice usually looks good in word, it's the other way around that is usually more of a problem.

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

#27
post #20

Good work on the effort to the author. And every time y'all, how absurd is it that this still has to exist? It never stops being wild to me.

I don’t completely follow. Why is it absurd to want to generate documents that are editable by humans?

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

#29
post #20

Good work on the effort to the author. And every time y'all, how absurd is it that this still has to exist? It never stops being wild to me.

I don’t completely follow. Why is it absurd to want to generate documents that are editable by humans?

No, I mean it's absurd that a horrible "standard" like a Word Doc has such staying power, and that we have to keep writing things against it.

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

#30
post #29

Earlier quoted context omitted.

I don’t completely follow. Why is it absurd to want to generate documents that are editable by humans?

No, I mean it's absurd that a horrible "standard" like a Word Doc has such staying power, and that we have to keep writing things against it.

Since HTML is so rich and the DX is amazing these days, I wish HTML file sharing for the document use case (and using the browser as a client) was widely accepted, it’s another problem/opportunity I’ve pondered a lot.
Post reply on HN