Metadata-Version: 1.1
Name: docx-mailmerge
Version: 0.1.0
Summary: Performs a Mail Merge on docx (Microsoft Office Word) files
Home-page: http://github.com/Bouke/docx-mailmerge
Author: Bouke Haarsma
Author-email: bouke@webatoom.nl
License: MIT
Description: ===============
        docx Mail Merge
        ===============
        
        Installation with ``pip``:
        ::
        
            $ pip install docx-mailmerge
        
        
        Usage
        =====
        
        Read the file.
        ::
        
            from mailmerge import MailMerge
            document = MailMerge('input.docx')
        
        
        List all merge fields.
        ::
        
            print document.get_merge_fields()
        
        
        Merge fields, supplied as kwargs.
        ::
        
            document.merge(field1='docx Mail Merge',
                           field2='Can be used for merging docx documents')
        
        Merge table rows. In your template, add a MergeField to the row you would like
        to designate as template. Supply the name of this MergeField as ``anchor``
        parameter. The second parameter contains the rows with key-value pairs for
        the MergeField replacements.
        ::
        
            document.merge_rows('col1',
                                [{'col1': 'Row 1, Column 1', 'col2': 'Row 1 Column 1'},
                                 {'col1': 'Row 2, Column 1', 'col2': 'Row 2 Column 1'},
                                 {'col1': 'Row 3, Column 1', 'col2': 'Row 3 Column 1'}]
        
        
        Write document to file. This should be a new file, as ``ZipFile`` cannot modify
        existing zip files.
        ::
        
            document.write('output.docx')
        
        
        Todo / Wish List
        ================
        
        * Preserve formatting of the merge field, currently it defaults to the
          formatting of the containing text.
        * Image merging.
        
        Contributing
        ============
        
        * Fork the repository on GitHub and start hacking
        * Send a pull request with your changes
        
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Topic :: Text Processing
