Skip to main content

*** Overall project description goes here ***

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

replacemarkersindocxajm-0.2.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

replacemarkersindocxajm-0.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file replacemarkersindocxajm-0.2.tar.gz.

File metadata

  • Download URL: replacemarkersindocxajm-0.2.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for replacemarkersindocxajm-0.2.tar.gz
Algorithm Hash digest
SHA256 77147434eea8e87092007c7791c863ef422c5966c296867b86017d6190737555
MD5 f01226ec5dbd88c2b17db38e8d43a43f
BLAKE2b-256 c0b0c23efc2bf3f77537821bf25df4bc0457f492582d38685ad7bfdb709dfbf5

See more details on using hashes here.

File details

Details for the file replacemarkersindocxajm-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for replacemarkersindocxajm-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0c71213003cd464701414fdea4a66e3416141d0356b96b4acc022674704d07eb
MD5 fc31ef4d113054e26ba5af675574fc4f
BLAKE2b-256 a7bc3144dfe13431cff26a478a11772583b1ae2b1977170cf92d1a5c2018032f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page