- v1.1.8
This commit is contained in:
1 parent
70144c8fe1
commit
b491cd2181
4 files changed
+33
-21
No files matched your search
@@ -86,7 +86,7 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
__version__ = (1, 1, 7)
|
__version__ = (1, 1, 8)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(
|
print(
|
||||||
|
|||||||
+30
-18
@@ -17,22 +17,34 @@ if not os.path.exists(OUTPUT_FOLDER):
|
|||||||
|
|
||||||
files = os.listdir(INPUT_FOLDER)
|
files = os.listdir(INPUT_FOLDER)
|
||||||
|
|
||||||
TOTAL = len(files)
|
input_file_path = '/media/ari/sd/projects/School/Schulich/acp/pdf-extraction/data/input/Supplemental_User_Agreement_Settlement_Custodian.pdf'
|
||||||
for idx, file_name in enumerate(files):
|
output_file_path = os.path.join(OUTPUT_FOLDER, 'demo.xml')
|
||||||
file_name_no_ext = re.sub(r'\.pdf$',"", file_name)
|
|
||||||
input_file_path = os.path.join(INPUT_FOLDER, file_name)
|
|
||||||
output_file_path = os.path.join(OUTPUT_FOLDER, file_name_no_ext + "." + EXT)
|
|
||||||
|
|
||||||
if len(file_name) > len(file_name_no_ext):
|
with open(input_file_path, 'rb') as input_file:
|
||||||
print(f"processing {file_name} {idx}/{TOTAL}")
|
with open(output_file_path, 'wb') as output_file:
|
||||||
with open(input_file_path, 'rb') as input_file:
|
convert_file(
|
||||||
with open(output_file_path, 'wb') as output_file:
|
input_file=input_file,
|
||||||
convert_file(
|
output_file=output_file,
|
||||||
input_file=input_file,
|
out_type=EXT,
|
||||||
output_file=output_file,
|
debug=True,
|
||||||
out_type=EXT,
|
)
|
||||||
debug=True,
|
|
||||||
)
|
# TOTAL = len(files)
|
||||||
print(f" > testing format {file_name} {idx}/{TOTAL}")
|
# for idx, file_name in enumerate(files):
|
||||||
ElementTree.parse(output_file_path)
|
# file_name_no_ext = re.sub(r'\.pdf$',"", file_name)
|
||||||
print(f"processing {idx+1}/{TOTAL}")
|
# input_file_path = os.path.join(INPUT_FOLDER, file_name)
|
||||||
|
# output_file_path = os.path.join(OUTPUT_FOLDER, file_name_no_ext + "." + EXT)
|
||||||
|
|
||||||
|
# if len(file_name) > len(file_name_no_ext):
|
||||||
|
# print(f"processing {file_name} {idx}/{TOTAL}")
|
||||||
|
# with open(input_file_path, 'rb') as input_file:
|
||||||
|
# with open(output_file_path, 'wb') as output_file:
|
||||||
|
# convert_file(
|
||||||
|
# input_file=input_file,
|
||||||
|
# output_file=output_file,
|
||||||
|
# out_type=EXT,
|
||||||
|
# debug=True,
|
||||||
|
# )
|
||||||
|
# print(f" > testing format {file_name} {idx}/{TOTAL}")
|
||||||
|
# ElementTree.parse(output_file_path)
|
||||||
|
# print(f"processing {idx+1}/{TOTAL}")
|
||||||
@@ -10,7 +10,7 @@ import sys
|
|||||||
with open('README.md') as readme_file:
|
with open('README.md') as readme_file:
|
||||||
SETUP = {
|
SETUP = {
|
||||||
"name": "pdfmajor",
|
"name": "pdfmajor",
|
||||||
"version": "1.1.7",
|
"version": "1.1.8",
|
||||||
"packages": find_packages(include=['pdfmajor*']),
|
"packages": find_packages(include=['pdfmajor*']),
|
||||||
"install_requires": [
|
"install_requires": [
|
||||||
'pycryptodome',
|
'pycryptodome',
|
||||||
|
|||||||
Reference in new issue
Block a user