This repository has been archived by the owner on Apr 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
rewrite to support formatting and nesting fields #103
Open
iulica
wants to merge
63
commits into
Bouke:master
Choose a base branch
from
iulica:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…atting and IF instruction, if the full IF instruction stays in the same paragraph. Removed support for merge_rows.
…pdate_fields_on_open=auto flag
…pe element, some comments
The rewrite code is split into 4 different classes: |
…ementing multiple flags (issue Bouke#40), raise warnings instead of exception on invalid field instructions
plan to release as v. 0.6.0 instead of 0.5.0, updated the documentation
Credits and link to the original repository.
Fixed the Credits topic
Changed the author and the release name to docx-mailmerge2
Removed NEXT and added SKIPIF
Added content type footnotes+xml so mail merge fields are supported
Revert "Added content type footnotes+xml so mail merge fields are supported"
Adds failed test for merge_templates footnotes Fix for handling footnotes when merging a single documents
Refactored test_nested_fields.py Added draft support for merge_params (update the fields instead of replacing them) Added tests for merge fields (still incomplete)
Tests for UniqueIdsManager Refactor Mailmerge.parts to be more flexible for handling different categories of parts Refactor settings with the new category of parts
Refactored some tests to use the generic document extraction method Added support for adding new XML files in the docx. (new headers/footers) Added support for various generation of IDs in the docx Refactored the parts so that all docx files can be handled in a generic way. Refactored the settings using the parts.
A new method to insert dynamic images.
removed TODO item as no longer on the list
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The changes implement support for MERGE fields inside other fields, and formatting flags.
Description
Fields spanning several paragraphs are detected and proper integration with MERGEFIELDS values is implemented.
Number and text formatting and flags are implemented.
Support for date formatting is added, but not yet implemented.
A framework for easier testing of formats is also added along with tests for all changes.
Previous tests are also passed, although some tests are incorrect. For those tests a flag is implemented to be able to remove the workarounds for those tests after review.
When documents with nested fields are created, these documents need to be updated, by selecting the whole document and pressing F9. There is a flag for auto-updating all fields when opening the document. Support for setting this flag is also added (no, always, auto). Default is no, for backward compatibility.
Motivation and Context
It allows using more complex documents, that have formatting and complex fields.
Several issues are solved, mostly about using MERGEFIELDS inside other fields like IF or INCLUDEPICTURE.
#102 #88 #80 #78 #60 #52 #40
How Has This Been Tested?
All the changes have their own tests.
Screenshots (if appropriate):
Types of changes
Checklist: