bionic_doc_converter


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:

  1. It imports necessary libraries: os, win32com.client, and math.
  2. It creates a Word application object using win32.gencache.EnsureDispatch(‘Word.Application’).
  3. It iterates over all open Word documents.
  4. 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.
  5. 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.
  6. 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.
  7. After processing all paragraphs in a document, it changes the page colour of the document to light yellow.
  8. 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_’.
  9. 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


Leave a Reply

Your email address will not be published. Required fields are marked *