listpick 0.1.15.3__py3-none-any.whl → 0.1.15.5__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.
Potentially problematic release.
This version of listpick might be problematic. Click here for more details.
- listpick/listpick_app.py +27 -17
- listpick/utils/filtering.py +1 -0
- {listpick-0.1.15.3.dist-info → listpick-0.1.15.5.dist-info}/METADATA +1 -1
- {listpick-0.1.15.3.dist-info → listpick-0.1.15.5.dist-info}/RECORD +8 -8
- {listpick-0.1.15.3.dist-info → listpick-0.1.15.5.dist-info}/WHEEL +0 -0
- {listpick-0.1.15.3.dist-info → listpick-0.1.15.5.dist-info}/entry_points.txt +0 -0
- {listpick-0.1.15.3.dist-info → listpick-0.1.15.5.dist-info}/licenses/LICENSE.txt +0 -0
- {listpick-0.1.15.3.dist-info → listpick-0.1.15.5.dist-info}/top_level.txt +0 -0
listpick/listpick_app.py
CHANGED
|
@@ -3195,14 +3195,21 @@ class Picker:
|
|
|
3195
3195
|
if 'filter' in self.modes[prev_mode_index]:
|
|
3196
3196
|
self.filter_query = self.filter_query.replace(self.modes[prev_mode_index]['filter'], '')
|
|
3197
3197
|
self.filter_query = f"{self.filter_query.strip()} {val.strip()}".strip()
|
|
3198
|
-
|
|
3198
|
+
|
|
3199
|
+
if len(self.indexed_items) == 0:
|
|
3200
|
+
prev_index = -1
|
|
3201
|
+
else:
|
|
3202
|
+
prev_index = self.indexed_items[self.cursor_pos][0] if len(self.indexed_items)>0 else 0
|
|
3199
3203
|
|
|
3200
3204
|
self.indexed_items = filter_items(self.items, self.indexed_items, self.filter_query)
|
|
3201
|
-
if prev_index
|
|
3202
|
-
|
|
3205
|
+
if prev_index >= 0 and prev_index in [x[0] for x in self.indexed_items]:
|
|
3206
|
+
new_index = [x[0] for x in self.indexed_items].index(prev_index)
|
|
3207
|
+
else:
|
|
3208
|
+
new_index = 0
|
|
3203
3209
|
self.cursor_pos = new_index
|
|
3204
3210
|
# Re-sort self.items after applying filter
|
|
3205
|
-
|
|
3211
|
+
if len(self.items) and self.items != [[]]:
|
|
3212
|
+
sort_items(self.indexed_items, sort_method=self.columns_sort_method[self.sort_column], sort_column=self.sort_column, sort_reverse=self.sort_reverse[self.sort_column]) # Re-sort self.items based on new column
|
|
3206
3213
|
elif self.check_key("mode_prev", key, self.keys_dict): # shift+tab key
|
|
3207
3214
|
self.logger.info(f"key_function mode_prev")
|
|
3208
3215
|
if len(self.modes):
|
|
@@ -3215,6 +3222,8 @@ class Picker:
|
|
|
3215
3222
|
self.filter_query = self.filter_query.replace(self.modes[prev_mode_index]['filter'], '')
|
|
3216
3223
|
self.filter_query = f"{self.filter_query.strip()} {val.strip()}".strip()
|
|
3217
3224
|
prev_index = self.indexed_items[self.cursor_pos][0] if len(self.indexed_items)>0 else 0
|
|
3225
|
+
|
|
3226
|
+
# if len(self.items) and self.items != [[]]:
|
|
3218
3227
|
self.indexed_items = filter_items(self.items, self.indexed_items, self.filter_query)
|
|
3219
3228
|
if prev_index in [x[0] for x in self.indexed_items]: new_index = [x[0] for x in self.indexed_items].index(prev_index)
|
|
3220
3229
|
else: new_index = 0
|
|
@@ -3726,13 +3735,14 @@ def main() -> None:
|
|
|
3726
3735
|
# 'name': 'mp4',
|
|
3727
3736
|
# },
|
|
3728
3737
|
# ]
|
|
3729
|
-
highlights = [
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
]
|
|
3738
|
+
# function_data["highlights"] = [
|
|
3739
|
+
# {
|
|
3740
|
+
# "field": 1,
|
|
3741
|
+
# "match": "a",
|
|
3742
|
+
# "color": 8,
|
|
3743
|
+
# }
|
|
3744
|
+
# ]
|
|
3745
|
+
|
|
3736
3746
|
# function_data["cell_cursor"] = True
|
|
3737
3747
|
# function_data["display_modes"] = True
|
|
3738
3748
|
# function_data["centre_in_cols"] = True
|
|
@@ -3747,17 +3757,17 @@ def main() -> None:
|
|
|
3747
3757
|
# function_data["infobox_items"] = [["1"], ["2"], ["3"]]
|
|
3748
3758
|
# function_data["infobox_title"] = "Title"
|
|
3749
3759
|
# function_data["footer_string"] = "Title"
|
|
3750
|
-
function_data["highlights"] = highlights
|
|
3751
3760
|
# function_data["show_footer"] = False
|
|
3752
3761
|
# function_data["paginate"] = True
|
|
3753
3762
|
# function_data["debug"] = True
|
|
3754
3763
|
# function_data["debug_level"] = 1
|
|
3755
3764
|
|
|
3756
|
-
|
|
3757
|
-
function_data["
|
|
3758
|
-
function_data["
|
|
3759
|
-
function_data["
|
|
3760
|
-
function_data["
|
|
3765
|
+
|
|
3766
|
+
# function_data["split_right"] = True
|
|
3767
|
+
# function_data["split_right_proportion"] = 2/3
|
|
3768
|
+
# function_data["split_right_refresh_data"] = data_refresh_randint_title
|
|
3769
|
+
# function_data["split_right_function"] = right_split_display_list
|
|
3770
|
+
# function_data["split_right_data"] = ["Files", [str(x) for x in range(100)]]
|
|
3761
3771
|
|
|
3762
3772
|
|
|
3763
3773
|
# function_data["split_right_refresh_data"] = get_dl
|
listpick/utils/filtering.py
CHANGED
|
@@ -34,6 +34,7 @@ def filter_items(items: list[list[str]], indexed_items: list[Tuple[int, list[str
|
|
|
34
34
|
Returns indexed_items, which is a list of tuples; each tuple consists of the index and the data of the matching row in the original items list.
|
|
35
35
|
"""
|
|
36
36
|
logger.info("function: filter_items (filtering.py)")
|
|
37
|
+
if items in [[], [[]]]: return []
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
invert_filter = False
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
listpick/__init__.py,sha256=ExXc97-bibodH--wlwpQivl0zCNR5D1hvpvrf7OBofU,154
|
|
2
2
|
listpick/__main__.py,sha256=wkCjDdqw093W27yWwnlC3nG_sMRKaIad7hHHWy0RBgY,193
|
|
3
|
-
listpick/listpick_app.py,sha256
|
|
3
|
+
listpick/listpick_app.py,sha256=pAFFYEmHysvi2HIpPkYHYk2Tz1W6_i9ZRqpozCYpgNY,193841
|
|
4
4
|
listpick/pane/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
listpick/pane/get_data.py,sha256=21PTDXt9HP-4vZV4QUM8sidTqDEaKnKCDshl3-cSRCo,2255
|
|
6
6
|
listpick/pane/pane_functions.py,sha256=7xynpd3HjZnt6s9W0ZsJlrmYvGCMstAI5OJ7EuQSzdg,3092
|
|
@@ -16,7 +16,7 @@ listpick/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
16
16
|
listpick/utils/clipboard_operations.py,sha256=ORdNm2kgGbfs51xJSvgJPERgoSmBgT11axuMkvSoP9A,3133
|
|
17
17
|
listpick/utils/config.py,sha256=MEnAZg2Rhfl38XofEIN0uoVAOY7I0ftc79Evk3fOiVw,1654
|
|
18
18
|
listpick/utils/dump.py,sha256=60YVIMNtBoYvWhmzfTJOsNGcetOvcCB3_T7yv-bYTPQ,3838
|
|
19
|
-
listpick/utils/filtering.py,sha256=
|
|
19
|
+
listpick/utils/filtering.py,sha256=59_YIEYRV0ovnjF4iyuShq276FMAx5gBD9m3mE9IqJg,1237
|
|
20
20
|
listpick/utils/generate_data.py,sha256=7sv6JRhk0-Gcj4kOlkzx4qPNBJZ-GFWg9vM77GktzpI,3073
|
|
21
21
|
listpick/utils/graphing.py,sha256=ugjAH8js_iH7hulg4SySxb_W_f8B6GhTaceN5i7DID4,6954
|
|
22
22
|
listpick/utils/keycodes.py,sha256=ZGkw1-4szxPnP81wj80r92L6_neIOlBBjQltEieCwnk,2696
|
|
@@ -29,9 +29,9 @@ listpick/utils/sorting.py,sha256=WZZiVlVA3Zkcpwji3U5SNFlQ14zVEk3cZJtQirBkecQ,532
|
|
|
29
29
|
listpick/utils/table_to_list_of_lists.py,sha256=XBj7eGBDF15BRME-swnoXyOfZWxXCxrXp0pzsBfcJ5g,12224
|
|
30
30
|
listpick/utils/user_input.py,sha256=oyJZPAwA7UGAclPhdPL44tKnPIVNHWhX-tZEnCdBKC0,4318
|
|
31
31
|
listpick/utils/utils.py,sha256=McOl9uT3jh7l4TIWeSd8ZGjK_e7r0YZF0Gl20yI6fl0,13873
|
|
32
|
-
listpick-0.1.15.
|
|
33
|
-
listpick-0.1.15.
|
|
34
|
-
listpick-0.1.15.
|
|
35
|
-
listpick-0.1.15.
|
|
36
|
-
listpick-0.1.15.
|
|
37
|
-
listpick-0.1.15.
|
|
32
|
+
listpick-0.1.15.5.dist-info/licenses/LICENSE.txt,sha256=2mP-MRHJptADDNE9VInMNg1tE-C6Qv93Z4CCQKrpg9w,1061
|
|
33
|
+
listpick-0.1.15.5.dist-info/METADATA,sha256=75s1JMD61-9Id8LK9xiOp_2jMrNVCeSf_z3sEXbfy8w,8131
|
|
34
|
+
listpick-0.1.15.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
35
|
+
listpick-0.1.15.5.dist-info/entry_points.txt,sha256=-QCf_BKIkUz35Y9nkYpjZWs2Qg0KfRna2PAs5DnF6BE,43
|
|
36
|
+
listpick-0.1.15.5.dist-info/top_level.txt,sha256=5mtsGEz86rz3qQDe0D463gGjAfSp6A3EWg4J4AGYr-Q,9
|
|
37
|
+
listpick-0.1.15.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|