datamule 2.2.6__py3-none-any.whl → 2.2.7__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/document.py +16 -17
- {datamule-2.2.6.dist-info → datamule-2.2.7.dist-info}/METADATA +1 -1
- {datamule-2.2.6.dist-info → datamule-2.2.7.dist-info}/RECORD +5 -5
- {datamule-2.2.6.dist-info → datamule-2.2.7.dist-info}/WHEEL +0 -0
- {datamule-2.2.6.dist-info → datamule-2.2.7.dist-info}/top_level.txt +0 -0
datamule/document/document.py
CHANGED
@@ -417,14 +417,15 @@ class Document:
|
|
417
417
|
|
418
418
|
@property
|
419
419
|
def data(self):
|
420
|
-
if self.
|
421
|
-
self.
|
420
|
+
if self._data_bool:
|
421
|
+
if self._data is None:
|
422
|
+
self.parse()
|
422
423
|
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
424
|
+
if self._data is None:
|
425
|
+
self._data = {}
|
426
|
+
|
427
|
+
if not isinstance(self._data, DataWithTags):
|
428
|
+
self._data = DataWithTags(self._data, self)
|
428
429
|
|
429
430
|
return self._data
|
430
431
|
|
@@ -556,18 +557,16 @@ class Document:
|
|
556
557
|
webbrowser.open('file://' + temp_path)
|
557
558
|
else:
|
558
559
|
print(f"Cannot open files with extension {self.extension}")
|
559
|
-
|
560
560
|
def get_section(self, title=None, title_regex=None,title_class=None, format='dict'):
|
561
|
-
if
|
562
|
-
self.
|
563
|
-
|
564
|
-
result = get_title(self.data,title=title,title_regex=title_regex,title_class=title_class)
|
561
|
+
if self._data_bool:
|
562
|
+
if not self.data:
|
563
|
+
self.parse()
|
565
564
|
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
565
|
+
result = get_title(self.data,title=title,title_regex=title_regex,title_class=title_class)
|
566
|
+
if format == 'dict':
|
567
|
+
return [item[1] for item in result]
|
568
|
+
else:
|
569
|
+
return [flatten_dict(item[1],format) for item in result]
|
571
570
|
|
572
571
|
|
573
572
|
# TODO CHANGE THIS
|
@@ -15,7 +15,7 @@ datamule/datamule/datamule_mysql_rds.py,sha256=Q6_h24-SNECWK60RnM6UQjUIp5dhJmfn3
|
|
15
15
|
datamule/datamule/downloader.py,sha256=B22ULAuYzclxxVCH4DsLWUIyFUC5Iep-Hl1W3RgCfeg,18580
|
16
16
|
datamule/datamule/sec_connector.py,sha256=VwOaODpHoAWy8JIky6kLR1-orW_PB61RHw7pIGRpkow,3288
|
17
17
|
datamule/document/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
datamule/document/document.py,sha256=
|
18
|
+
datamule/document/document.py,sha256=tFsNUMVeBvx_3Td5bKPMlEJGjyzQtac4tui8jk2PusE,24629
|
19
19
|
datamule/document/tables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
20
20
|
datamule/document/tables/tables.py,sha256=8riSAof6o-Gxoo0SkiQAE61fw8NmzDnEhJe6dATzmvA,4487
|
21
21
|
datamule/document/tables/tables_13fhr.py,sha256=-6tWcaTyNsb0XuW0WMBrYir9Zn1wLZL0laKxRYfPNyg,4265
|
@@ -57,7 +57,7 @@ datamule/tags/utils.py,sha256=6B0jtwiFMQAU5mmdqWX_ZRa76uREY-DUBdM_ttt9cXk,6261
|
|
57
57
|
datamule/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
58
58
|
datamule/utils/construct_submissions_data.py,sha256=NB_hvfxlRXPyt4Fgc-5qA8vJRItkLhBedCSTaxwW7Jg,5887
|
59
59
|
datamule/utils/format_accession.py,sha256=60RtqoNqoT9zSKVb1DeOv1gncJxzPTFMNW4SNOVmC_g,476
|
60
|
-
datamule-2.2.
|
61
|
-
datamule-2.2.
|
62
|
-
datamule-2.2.
|
63
|
-
datamule-2.2.
|
60
|
+
datamule-2.2.7.dist-info/METADATA,sha256=WMBfQuS6vgKcVlP04FGpD0BWDMU2nRaMVU_lsFQd9T4,585
|
61
|
+
datamule-2.2.7.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
62
|
+
datamule-2.2.7.dist-info/top_level.txt,sha256=iOfgmtSMFVyr7JGl_bYSTDry79JbmsG4p8zKq89ktKk,9
|
63
|
+
datamule-2.2.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|