SciDocx2WebUI module

Convert scientific papers in DOCX format to HTML. See this project’s GitHub page for more info: https://github.com/Fulminis-ictus/SciDocx2Web

This module displays the GUI and calls SciDocx2WebConversion to start the actual conversion process.

Documentation last updated: 2023.06.03

Author: Tim Reichert

Version: 1.0 (first public release)

Uses and is dependent on Mammoth: https://github.com/mwilliamson/python-mammoth

Makes use of dwasyl’s added page break detection functionailty: https://github.com/dwasyl/python-mammoth/commit/38777ee623b60e6b8b313e1e63f12dafd82b63a4

SciDocx2WebUI.ableAbbreviateTooltips()[source]

Disables the “Abbreviate tooltips after how many symbols?” input field if “Add tooltips to footnotes?” is unchecked. Does the opposite if it’s checked.

SciDocx2WebUI.ableIgnorePNum()[source]

Disables the “Detect paragraphs that should not be numbered…” input field if “Number the paragraphs?” is unchecked. Does the opposite if it’s checked.

SciDocx2WebUI.ableNavigation()[source]

Disables the “Create navigation?” checkbox and the “Paragraph” and “Button” radio buttons if “Add IDs to headings?” is unchecked. Does the opposite if it’s checked.

SciDocx2WebUI.ableNavigationElement()[source]

Disables the “Paragraph” and “Button” radio buttons if “Create navigation?” is unchecked. Does the opposite if it’s checked.

SciDocx2WebUI.ablePageNum()[source]

Disables the “Which docx page should be counted…” input field if “Insert page numbers?” is unchecked. Does the opposite if it’s checked.

SciDocx2WebUI.ablePageTitleAndCssAndJavascript()[source]

Disables the “Page title” entry, “Add suggested css?” checkbox and “Add javascript to highlight navigation while scrolling?” checkbox if “Only export the body?” is checked. Does the opposite if it’s unchecked.

SciDocx2WebUI.convertAndExport()[source]

Converts a DOCX file to an HTML file and exports it by calling functions from SciDocx2WebConversion.py. Displays a “Success” message if conversion was successful.

SciDocx2WebUI.inputPathFunc()[source]

“Browse” button:

Prompts the user to choose the file that shall be converted and replaces the input path field text with the path of the chosen file.

SciDocx2WebUI.resetOptions()[source]

“Reset options” button:

Asks the user if they really want to reset the current options.

If yes: Resets options to their default state. The default state has been determined by the author of this software. Updates the GUI, writes new settings to the INI file and displays a message stating that settings have been reset successfully.

SciDocx2WebUI.saveOptions()[source]

“Save options” button:

Writes current settings to the INI file and display a message stating that settings has been saved successfully.

SciDocx2WebUI.submitFunc()[source]

“Convert” button:

Prompts the user to choose the output path. Starts the conversion process by calling “convertAndExport()”.

Throws an error if no input file has been chosen yet.