upplib 3.2.0__py3-none-any.whl → 3.2.1__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.
- upplib/file_text.py +17 -17
- {upplib-3.2.0.dist-info → upplib-3.2.1.dist-info}/METADATA +1 -1
- {upplib-3.2.0.dist-info → upplib-3.2.1.dist-info}/RECORD +6 -6
- {upplib-3.2.0.dist-info → upplib-3.2.1.dist-info}/WHEEL +0 -0
- {upplib-3.2.0.dist-info → upplib-3.2.1.dist-info}/licenses/LICENSE +0 -0
- {upplib-3.2.0.dist-info → upplib-3.2.1.dist-info}/top_level.txt +0 -0
upplib/file_text.py
CHANGED
|
@@ -583,9 +583,9 @@ def to_list_from_txt(file_name: str = 'a.txt',
|
|
|
583
583
|
sep_line_with_space_count: int = None,
|
|
584
584
|
sep_is_front: bool = True,
|
|
585
585
|
sep_all: str = None,
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
586
|
+
line_ignore_start_with: list | int | str = None,
|
|
587
|
+
line_ignore_end_with: list | int | str = None,
|
|
588
|
+
line_ignore_empty: bool | None = None,
|
|
589
589
|
line_join: str = None,
|
|
590
590
|
line_must_start_with: str = None,
|
|
591
591
|
line_must_contain: str = None,
|
|
@@ -609,9 +609,9 @@ def to_list_from_txt(file_name: str = 'a.txt',
|
|
|
609
609
|
sep_line_suffix : 这一行是一个分隔符,以这个分隔符作为后缀的, 将 list(str) 转化为 list(list(str))
|
|
610
610
|
sep_is_front : 这一行,分割行,是包含到前面,还是包含到
|
|
611
611
|
sep_all : 将文件转化成一个字符串,然后对这个字符串,再次总体分割 将 list(str) 转化为 str , 然后再次转化成 list(str)
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
612
|
+
line_ignore_start_with : 忽略以这个为开头的行
|
|
613
|
+
line_ignore_end_with : 忽略以这个为结尾的行
|
|
614
|
+
line_ignore_empty : 如果这一行为空,就忽略这行
|
|
615
615
|
line_must_start_with : 这一行必须以这个字符串为开始
|
|
616
616
|
line_must_contain : 这一行必须包含这个字符串
|
|
617
617
|
line_join : 将 list(list(str)) 转化成 list(str) 类型的数据
|
|
@@ -664,23 +664,23 @@ def to_list_from_txt(file_name: str = 'a.txt',
|
|
|
664
664
|
continue
|
|
665
665
|
c += 1
|
|
666
666
|
can_add = True
|
|
667
|
-
if
|
|
668
|
-
if isinstance(
|
|
669
|
-
for ss in
|
|
667
|
+
if line_ignore_start_with is not None:
|
|
668
|
+
if isinstance(line_ignore_start_with, list) or isinstance(line_ignore_start_with, set):
|
|
669
|
+
for ss in line_ignore_start_with:
|
|
670
670
|
if line.startswith(str(ss)):
|
|
671
671
|
can_add = False
|
|
672
|
-
elif isinstance(
|
|
673
|
-
if line.startswith(str(
|
|
672
|
+
elif isinstance(line_ignore_start_with, str):
|
|
673
|
+
if line.startswith(str(line_ignore_start_with)):
|
|
674
674
|
can_add = False
|
|
675
|
-
if
|
|
676
|
-
if isinstance(
|
|
677
|
-
for ss in
|
|
675
|
+
if line_ignore_end_with is not None:
|
|
676
|
+
if isinstance(line_ignore_end_with, list) or isinstance(line_ignore_end_with, set):
|
|
677
|
+
for ss in line_ignore_end_with:
|
|
678
678
|
if line.endswith(str(ss)):
|
|
679
679
|
can_add = False
|
|
680
|
-
elif isinstance(
|
|
681
|
-
if line.endswith(str(
|
|
680
|
+
elif isinstance(line_ignore_end_with, str):
|
|
681
|
+
if line.endswith(str(line_ignore_end_with)):
|
|
682
682
|
can_add = False
|
|
683
|
-
if
|
|
683
|
+
if line_ignore_empty is not None and line_ignore_empty:
|
|
684
684
|
# 忽略空行
|
|
685
685
|
if len(line) == 0:
|
|
686
686
|
can_add = False
|
|
@@ -5,7 +5,7 @@ upplib/clean_up_msg.py,sha256=yR4D2fIXOT8z9VpClfhBjVnjhexObgNZDhvPu5v_5Y4,19237
|
|
|
5
5
|
upplib/common_package.py,sha256=2-u66k4WbZnX6-PUaYy8wsblnz41nvtX4Hwo3J5hjO0,832
|
|
6
6
|
upplib/db.py,sha256=-3ZALQSzP92-zIhye6ckrXIctbHsVmwoLiCVOlTyDyo,7058
|
|
7
7
|
upplib/file.py,sha256=XmrIKbAaCW1WdwPxmZWPZL5YwHyQEXxiDQ6MNEf97DE,8349
|
|
8
|
-
upplib/file_text.py,sha256=
|
|
8
|
+
upplib/file_text.py,sha256=JYoRSatwPMVOqXpJ2wszfJ2pVx1Ot2rQ2Jnxm_vj_YY,43106
|
|
9
9
|
upplib/format_data.py,sha256=Qxq-OZ8v6HBRJ-tUcNFem1Imbauk3Y5qJTrAGT0CC4I,10153
|
|
10
10
|
upplib/http_util.py,sha256=8Xya5qpeCKGaglxKnirOlOnbnBU3K52FGV5Y9c8HH9k,16119
|
|
11
11
|
upplib/index.py,sha256=VvQzOzx6vtSLAmFARplPCVNTMq0DKYpMBFRgr7ge1dc,25887
|
|
@@ -16,8 +16,8 @@ upplib/multi_thread.py,sha256=zOeWG5HGYIzwqiPvef-4ak5bzorf0S3q6Ht8wPit_M0,2705
|
|
|
16
16
|
upplib/query_log.py,sha256=m93f8wyZeatVs_PF8O5eyC6U5yJfohg7x6muXPUMOJA,9204
|
|
17
17
|
upplib/redis_tool.py,sha256=I1kOqBwfQWVIOAY-hQaaOn1Zrx8BNlK83u-pk4uHPCA,707
|
|
18
18
|
upplib/util.py,sha256=0JXo9eIEC67Cnby-s8IELkbP9m7a6deB4pX7OIGb3zg,4709
|
|
19
|
-
upplib-3.2.
|
|
20
|
-
upplib-3.2.
|
|
21
|
-
upplib-3.2.
|
|
22
|
-
upplib-3.2.
|
|
23
|
-
upplib-3.2.
|
|
19
|
+
upplib-3.2.1.dist-info/licenses/LICENSE,sha256=WI5JtXXhjcqnIcPllDA1ZtuxNnZ515xjElcILo7z28o,1073
|
|
20
|
+
upplib-3.2.1.dist-info/METADATA,sha256=wKO-0xGa_i_HaYws0NL7tGTUwBP_YqNyRzY56cs1Kmk,940
|
|
21
|
+
upplib-3.2.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
22
|
+
upplib-3.2.1.dist-info/top_level.txt,sha256=VwdHDDPP79e1LqtRu5_w30hHB4gT0zlj1weuQYOqFoA,7
|
|
23
|
+
upplib-3.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|