py2ls 0.1.7.0__py3-none-any.whl → 0.1.7.2__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.
py2ls/netfinder.py
CHANGED
@@ -115,7 +115,7 @@ def extract_text_from_content(content, content_type="text/html", where=None, wha
|
|
115
115
|
if extend:
|
116
116
|
texts = ""
|
117
117
|
for tag in result_set:
|
118
|
-
texts
|
118
|
+
texts =texts+" "+ extract_text(tag) + "\n"
|
119
119
|
text_list = [tx.strip() for tx in texts.split("\n") if tx.strip()]
|
120
120
|
return text_list
|
121
121
|
else:
|
@@ -1062,37 +1062,33 @@ def find_all(url, dir_save=None, driver='req'):
|
|
1062
1062
|
return df
|
1063
1063
|
|
1064
1064
|
|
1065
|
-
def flist(fpath,
|
1065
|
+
def flist(fpath, kind="all"):
|
1066
1066
|
all_files = [os.path.join(fpath, f) for f in os.listdir(fpath) if os.path.isfile(os.path.join(fpath, f))]
|
1067
|
-
if
|
1068
|
-
|
1069
|
-
if isinstance(
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
return all_files
|
1077
|
-
else:
|
1078
|
-
filt_files = [f for f in all_files if istype(f, filter)]
|
1079
|
-
return filt_files
|
1067
|
+
if filter == "all" or 'all' in filter:
|
1068
|
+
return all_files
|
1069
|
+
if isinstance(kind, str):
|
1070
|
+
kind=[kind]
|
1071
|
+
filt_files=[]
|
1072
|
+
for kind_ in kind:
|
1073
|
+
if isa(f, kind_):
|
1074
|
+
filt_files.extend(flist(fpath, kind_))
|
1075
|
+
return filt_files
|
1080
1076
|
|
1081
|
-
def
|
1077
|
+
def isa(fpath, kind='img'):
|
1082
1078
|
"""
|
1083
|
-
|
1079
|
+
kinds file paths based on the specified kind.
|
1084
1080
|
Args:
|
1085
1081
|
fpath (str): Path to the file.
|
1086
|
-
|
1082
|
+
kind (str): kind of file to kind. Default is 'img' for images. Other options include 'doc' for documents,
|
1087
1083
|
'zip' for ZIP archives, and 'other' for other types of files.
|
1088
1084
|
Returns:
|
1089
|
-
bool: True if the file matches the
|
1085
|
+
bool: True if the file matches the kind, False otherwise.
|
1090
1086
|
"""
|
1091
|
-
if 'img' in
|
1087
|
+
if 'img' in kind.lower():
|
1092
1088
|
return is_image(fpath)
|
1093
|
-
elif 'doc' in
|
1089
|
+
elif 'doc' in kind.lower():
|
1094
1090
|
return is_document(fpath)
|
1095
|
-
elif 'zip' in
|
1091
|
+
elif 'zip' in kind.lower():
|
1096
1092
|
return is_zip(fpath)
|
1097
1093
|
else:
|
1098
1094
|
return False
|
@@ -135,13 +135,13 @@ py2ls/doc.py,sha256=xN3g1OWfoaGUhikbJ0NqbN5eKy1VZVvWwRlhHMgyVEc,4243
|
|
135
135
|
py2ls/export_requirements.py,sha256=x2WgUF0jYKz9GfA1MVKN-MdsM-oQ8yUeC6Ua8oCymio,2325
|
136
136
|
py2ls/freqanalysis.py,sha256=F4218VSPbgL5tnngh6xNCYuNnfR-F_QjECUUxrPYZss,32594
|
137
137
|
py2ls/ips.py,sha256=KkrkGAF0VQ-N0rH4FQFLyP-C-skY6EPpeO8t_5RngWw,88519
|
138
|
-
py2ls/netfinder.py,sha256=
|
138
|
+
py2ls/netfinder.py,sha256=ICl1P-M6DqZvnk5p3-ilMTb0nqy7BZwR0MvHctH5a0I,47107
|
139
139
|
py2ls/plot.py,sha256=8_33-1wpkGZrDUuvRBfTPUi_BRKdf1njoR725OLSLSY,48579
|
140
140
|
py2ls/setuptools-70.1.0-py3-none-any.whl,sha256=2bi3cUVal8ip86s0SOvgspteEF8SKLukECi-EWmFomc,882588
|
141
141
|
py2ls/sleep_events_detectors.py,sha256=36MCuRrpurn0Uvzpo3p3b3_JlVsRNHSWCXbJxCGM3mg,51546
|
142
142
|
py2ls/stats.py,sha256=Wd9yCKQ_61QD29WMEgMuEcreFxF91NmlPW65iWT2B5w,39041
|
143
143
|
py2ls/translator.py,sha256=bc5FB-wqC4TtQz9gyCP1mE38HqNRJ_pmuRIgKnAlMzM,30581
|
144
144
|
py2ls/wb_detector.py,sha256=7y6TmBUj9exCZeIgBAJ_9hwuhkDh1x_-yg4dvNY1_GQ,6284
|
145
|
-
py2ls-0.1.7.
|
146
|
-
py2ls-0.1.7.
|
147
|
-
py2ls-0.1.7.
|
145
|
+
py2ls-0.1.7.2.dist-info/METADATA,sha256=JiktiXLdDiAU9bWCgp-uhidcaMn_isg-JEAkiNjR_uA,20017
|
146
|
+
py2ls-0.1.7.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
147
|
+
py2ls-0.1.7.2.dist-info/RECORD,,
|
File without changes
|