Code Monkey home page Code Monkey logo

python-docx-template's Introduction

python-docx-template

Use a docx as a jinja2 template

Introduction

This package uses 2 major packages :

  • python-docx for reading, writing and creating sub documents
  • jinja2 for managing tags inserted into the template docx

python-docx-template has been created because python-docx is powerful for creating documents but not for modifying them.

The idea is to begin to create an example of the document you want to generate with microsoft word, it can be as complex as you want : pictures, index tables, footer, header, variables, anything you can do with word. Then, as you are still editing the document with microsoft word, you insert jinja2-like tags directly in the document. You save the document as a .docx file (xml format) : it will be your .docx template file.

Now you can use python-docx-template to generate as many word documents you want from this .docx template and context variables you will associate.

Share

If you like this project, please rate and share it here : http://rate.re/github/elapouya/python-docx-template

Documentation

Please, read the doc

Other projects

Have a look at some of my other projects :

python-docx-template's People

Contributors

alanoe avatar anhphamduy avatar anselal avatar arthaslixin avatar awesomo4000 avatar azelphur avatar chaberch avatar craigmbooth avatar dusty-phillips avatar edwinsmulders avatar ezequieltbh avatar hugokernel avatar idrisnacer avatar jarretraim avatar jfcorbett avatar jfdesrochers avatar jhpyle avatar jsve avatar komawar avatar majkls23 avatar mx2048 avatar mzetea avatar nickgashkov avatar nostalgiaz avatar rgusmero avatar robert-malai avatar teut2711 avatar timgates42 avatar vesatoivonen avatar wafi543 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.