datamule 1.0.6__py3-none-any.whl → 1.0.8__py3-none-any.whl
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.
- datamule/document.py +8 -8
- {datamule-1.0.6.dist-info → datamule-1.0.8.dist-info}/METADATA +1 -1
- {datamule-1.0.6.dist-info → datamule-1.0.8.dist-info}/RECORD +5 -5
- {datamule-1.0.6.dist-info → datamule-1.0.8.dist-info}/WHEEL +0 -0
- {datamule-1.0.6.dist-info → datamule-1.0.8.dist-info}/top_level.txt +0 -0
datamule/document.py
CHANGED
@@ -3,8 +3,8 @@ import csv
|
|
3
3
|
import re
|
4
4
|
from doc2dict import xml2dict, txt2dict, dict2dict
|
5
5
|
from doc2dict.mapping import flatten_hierarchy
|
6
|
-
from .mapping_dicts import
|
7
|
-
from .mapping_dicts import
|
6
|
+
from .mapping_dicts.txt_mapping_dicts import dict_10k, dict_10q, dict_8k, dict_13d, dict_13g
|
7
|
+
from .mapping_dicts.xml_mapping_dicts import dict_345
|
8
8
|
from selectolax.parser import HTMLParser
|
9
9
|
|
10
10
|
class Document:
|
@@ -106,7 +106,7 @@ class Document:
|
|
106
106
|
|
107
107
|
if self.path.suffix == '.xml':
|
108
108
|
if self.type in ['3', '4', '5']:
|
109
|
-
mapping_dict =
|
109
|
+
mapping_dict = dict_345
|
110
110
|
|
111
111
|
self.load_content()
|
112
112
|
self.data = xml2dict(content=self.content, mapping_dict=mapping_dict)
|
@@ -115,15 +115,15 @@ class Document:
|
|
115
115
|
self._load_file_content()
|
116
116
|
|
117
117
|
if self.type == '10-K':
|
118
|
-
mapping_dict =
|
118
|
+
mapping_dict = dict_10k
|
119
119
|
elif self.type == '10-Q':
|
120
|
-
mapping_dict =
|
120
|
+
mapping_dict = dict_10q
|
121
121
|
elif self.type == '8-K':
|
122
|
-
mapping_dict =
|
122
|
+
mapping_dict = dict_8k
|
123
123
|
elif self.type == 'SC 13D':
|
124
|
-
mapping_dict =
|
124
|
+
mapping_dict = dict_13d
|
125
125
|
elif self.type == 'SC 13G':
|
126
|
-
mapping_dict =
|
126
|
+
mapping_dict = dict_13g
|
127
127
|
|
128
128
|
self.data = {}
|
129
129
|
self.data['document'] = dict2dict(txt2dict(content=self.content, mapping_dict=mapping_dict))
|
@@ -1,10 +1,10 @@
|
|
1
1
|
datamule/__init__.py,sha256=0npnB3i2F7YB7etG315oDiCd-eMo-A6MP5LX2gQclHY,914
|
2
2
|
datamule/config.py,sha256=Y--CVv7JcgrjJkMOSLrvm2S8B9ost6RMSkGviP-MKtg,883
|
3
|
-
datamule/document.py,sha256=
|
3
|
+
datamule/document.py,sha256=BC8jdVy9pMOA9ghIqV5N2XJidmVNThqbBohsuSAnVoY,10813
|
4
4
|
datamule/helper.py,sha256=xgOVnea-lUlQ5I-U0vYUp0VeKPNZehNhqjJvegA3lYE,3342
|
5
5
|
datamule/portfolio.py,sha256=JmZlTrom_g7FXKXxWp_CiQTyC7p6_cDP08G0kFUja48,6982
|
6
6
|
datamule/submission.py,sha256=JsxYlEz1Ywu6eC32OS15p4p-p8qB6SWd_rXuf2p5UfY,1247
|
7
|
-
datamule-1.0.
|
8
|
-
datamule-1.0.
|
9
|
-
datamule-1.0.
|
10
|
-
datamule-1.0.
|
7
|
+
datamule-1.0.8.dist-info/METADATA,sha256=RQZAJygj51jptYJPCRPZ10r1I_PNALFqkdriHLeAHc4,512
|
8
|
+
datamule-1.0.8.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
9
|
+
datamule-1.0.8.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
|
10
|
+
datamule-1.0.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|