{"repo":"guigrpa/docx-templates","free":true,"listed":false,"github":"https://github.com/guigrpa/docx-templates","clone":"git clone https://github.com/guigrpa/docx-templates.git","description":"Template-based docx report creation","language":"TypeScript","stars":1090,"topics":["docx","ms-word","docx-file","docx-generator","template","reporting"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"Docx-templates Template-based docx report creation for both Node and the browser. (See the blog post). Why? Write documents naturally using Word , just adding some commands where needed for dynamic contents Express your data needs (queries) in the template itself ( QUERY command), in whatever query language you want (e.g. in GraphQL). This is similar to the Relay way™ : in Relay, data requirements are declared alongside the React components that need the data Execute JavaScript snippets ( EXEC command, or ! for short) Insert the result of JavaScript snippets in your document ( INS , = or just nothing ) Embed images, hyperlinks and even HTML dynamically ( IMAGE , LINK , HTML ). Dynamic images can be great for on-the-fly QR codes, downloading photos straight to your reports, charts… even maps! Add loops with FOR / END-FOR commands, with support for table rows, nested loops, and JavaScript processing of elements (filter, sort, etc) Include contents conditionally , IF a certain JavaScript expression is truthy Define custom aliases for some commands ( ALIAS ) — useful for writing table templates! Run all JavaScript in a separate Node VM or a user-provided sandbox. Include literal XML Written in TypeScript, so ships with type definitions. Plenty of examples in this repo (with Node, Webpack and Browserify) Supports .docm templates in addition to regular .docx files. Contributions are welcome! Table of contents - Installation - Node usage - Deno usage - Browser usage - Polyfilled bro","default_branch":null,"files":null,"tree":[],"storefront":"/r/guigrpa","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/guigrpa/docx-templates/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}