This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Converts a docx file with tables and images to a new docx file | |
# The new file is based on a 'stub' document which contains preamble text and styles | |
# | |
# Requires the Python module 'python-docx' <https://python-docx.readthedocs.io> | |
# Written for Python 3 | |
# | |
# Source documents are taken from the directory 'source' and converted documents are saved | |
# to the directory 'converted' | |
# | |
# Two types of source documents are handled: 'Fiscal Guide' or 'Economics Regime'. Each one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding=utf-8 | |
# License: Public domain (CC0) | |
# Isaac Turner 2016/12/05 | |
from __future__ import print_function | |
import difflib | |
import re |