create word doc file from linux command line
Asked Answered
O

2

2

I have some HTML files that I need to distribute in MS Word doc format (don't ask!). I can manually open each in OpenOffice and then save as a doc file. But I have quite a few files so I want to automate this. Do you know a way?

Othilia answered 17/12, 2009 at 11:29 Comment(1)
why does someone think this question should be closed?Othilia
D
2

Havn't tested but there is pyuno package to access OpenOffice API and following program show some ways to do like that.

ooextract.py

A command line tool, that extracts the text, html or pdf content from a StarWriter document and writes it to a different file or (optionally) prints it to stdout (grep your office documents).

Darcee answered 17/12, 2009 at 11:38 Comment(1)
looks neat - I will try it outOthilia
R
1

Abiword can convert files from the command line.

I haven't personally tried it to convert HTML to DOC, but since it supports both those formats, it seems like it's worth a try.

Also, would RTF be good enough? There are lots of converters for HTML->RTF.

Rexanne answered 17/12, 2009 at 14:17 Comment(1)
seems abiword can render to RTF but not doc from command lineOthilia

© 2022 - 2024 — McMap. All rights reserved.