Bionic Reading is a reading system that supports the reading flow by guiding the eye through the text using typographic highlights.
Bionic Document Converter – program that will apply the Bionic Reading technique to all open documents and save them as a Bionic Reading enabled document.
This Python script is using the win32com.client library to interact with Microsoft Word documents. Here’s a step-by-step explanation of what it does:
- It imports necessary libraries: os, win32com.client, and math.
- It creates a Word application object using win32.gencache.EnsureDispatch(‘Word.Application’).
- It iterates over all open Word documents.
- For each document, it iterates over all paragraphs, and for each paragraph, it iterates over all sentences, and for each sentence, it iterates over all words.
- For each word, it splits the word into two halves (with the first half being larger if the word length is odd). It then applies bold formatting to the first half of the word and leaves the second half unbolded.
- After processing all words in a paragraph, it changes the font of the entire paragraph to ‘Calibri (Body)’ and sets the font size to 12.
After processing all paragraphs in a document, it changes the page colour of the document to light yellow.- Finally, it saves the modified document in the same location as the original document but with a new name that is prefixed with ‘bionic_enabled_’.
- After processing all documents, it quits the Word application.
Please note that this script requires that you have Microsoft Word installed on your machine and that you have the necessary permissions to modify and save documents.
PYTHON
bionic_python.txt