listpick 0.1.13.61__py3-none-any.whl → 0.1.13.62__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 +34 -9
- listpick/utils/generate_data.py +4 -1
- listpick/utils/utils.py +2 -0
- {listpick-0.1.13.61.dist-info → listpick-0.1.13.62.dist-info}/METADATA +5 -5
- {listpick-0.1.13.61.dist-info → listpick-0.1.13.62.dist-info}/RECORD +9 -9
- {listpick-0.1.13.61.dist-info → listpick-0.1.13.62.dist-info}/WHEEL +0 -0
- {listpick-0.1.13.61.dist-info → listpick-0.1.13.62.dist-info}/entry_points.txt +0 -0
- {listpick-0.1.13.61.dist-info → listpick-0.1.13.62.dist-info}/licenses/LICENSE.txt +0 -0
- {listpick-0.1.13.61.dist-info → listpick-0.1.13.62.dist-info}/top_level.txt +0 -0
listpick/listpick_app.py
CHANGED
|
@@ -1260,7 +1260,12 @@ class Picker:
|
|
|
1260
1260
|
message_width = notification_width-5
|
|
1261
1261
|
|
|
1262
1262
|
if not message: message = "!!"
|
|
1263
|
-
|
|
1263
|
+
if type(message) == type(""):
|
|
1264
|
+
mw = message_width
|
|
1265
|
+
submenu_items = [[message[i*mw:(i+1)*mw]] for i in range(len(message)//mw+1)]
|
|
1266
|
+
elif type(message) != type([]):
|
|
1267
|
+
submenu_items = [[" !!"]]
|
|
1268
|
+
|
|
1264
1269
|
|
|
1265
1270
|
notification_remap_keys = {
|
|
1266
1271
|
curses.KEY_RESIZE: curses.KEY_F5,
|
|
@@ -2760,26 +2765,46 @@ class Picker:
|
|
|
2760
2765
|
if not selected_indices:
|
|
2761
2766
|
selected_indices = [self.indexed_items[self.cursor_pos][0]]
|
|
2762
2767
|
|
|
2763
|
-
full_values = [format_row_full(self.items[i], self.hidden_columns) for i in selected_indices] # Use format_row_full for full data
|
|
2764
|
-
|
|
2768
|
+
# full_values = [format_row_full(self.items[i], self.hidden_columns) for i in selected_indices] # Use format_row_full for full data
|
|
2769
|
+
if self.cell_cursor:
|
|
2770
|
+
|
|
2771
|
+
full_values = []
|
|
2772
|
+
for row in self.selected_cells_by_row.keys():
|
|
2773
|
+
selected_cell_row_str = ""
|
|
2774
|
+
for cell in self.selected_cells_by_row[row]:
|
|
2775
|
+
if " " in self.items[row][cell]:
|
|
2776
|
+
selected_cell_row_str += repr(self.items[row][cell])
|
|
2777
|
+
else:
|
|
2778
|
+
selected_cell_row_str += self.items[row][cell]
|
|
2779
|
+
selected_cell_row_str += "\t"
|
|
2780
|
+
full_values.append(selected_cell_row_str.strip())
|
|
2781
|
+
|
|
2782
|
+
|
|
2783
|
+
# full_values = ["\t".join([repr(self.items[key][cell]) for cell in self.selected_cells_by_row[key]]) for key in self.selected_cells_by_row.keys()]
|
|
2784
|
+
# full_values = ["\t".join([self.items[key][cell] for cell in self.selected_cells_by_row[key]]) for key in self.selected_cells_by_row.keys()]
|
|
2785
|
+
else:
|
|
2786
|
+
full_values = [self.items[i][self.selected_column] for i in selected_indices]
|
|
2765
2787
|
if full_values:
|
|
2766
|
-
command = usrtxt.split()
|
|
2788
|
+
# command = usrtxt.split()
|
|
2789
|
+
command = usrtxt
|
|
2767
2790
|
# command = ['xargs', '-d' , '"\n"' '-I', '{}', 'mpv', '{}']
|
|
2768
2791
|
# command = ['xargs', '-d' , '"\n"' '-I', '{}', 'mpv', '{}']
|
|
2769
2792
|
# command = "xargs -d '\n' -I{} mpv {}"
|
|
2770
2793
|
|
|
2771
2794
|
try:
|
|
2772
|
-
process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
|
2795
|
+
process = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, shell=True)
|
|
2773
2796
|
|
|
2774
2797
|
if process.stdin != None:
|
|
2775
2798
|
for value in full_values:
|
|
2776
|
-
process.stdin.write((
|
|
2799
|
+
process.stdin.write((value + '\n').encode())
|
|
2800
|
+
# process.stdin.write((value + '\n').encode())
|
|
2777
2801
|
|
|
2778
2802
|
process.stdin.close()
|
|
2779
2803
|
|
|
2780
2804
|
self.notification(self.stdscr, message=f"{len(full_values)} strings piped to {repr(usrtxt)}")
|
|
2781
2805
|
except Exception as e:
|
|
2782
2806
|
self.notification(self.stdscr, message=f"{e}")
|
|
2807
|
+
# self.notification(self.stdscr, message=f"Error: {str(e)}")
|
|
2783
2808
|
|
|
2784
2809
|
|
|
2785
2810
|
elif self.check_key("open", key, self.keys_dict):
|
|
@@ -3158,9 +3183,9 @@ def main() -> None:
|
|
|
3158
3183
|
function_data["centre_in_terminal_vertical"] = True
|
|
3159
3184
|
function_data["highlight_full_row"] = True
|
|
3160
3185
|
function_data["pin_cursor"] = True
|
|
3161
|
-
function_data["display_infobox"] = True
|
|
3162
|
-
function_data["infobox_items"] = [["1"], ["2"], ["3"]]
|
|
3163
|
-
function_data["infobox_title"] = "Title"
|
|
3186
|
+
# function_data["display_infobox"] = True
|
|
3187
|
+
# function_data["infobox_items"] = [["1"], ["2"], ["3"]]
|
|
3188
|
+
# function_data["infobox_title"] = "Title"
|
|
3164
3189
|
# function_data["footer_string"] = "Title"
|
|
3165
3190
|
function_data["highlights"] = highlights
|
|
3166
3191
|
function_data["show_footer"] = False
|
listpick/utils/generate_data.py
CHANGED
|
@@ -25,7 +25,10 @@ def generate_columns(funcs: list, files: list) -> list[list[str]]:
|
|
|
25
25
|
for file in files:
|
|
26
26
|
item = []
|
|
27
27
|
for func in funcs:
|
|
28
|
-
|
|
28
|
+
try:
|
|
29
|
+
item.append(func(file))
|
|
30
|
+
except:
|
|
31
|
+
item.append("")
|
|
29
32
|
items.append(item)
|
|
30
33
|
|
|
31
34
|
return items
|
listpick/utils/utils.py
CHANGED
|
@@ -350,6 +350,8 @@ def pad_lists_to_same_length(list_of_lists: list[list[str]]) -> list[list[str]]:
|
|
|
350
350
|
""" Ensure that all lists in a list of lists are of the same length. Pad any shorter sublists with empty strings. """
|
|
351
351
|
if not list_of_lists or list_of_lists in [[], [[]]]:
|
|
352
352
|
return []
|
|
353
|
+
if type(list_of_lists) == type([]) and len(list_of_lists) and type(list_of_lists[0]) == type(""):
|
|
354
|
+
list_of_lists = [[x] for x in list_of_lists]
|
|
353
355
|
|
|
354
356
|
# Find the maximum length of the sublists
|
|
355
357
|
lengths = [len(sublist) for sublist in list_of_lists]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: listpick
|
|
3
|
-
Version: 0.1.13.
|
|
3
|
+
Version: 0.1.13.62
|
|
4
4
|
Summary: Listpick is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.
|
|
5
5
|
Home-page: https://github.com/grimandgreedy/listpick
|
|
6
6
|
Author: Grim
|
|
@@ -80,7 +80,7 @@ close_curses(stdscr)
|
|
|
80
80
|
Use the listpick binary to generate and display rows based on a list of commands:
|
|
81
81
|
|
|
82
82
|
```
|
|
83
|
-
wget https://raw.githubusercontent.com/grimandgreedy/listpick/refs/heads/master/examples/list_files.toml
|
|
83
|
+
wget https://raw.githubusercontent.com/grimandgreedy/listpick/refs/heads/master/examples/data_generation/list_files.toml
|
|
84
84
|
listpick -g list_files.py
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -100,9 +100,9 @@ The application allows you to:
|
|
|
100
100
|
## Examples
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
### Identify video duplicates (./examples/video_duplicates.toml):
|
|
103
|
+
### Identify video duplicates (./examples/data_generation//video_duplicates.toml):
|
|
104
104
|
```python
|
|
105
|
-
listpick -g ./examples/video_duplicates.toml
|
|
105
|
+
listpick -g ./examples/data_generation/video_duplicates.toml
|
|
106
106
|
```
|
|
107
107
|
- From the list of commands in the toml file we generate the properties we will use to identify the duplicates.
|
|
108
108
|
|
|
@@ -142,7 +142,7 @@ listpick -i ~/dn.pkl -t pkl
|
|
|
142
142
|
|
|
143
143
|
2. **Generate data based on an toml file with relevant commands to generate the rows.**
|
|
144
144
|
```python
|
|
145
|
-
listpick -g ./examples/video_duplicates.toml
|
|
145
|
+
listpick -g ./examples/data_generation/video_duplicates.toml
|
|
146
146
|
```
|
|
147
147
|
|
|
148
148
|
- See ./examples/
|
|
@@ -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=OE6Py8M0R0TVAb72SCiCk9MSc3TLh4ZgO2qe5xBtNro,166710
|
|
4
4
|
listpick/ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
listpick/ui/build_help.py,sha256=_rVKKrX3HfFJtw-pyeNb2lQWbml4-AAw8sZIUYGn97Y,8731
|
|
6
6
|
listpick/ui/footer.py,sha256=s1L68MNmhWwbWRy0mn0ChmnE_dMQBAzNlTv917pyHE0,10673
|
|
@@ -14,7 +14,7 @@ listpick/utils/clipboard_operations.py,sha256=ORdNm2kgGbfs51xJSvgJPERgoSmBgT11ax
|
|
|
14
14
|
listpick/utils/config.py,sha256=MEnAZg2Rhfl38XofEIN0uoVAOY7I0ftc79Evk3fOiVw,1654
|
|
15
15
|
listpick/utils/dump.py,sha256=60YVIMNtBoYvWhmzfTJOsNGcetOvcCB3_T7yv-bYTPQ,3838
|
|
16
16
|
listpick/utils/filtering.py,sha256=uS9sW0inmFvq0cIrwRC1BfuP8kjAD5IWWtls4jGB-70,1199
|
|
17
|
-
listpick/utils/generate_data.py,sha256=
|
|
17
|
+
listpick/utils/generate_data.py,sha256=7sv6JRhk0-Gcj4kOlkzx4qPNBJZ-GFWg9vM77GktzpI,3073
|
|
18
18
|
listpick/utils/options_selectors.py,sha256=Vbv4jRkUsSPs7g-EQAv9Q0nhYy6Z4sFsJqMjUIe1oeQ,2814
|
|
19
19
|
listpick/utils/paste_operations.py,sha256=7wDXLPlxUgA3CA99gwsm47juWGO2YQ9EJghW06yo9vI,1242
|
|
20
20
|
listpick/utils/picker_log.py,sha256=SW6GmjxpI7YrSf72fSr4O8Ux0fY_OzaSXUgTFdz6Xo4,805
|
|
@@ -22,10 +22,10 @@ listpick/utils/search_and_filter_utils.py,sha256=XxGfkyDVXO9OAKcftPat8IReMTFIuTH
|
|
|
22
22
|
listpick/utils/searching.py,sha256=Xk5UIqamNHL2L90z3ACB_Giqdpi9iRKoAJ6pKaqaD7Q,3093
|
|
23
23
|
listpick/utils/sorting.py,sha256=WZZiVlVA3Zkcpwji3U5SNFlQ14zVEk3cZJtQirBkecQ,5329
|
|
24
24
|
listpick/utils/table_to_list_of_lists.py,sha256=T-i-nV1p6g8UagdgUPKrhIGpKY_YXZDxf4xZzcPepNA,7635
|
|
25
|
-
listpick/utils/utils.py,sha256=
|
|
26
|
-
listpick-0.1.13.
|
|
27
|
-
listpick-0.1.13.
|
|
28
|
-
listpick-0.1.13.
|
|
29
|
-
listpick-0.1.13.
|
|
30
|
-
listpick-0.1.13.
|
|
31
|
-
listpick-0.1.13.
|
|
25
|
+
listpick/utils/utils.py,sha256=3La3uyij4QazWV_8GpXJ7nFFMHY2sRTW2OWXJTX-LeY,13791
|
|
26
|
+
listpick-0.1.13.62.dist-info/licenses/LICENSE.txt,sha256=2mP-MRHJptADDNE9VInMNg1tE-C6Qv93Z4CCQKrpg9w,1061
|
|
27
|
+
listpick-0.1.13.62.dist-info/METADATA,sha256=YNt1kbQKoIp0L_kCs8GZwEWPbt6hDquSrq4GmDlpoW0,8053
|
|
28
|
+
listpick-0.1.13.62.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
29
|
+
listpick-0.1.13.62.dist-info/entry_points.txt,sha256=-QCf_BKIkUz35Y9nkYpjZWs2Qg0KfRna2PAs5DnF6BE,43
|
|
30
|
+
listpick-0.1.13.62.dist-info/top_level.txt,sha256=5mtsGEz86rz3qQDe0D463gGjAfSp6A3EWg4J4AGYr-Q,9
|
|
31
|
+
listpick-0.1.13.62.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|