docx icon indicating copy to clipboard operation
docx copied to clipboard

RFC: Ability to create a new document file

Open alvinpeters opened this issue 2 years ago • 1 comments

Problem

This gem provides you no way of generating a .docx file, which would have been nice to have to give the user a blank slate to work on. There are gems that can generate a .docx file like puredocx (https://github.com/jetruby/puredocx) and caracal (https://github.com/urvin-compliance/caracal) but they are kinda mothballed right now.

Requesting for comments because I don't know whether this gem should even bother with document generation, but I reckon it'd be a nice feature to have. Guess this will somehow solve #54 lol

Solution

Give the Document.new or a new Document.create method the ability to create a new .docx file either by using the template XMLs shipped with the gem like puredocx (https://github.com/jetruby/puredocx/tree/master/lib/template) or through whatever caracal uses (haven't read much of its code yet lol.) I can submit a prototype PR next week I reckon.

Alternative solutions

None, maybe it's just out of scope then that's alright too.

alvinpeters avatar Sep 17 '23 12:09 alvinpeters

Would also appreciate and use a new document option.

jeremedia avatar Dec 13 '23 21:12 jeremedia