DataComparerLibrary 0.847__tar.gz → 0.848__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/PKG-INFO +1 -1
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/fileconverter.py +0 -25
- datacomparerlibrary-0.848/src/DataComparerLibrary/version.py +3 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary.egg-info/PKG-INFO +1 -1
- datacomparerlibrary-0.847/src/DataComparerLibrary/version.py +0 -3
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/LICENSE.txt +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/README.rst +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/pyproject.toml +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/setup.cfg +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/setup.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/__init__.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/datacomparer.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/datasorter.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/datetimehandler.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/delimitertranslator.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/field.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/report.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/row.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/tools.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/twodarray.py +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary.egg-info/SOURCES.txt +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary.egg-info/dependency_links.txt +0 -0
- {datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DataComparerLibrary
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.848
|
|
4
4
|
Summary: For comparing csv-files, 2d-array with a csv-file or 2d-arrays. For comparing text-files, text variable with a text-file or text variables. Including a sorting module.
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: René Philip Zuijderduijn
|
{datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/fileconverter.py
RENAMED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
# Currently, methods are implemented to remove or replace a separate linefeed within a record. Records are ended by carriage return linefeed.
|
|
4
4
|
#
|
|
5
5
|
import csv
|
|
6
|
-
import openpyxl
|
|
7
6
|
import os
|
|
8
7
|
import re
|
|
9
8
|
import warnings
|
|
@@ -67,27 +66,3 @@ class FileConverter:
|
|
|
67
66
|
#
|
|
68
67
|
return output
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
@staticmethod
|
|
72
|
-
def convert_excel_file_to_csv_file(excel_file, csv_file):
|
|
73
|
-
if not os.path.exists(excel_file):
|
|
74
|
-
raise Exception("Input file doesn't exists: ", excel_file)
|
|
75
|
-
|
|
76
|
-
if not excel_file.endswith('.xslx') and not excel_file.endswith('.xslm') and not excel_file.endswith('.xls') and not excel_file.endswith('.xlm'):
|
|
77
|
-
raise Exception("Input file is not a Excel-file: ", excel_file)
|
|
78
|
-
|
|
79
|
-
if not excel_file.endswith('.csv'):
|
|
80
|
-
raise Exception("Input file is not a csv-file: ", csv_file)
|
|
81
|
-
|
|
82
|
-
with warnings.catch_warnings():
|
|
83
|
-
warnings.filterwarnings("ignore", message="Workbook contains no defaultstyle", category=UserWarning)
|
|
84
|
-
#
|
|
85
|
-
excel = openpyxl.load_workbook(excel_file)
|
|
86
|
-
# select the active sheet
|
|
87
|
-
sheet = excel.active
|
|
88
|
-
#
|
|
89
|
-
# write the data in a csv-file
|
|
90
|
-
col = csv.writer(open(csv_file, 'w', newline=""))
|
|
91
|
-
#
|
|
92
|
-
for row in sheet.rows:
|
|
93
|
-
col.writerow([cell.value for cell in row])
|
{datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: DataComparerLibrary
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.848
|
|
4
4
|
Summary: For comparing csv-files, 2d-array with a csv-file or 2d-arrays. For comparing text-files, text variable with a text-file or text variables. Including a sorting module.
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: René Philip Zuijderduijn
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/datacomparer.py
RENAMED
|
File without changes
|
{datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/datasorter.py
RENAMED
|
File without changes
|
{datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/datetimehandler.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary/twodarray.py
RENAMED
|
File without changes
|
{datacomparerlibrary-0.847 → datacomparerlibrary-0.848}/src/DataComparerLibrary.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|