Skip to main content

ReplaceMarkersInDocxAJM

Facilitates the process of manipulating placeholders, referred to as "mail merge markers" in a Word document (.docx).

This module provides a class, ReplaceMarkersInDocx, that facilitates the process of manipulating placeholders referred to as "mail merge markers" in a Word document (.docx). It offers features for extracting and replacing these markers, ensuring seamless customization of document templates used in mail merges or similar scenarios.

Key Features:

  • Extract mail merge markers from different parts of a Word document, including paragraphs, headers, and footers.
  • Replace markers dynamically with values from an external dictionary (info_dict), allowing for the generation of customized output documents.
  • Validate the integrity of the information dictionary (info_dict) against the markers present in the document.
  • Modify document styles and alignments based on specific markers.

Dependencies:

  • python-docx library for manipulating Word documents.
  • abc module for abstract method definitions.
  • re module for regular expression handling.

Classes:

  • ReplaceMarkersInDocx: The main class containing methods and properties to handle placeholders (markers) within a Word document. This class also supports customization through class-level constants and initialization parameters.

Usage: The ReplaceMarkersInDocx class is designed to be extended for specific use cases. Subclasses should implement the standardize_paragraph_style abstract method as per the desired functionality.

Example: This module is commonly used to replace placeholders in document templates such as:

  • Generating personalized letters.
  • Populating certificates with specific recipient information.
  • Dynamically modifying document content for mail merge operations.

Metadata

Release files for ReplaceMarkersInDocxAJM 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ReplaceMarkersInDocxAJM 0.2
File Size Uploaded
replacemarkersindocxajm-0.2.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ReplaceMarkersInDocxAJM 0.2
File Interpreter ABI Platform
replacemarkersindocxajm-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.4 kB

Release files / replacemarkersindocxajm-0.2.tar.gz

Download URL replacemarkersindocxajm-0.2.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
77147434eea8e87092007c7791c863ef422c5966c296867b86017d6190737555
BLAKE2b-256 checksum
How to use checksums
c0b0c23efc2bf3f77537821bf25df4bc0457f492582d38685ad7bfdb709dfbf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / replacemarkersindocxajm-0.2-py3-none-any.whl

Download URL replacemarkersindocxajm-0.2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0c71213003cd464701414fdea4a66e3416141d0356b96b4acc022674704d07eb
BLAKE2b-256 checksum
How to use checksums
a7bc3144dfe13431cff26a478a11772583b1ae2b1977170cf92d1a5c2018032f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page