Metadata-Version: 2.4
Name: docxtexthighlighter
Version: 1.0.0
Summary: A package that helps to highlight words in your docx file, and generate a new docx file with the highlighted words.
Author: mq
Author-email: mq <mq@example.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Requires-Dist: lxml>=3.1.0
Requires-Dist: typing-extensions>=4.9.0
Requires-Dist: python-docx>=1.2.0
Requires-Python: >=3.9
Project-URL: Homepage, https://github.com/Weeerocks/Text-Highlighter
Project-URL: Issues, https://github.com/Weeerocks/Text-Highlighter/issues
Description-Content-Type: text/markdown

# Bold Words in Text Function

This Python function allows you to bold specific words or phrases in a `.docx` document. It is designed to work with the `python-docx` library and supports flexible, case-insensitive matching to bold target phrases while respecting word boundaries.

## Features
- **Case-insensitive matching**: The function matches words regardless of casing.
- **Word boundaries**: Ensures only full words are matched, avoiding partial matches inside larger words.
- **Support for multiple phrases**: You can pass a list of phrases to be bolded in the document.


## How to install

Run the following commands:

```$ pip install docxtexthighlighter```


## Example


```
>>> from docxtexthighlighter import bold_words_in_text

>>> list_of_words_to_be_bolded = ['dogs', 'cats', 'birds']

>>> bold_words_in_text('path/to/your/docx/file', list_of_words_to_be_bolded, output_path='path/to/your/output/location')

"Document has been saved to this path: 'path/to/your/output/location'"

```

## Notes

By default, the function saves the output to your current working directory as 'output.docx'.