listpick 0.1.16.14__tar.gz → 0.1.16.15__tar.gz
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-0.1.16.14 → listpick-0.1.16.15}/CHANGELOG.md +2 -1
- {listpick-0.1.16.14/src/listpick.egg-info → listpick-0.1.16.15}/PKG-INFO +1 -1
- {listpick-0.1.16.14 → listpick-0.1.16.15}/setup.py +1 -1
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/listpick_app.py +29 -1
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/build_help.py +23 -1
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/keys.py +5 -5
- {listpick-0.1.16.14 → listpick-0.1.16.15/src/listpick.egg-info}/PKG-INFO +1 -1
- {listpick-0.1.16.14 → listpick-0.1.16.15}/.gitignore +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/LICENSE.txt +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/README.md +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/TODO.md +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/assets/aria2tui_graph_screenshot.png +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/assets/aria2tui_screenshot.png +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/assets/file_compare.png +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/assets/listpick_df_example.png +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/assets/lpfman.png +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/data_generation/list_files.toml +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/data_generation/list_files_empty.toml +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/data_generation/video_duplicates.toml +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/data_generation/video_mediainfo.toml +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/input_files/polynomials.tsv +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/input_guides/gnuplot_graph.md +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/picker/footer_string_example.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/picker/picker_example.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/picker/template.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/examples/picker/wikipedia_table.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/listpick.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/requirements.txt +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/setup.cfg +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/__init__.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/__main__.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/pane/__init__.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/pane/get_data.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/pane/left_pane_functions.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/pane/pane_functions.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/pane/pane_functions_1.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/pane/pane_utils.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/__init__.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/draw_screen.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/footer.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/help_screen.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/input_field.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/ui/picker_colours.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/__init__.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/clipboard_operations.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/config.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/dump.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/filtering.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/generate_data.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/generate_data_multiprocessing.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/generate_data_multithreaded.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/generate_data_utils.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/graphing.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/keycodes.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/options_selectors.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/paste_operations.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/picker_log.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/search_and_filter_utils.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/searching.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/sorting.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/table_to_list_of_lists.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/user_input.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/utils.py +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick.egg-info/SOURCES.txt +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick.egg-info/dependency_links.txt +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick.egg-info/entry_points.txt +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick.egg-info/requires.txt +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick.egg-info/top_level.txt +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/tests/kitty_control.sh +0 -0
- {listpick-0.1.16.14 → listpick-0.1.16.15}/tests/sorting_dates.csv +0 -0
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# CHANGELOG.md
|
|
2
2
|
Note that the changes between 0.1.11.0 and 1.1.12.0 are listed under 0.1.11
|
|
3
3
|
|
|
4
|
-
## [0.1.16.14] 2025-10
|
|
4
|
+
## [0.1.16.14] 2025-10-26
|
|
5
5
|
- Fixed settings not loading when Picker has no rows
|
|
6
6
|
- Fixed footer not displaying correctly when Picker has no rows.
|
|
7
|
+
- Added support for macros
|
|
7
8
|
|
|
8
9
|
## [0.1.16.13] 2025-10-15
|
|
9
10
|
- Updated edit_menu_keys.
|
|
@@ -16,7 +16,7 @@ with open("README.md", "r", encoding = "utf-8") as fh:
|
|
|
16
16
|
|
|
17
17
|
setuptools.setup(
|
|
18
18
|
name = "listpick",
|
|
19
|
-
version = "0.1.16.
|
|
19
|
+
version = "0.1.16.15",
|
|
20
20
|
author = "Grim",
|
|
21
21
|
author_email = "grimandgreedy@protonmail.com",
|
|
22
22
|
description = "Listpick is a powerful TUI data tool for creating TUI apps or viewing/comparing tabulated data.",
|
|
@@ -162,6 +162,7 @@ class Picker:
|
|
|
162
162
|
reset_colours: bool = True,
|
|
163
163
|
key_remappings: dict = {},
|
|
164
164
|
keys_dict:dict = picker_keys,
|
|
165
|
+
macros: list = [],
|
|
165
166
|
display_infobox : bool = False,
|
|
166
167
|
infobox_items: list[list[str]] = [],
|
|
167
168
|
infobox_title: str = "",
|
|
@@ -315,6 +316,7 @@ class Picker:
|
|
|
315
316
|
self.reset_colours = reset_colours
|
|
316
317
|
self.key_remappings = key_remappings
|
|
317
318
|
self.keys_dict = keys_dict
|
|
319
|
+
self.macros = macros
|
|
318
320
|
self.display_infobox = display_infobox
|
|
319
321
|
self.infobox_items = infobox_items
|
|
320
322
|
self.infobox_title = infobox_title
|
|
@@ -1584,6 +1586,7 @@ class Picker:
|
|
|
1584
1586
|
"id_column": self.id_column,
|
|
1585
1587
|
"startup_notification": self.startup_notification,
|
|
1586
1588
|
"keys_dict": self.keys_dict,
|
|
1589
|
+
"macros": self.macros,
|
|
1587
1590
|
"cancel_is_back": self.cancel_is_back,
|
|
1588
1591
|
"paginate": self.paginate,
|
|
1589
1592
|
"leftmost_char": self.leftmost_char,
|
|
@@ -2286,6 +2289,19 @@ class Picker:
|
|
|
2286
2289
|
return True
|
|
2287
2290
|
return False
|
|
2288
2291
|
|
|
2292
|
+
def check_and_run_macro(self, key: int) -> bool:
|
|
2293
|
+
macro_match = False
|
|
2294
|
+
for macro in self.macros:
|
|
2295
|
+
try:
|
|
2296
|
+
if key in macro["keys"]:
|
|
2297
|
+
macro_match = True
|
|
2298
|
+
macro["function"](self)
|
|
2299
|
+
break
|
|
2300
|
+
except:
|
|
2301
|
+
pass
|
|
2302
|
+
return macro_match
|
|
2303
|
+
|
|
2304
|
+
|
|
2289
2305
|
def copy_dialogue(self) -> None:
|
|
2290
2306
|
""" Display dialogue to select how rows/cells should be copied. """
|
|
2291
2307
|
self.logger.info(f"function: copy_dialogue()")
|
|
@@ -2873,6 +2889,7 @@ class Picker:
|
|
|
2873
2889
|
self.refreshing_data = False
|
|
2874
2890
|
self.data_ready = False
|
|
2875
2891
|
|
|
2892
|
+
|
|
2876
2893
|
elif self.check_key("refresh", key, self.keys_dict) or self.remapped_key(key, curses.KEY_F5, self.key_remappings) or (self.auto_refresh and (time.time() - self.initial_time) >= self.timer):
|
|
2877
2894
|
self.logger.debug(f"Get new data (refresh).")
|
|
2878
2895
|
try:
|
|
@@ -2927,7 +2944,7 @@ class Picker:
|
|
|
2927
2944
|
self.stdscr.refresh()
|
|
2928
2945
|
help_data = {
|
|
2929
2946
|
# "items": help_lines,
|
|
2930
|
-
"items": build_help_rows(self.keys_dict),
|
|
2947
|
+
"items": build_help_rows(self.keys_dict, self.macros),
|
|
2931
2948
|
"title": f"{self.title} Help",
|
|
2932
2949
|
"colours_start": self.help_colours_start,
|
|
2933
2950
|
"colours": help_colours,
|
|
@@ -2951,6 +2968,10 @@ class Picker:
|
|
|
2951
2968
|
s, o, f = OptionPicker.run()
|
|
2952
2969
|
self.draw_screen()
|
|
2953
2970
|
|
|
2971
|
+
if self.check_and_run_macro(key):
|
|
2972
|
+
self.draw_screen()
|
|
2973
|
+
continue
|
|
2974
|
+
|
|
2954
2975
|
if self.check_key("info", key, self.keys_dict):
|
|
2955
2976
|
self.logger.info(f"key_function help")
|
|
2956
2977
|
self.stdscr.clear()
|
|
@@ -4574,6 +4595,13 @@ def main() -> None:
|
|
|
4574
4595
|
"refresh_time": 1,
|
|
4575
4596
|
},
|
|
4576
4597
|
]
|
|
4598
|
+
function_data["macros"] = [
|
|
4599
|
+
# {
|
|
4600
|
+
# "keys": [ord('z')],
|
|
4601
|
+
# "description": "Display message via dbus.",
|
|
4602
|
+
# "function": lambda picker_obj: os.system("notify-send 'zkey pressed'")
|
|
4603
|
+
# },
|
|
4604
|
+
]
|
|
4577
4605
|
# function_data["require_option"] = [True for _ in function_data["items"]]
|
|
4578
4606
|
|
|
4579
4607
|
stdscr = start_curses()
|
|
@@ -14,7 +14,7 @@ from listpick.utils import keycodes
|
|
|
14
14
|
|
|
15
15
|
logger = logging.getLogger('picker_log')
|
|
16
16
|
|
|
17
|
-
def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
|
|
17
|
+
def build_help_rows(keys_dict: dict, macros: list, debug: bool = False) -> list[list[str]]:
|
|
18
18
|
""" Build help rows based on the keys_dict. """
|
|
19
19
|
|
|
20
20
|
logger.info(f"function: build_help_rows() (build_help.py)")
|
|
@@ -173,6 +173,8 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
|
|
|
173
173
|
if not found:
|
|
174
174
|
sections["Misc:"].append(key)
|
|
175
175
|
|
|
176
|
+
|
|
177
|
+
|
|
176
178
|
items = []
|
|
177
179
|
for section_name, section_operations in sections.items():
|
|
178
180
|
section_rows = []
|
|
@@ -208,6 +210,26 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
|
|
|
208
210
|
items += section_rows
|
|
209
211
|
items.append(["",""])
|
|
210
212
|
|
|
213
|
+
if macros:
|
|
214
|
+
items.append([f" Macros:", ""])
|
|
215
|
+
for macro in macros:
|
|
216
|
+
keys = []
|
|
217
|
+
for key in macro["keys"]:
|
|
218
|
+
if key in special_keys:
|
|
219
|
+
keys.append(special_keys[key])
|
|
220
|
+
else:
|
|
221
|
+
try:
|
|
222
|
+
keys.append(chr(int(key)))
|
|
223
|
+
except Exception as e:
|
|
224
|
+
keys.append(f"keycode={key}")
|
|
225
|
+
if debug: print(f"Error chr({key}): {e}")
|
|
226
|
+
|
|
227
|
+
row = [f" {str(keys)[1:-1]}", macro["description"]]
|
|
228
|
+
items.append(row)
|
|
229
|
+
items.append(["",""])
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
211
233
|
if debug:
|
|
212
234
|
for operation in keys_dict:
|
|
213
235
|
if operation not in help_descriptions:
|
|
@@ -52,7 +52,7 @@ picker_keys = {
|
|
|
52
52
|
"continue_search_backward": [ord('N')],
|
|
53
53
|
"cancel": [27], # Escape key
|
|
54
54
|
"opts_input": [keycodes.META_o],
|
|
55
|
-
"opts_select": [ord('
|
|
55
|
+
# "opts_select": [ord('+')],
|
|
56
56
|
"mode_next": [9], # Tab key
|
|
57
57
|
"mode_prev": [353], # Shift+Tab key
|
|
58
58
|
"pipe_input": [ord('|')],
|
|
@@ -69,7 +69,7 @@ picker_keys = {
|
|
|
69
69
|
"paste": [ord('p')],
|
|
70
70
|
"save": [19, ord('D')], # Ctrl+s
|
|
71
71
|
"load": [15], # Ctrl+o
|
|
72
|
-
"open": [ord('O')],
|
|
72
|
+
# "open": [ord('O')],
|
|
73
73
|
"toggle_footer": [ord('_')],
|
|
74
74
|
"notification_toggle": [ord('z')],
|
|
75
75
|
"redo": [ord('.')],
|
|
@@ -238,8 +238,8 @@ edit_menu_keys = {
|
|
|
238
238
|
"continue_search_forward": [ord('n'), ord('i')],
|
|
239
239
|
"continue_search_backward": [ord('N'), ord('I')],
|
|
240
240
|
"cancel": [27], # Escape key
|
|
241
|
-
"opts_input": [
|
|
242
|
-
"opts_select": [ord('
|
|
241
|
+
"opts_input": [keycodes.META_o],
|
|
242
|
+
# "opts_select": [ord('+')],
|
|
243
243
|
"mode_next": [9], # Tab key
|
|
244
244
|
"mode_prev": [353], # Shift+Tab key
|
|
245
245
|
"pipe_input": [ord('|')],
|
|
@@ -254,7 +254,7 @@ edit_menu_keys = {
|
|
|
254
254
|
"copy": [ord('y')],
|
|
255
255
|
"save": [19, ord('D')], # Ctrl+s
|
|
256
256
|
"load": [ord('L'), 15], # Ctrl+o
|
|
257
|
-
"open": [ord('O')],
|
|
257
|
+
# "open": [ord('O')],
|
|
258
258
|
"toggle_footer": [ord('_')],
|
|
259
259
|
"visual_selection_toggle": [ord('v')],
|
|
260
260
|
"visual_deselection_toggle": [ord('V')],
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{listpick-0.1.16.14 → listpick-0.1.16.15}/src/listpick/utils/generate_data_multiprocessing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|