listpick 0.1.16.6__tar.gz → 0.1.16.8__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.6/src/listpick.egg-info → listpick-0.1.16.8}/PKG-INFO +1 -1
- {listpick-0.1.16.6 → listpick-0.1.16.8}/setup.py +1 -1
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/listpick_app.py +13 -4
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/build_help.py +4 -4
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/keys.py +2 -2
- {listpick-0.1.16.6 → listpick-0.1.16.8/src/listpick.egg-info}/PKG-INFO +1 -1
- {listpick-0.1.16.6 → listpick-0.1.16.8}/.gitignore +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/CHANGELOG.md +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/LICENSE.txt +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/README.md +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/TODO.md +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/assets/aria2tui_screenshot.png +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/assets/file_compare.png +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/assets/lpfman.png +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/data_generation/list_files.toml +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/data_generation/list_files_empty.toml +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/data_generation/video_duplicates.toml +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/data_generation/video_mediainfo.toml +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/input_files/polynomials.tsv +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/input_guides/gnuplot_graph.md +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/picker/footer_string_example.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/picker/picker_example.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/picker/template.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/examples/picker/wikipedia_table.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/listpick.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/requirements.txt +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/setup.cfg +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/__init__.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/__main__.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/pane/__init__.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/pane/get_data.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/pane/pane_functions.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/pane/pane_utils.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/__init__.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/draw_screen.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/footer.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/help_screen.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/input_field.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/ui/picker_colours.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/__init__.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/clipboard_operations.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/config.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/dump.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/filtering.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/generate_data.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/generate_data_multithreaded.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/graphing.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/keycodes.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/options_selectors.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/paste_operations.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/picker_log.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/search_and_filter_utils.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/searching.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/sorting.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/table_to_list_of_lists.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/user_input.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick/utils/utils.py +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick.egg-info/SOURCES.txt +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick.egg-info/dependency_links.txt +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick.egg-info/entry_points.txt +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick.egg-info/requires.txt +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/src/listpick.egg-info/top_level.txt +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/tests/kitty_control.sh +0 -0
- {listpick-0.1.16.6 → listpick-0.1.16.8}/tests/sorting_dates.csv +0 -0
|
@@ -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.8",
|
|
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.",
|
|
@@ -56,7 +56,7 @@ class Picker:
|
|
|
56
56
|
stdscr: curses.window,
|
|
57
57
|
items: list[list[str]] = [],
|
|
58
58
|
cursor_pos: int = 0,
|
|
59
|
-
colours: dict =
|
|
59
|
+
colours: dict = {},
|
|
60
60
|
colour_theme_number: int = 3,
|
|
61
61
|
max_selected: int = -1,
|
|
62
62
|
top_gap: int =0,
|
|
@@ -195,7 +195,7 @@ class Picker:
|
|
|
195
195
|
self.stdscr = stdscr
|
|
196
196
|
self.items = items
|
|
197
197
|
self.cursor_pos = cursor_pos
|
|
198
|
-
self.colours =
|
|
198
|
+
self.colours = get_colours(colour_theme_number)
|
|
199
199
|
self.colour_theme_number = colour_theme_number
|
|
200
200
|
self.max_selected = max_selected
|
|
201
201
|
self.top_gap = top_gap
|
|
@@ -352,6 +352,7 @@ class Picker:
|
|
|
352
352
|
# Note: We have to set the footer after initialising the picker state so that the footer can use the get_function_data method
|
|
353
353
|
self.footer_options = [StandardFooter(self.stdscr, colours_start, self.get_function_data), CompactFooter(self.stdscr, colours_start, self.get_function_data), NoFooter(self.stdscr, colours_start, self.get_function_data)]
|
|
354
354
|
self.footer = self.footer_options[self.footer_style]
|
|
355
|
+
self.footer.adjust_sizes(self.term_h, self.term_w)
|
|
355
356
|
|
|
356
357
|
|
|
357
358
|
|
|
@@ -385,6 +386,7 @@ class Picker:
|
|
|
385
386
|
global COLOURS_SET
|
|
386
387
|
COLOURS_SET = False
|
|
387
388
|
self.colours_end = set_colours(pick=config["general"]["colour_theme_number"], start=1)
|
|
389
|
+
self.colours = get_colours(config["general"]["colour_theme_number"])
|
|
388
390
|
|
|
389
391
|
self.logger.info(f"function: set_config()")
|
|
390
392
|
if "general" in config:
|
|
@@ -502,11 +504,14 @@ class Picker:
|
|
|
502
504
|
self.notification_colours_start = 0
|
|
503
505
|
self.help_colours_start = 0
|
|
504
506
|
|
|
507
|
+
self.colours = get_colours(self.colour_theme_number)
|
|
508
|
+
|
|
505
509
|
|
|
506
510
|
debug_levels = [logging.DEBUG, logging.INFO, logging.WARNING, logging.ERROR, logging.CRITICAL]
|
|
507
511
|
dbglvl = debug_levels[self.debug_level]
|
|
508
512
|
self.logger = setup_logger(name="picker_log", log_file="picker.log", log_enabled=self.debug, level =dbglvl)
|
|
509
513
|
self.logger.info(f"Initialiasing Picker.")
|
|
514
|
+
self.update_term_size()
|
|
510
515
|
# self.notification(self.stdscr, message=repr(self.logger))
|
|
511
516
|
|
|
512
517
|
|
|
@@ -1580,7 +1585,7 @@ class Picker:
|
|
|
1580
1585
|
|
|
1581
1586
|
self.logger.info(f"function: notification()")
|
|
1582
1587
|
""" Notification box. """
|
|
1583
|
-
notification_width, notification_height = 50, 7
|
|
1588
|
+
notification_width, notification_height = min(self.term_w-4, 50), 7
|
|
1584
1589
|
message_width = notification_width-5
|
|
1585
1590
|
|
|
1586
1591
|
if not message: message = "!!"
|
|
@@ -1595,7 +1600,7 @@ class Picker:
|
|
|
1595
1600
|
while True:
|
|
1596
1601
|
self.update_term_size()
|
|
1597
1602
|
|
|
1598
|
-
submenu_win = curses.newwin(notification_height, notification_width, 3, self.term_w - (notification_width+
|
|
1603
|
+
submenu_win = curses.newwin(notification_height, notification_width, 3, self.term_w - (notification_width+2))
|
|
1599
1604
|
notification_data = {
|
|
1600
1605
|
"items": submenu_items,
|
|
1601
1606
|
"title": title,
|
|
@@ -1808,6 +1813,7 @@ class Picker:
|
|
|
1808
1813
|
set_colours(self.colour_theme_number)
|
|
1809
1814
|
self.draw_screen()
|
|
1810
1815
|
self.notification(self.stdscr, message=f"Theme {self.colour_theme_number} applied.")
|
|
1816
|
+
self.colours = get_colours(self.colour_theme_number)
|
|
1811
1817
|
|
|
1812
1818
|
else:
|
|
1813
1819
|
self.user_settings = ""
|
|
@@ -2394,6 +2400,9 @@ class Picker:
|
|
|
2394
2400
|
self.logger.info(f"function: run()")
|
|
2395
2401
|
|
|
2396
2402
|
if self.get_footer_string_startup and self.footer_string_refresh_function != None:
|
|
2403
|
+
self.footer_string = " "
|
|
2404
|
+
self.footer.adjust_sizes(self.term_h, self.term_w)
|
|
2405
|
+
self.draw_screen()
|
|
2397
2406
|
self.footer_string = self.footer_string_refresh_function()
|
|
2398
2407
|
|
|
2399
2408
|
self.initialise_variables(get_data=self.get_data_startup)
|
|
@@ -68,7 +68,7 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
|
|
|
68
68
|
|
|
69
69
|
## Key descriptions
|
|
70
70
|
help_descriptions = {
|
|
71
|
-
"refresh": "Refresh
|
|
71
|
+
"refresh": "Refresh data.",
|
|
72
72
|
"help": "Open help.",
|
|
73
73
|
"exit": "Exit picker instance.",
|
|
74
74
|
"full_exit": "Immediate exit to terminal.",
|
|
@@ -119,7 +119,7 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
|
|
|
119
119
|
"col_hide": "Hide column.",
|
|
120
120
|
"edit": "Edit cell.",
|
|
121
121
|
"edit_picker": "Edit cell from options dialogue.",
|
|
122
|
-
"edit_ipython": "
|
|
122
|
+
"edit_ipython": "Drop to ipython shell with environment as `self`",
|
|
123
123
|
"copy": "Copy selections.",
|
|
124
124
|
"paste": "Paste into picker.",
|
|
125
125
|
"save": "Save selections.",
|
|
@@ -153,9 +153,9 @@ def build_help_rows(keys_dict: dict, debug: bool = False) -> list[list[str]]:
|
|
|
153
153
|
"UI:": [ "toggle_footer", "redraw_screen", "decrease_lines_per_page", "increase_lines_per_page", "increase_column_width", "decrease_column_width", "notification_toggle", "toggle_right_pane", "cycle_right_pane"],
|
|
154
154
|
"Sort:": [ "cycle_sort_method", "cycle_sort_method_reverse", "cycle_sort_order", ] ,
|
|
155
155
|
"Data manipulation:": [ "delete", "delete_column", "edit", "edit_picker", "edit_ipython", "add_column_before", "add_column_after", "add_row_before", "add_row_after"],
|
|
156
|
-
"Filter and
|
|
156
|
+
"Filter and search:": [ "filter_input", "search_input", "continue_search_forward", "continue_search_backward", ] ,
|
|
157
157
|
"Settings:": [ "settings_input", "settings_options" ],
|
|
158
|
-
"
|
|
158
|
+
"Options and modes:": [ "opts_input", "opts_select", "mode_next", "mode_prev", "pipe_input", "reset_opts", "col_select", "col_select_next", "col_select_prev", "col_hide" ],
|
|
159
159
|
"Save, load, copy and paste:": [ "save", "load", "open", "copy", "paste" ],
|
|
160
160
|
"Misc:": [ "redo", "undo", "refresh", "help", "exit", "full_exit", "move_column_left", "move_column_right" ],
|
|
161
161
|
}
|
|
@@ -104,8 +104,8 @@ help_keys = {
|
|
|
104
104
|
"page_down": [curses.KEY_NPAGE, 6],
|
|
105
105
|
"cursor_bottom": [ord('G'), curses.KEY_END],
|
|
106
106
|
"cursor_top": [ord('g'), curses.KEY_HOME],
|
|
107
|
-
"five_up": [ord('K')],
|
|
108
|
-
"five_down": [ord('J')],
|
|
107
|
+
"five_up": [ord('K'), keycodes.META_k],
|
|
108
|
+
"five_down": [ord('J'), keycodes.META_j],
|
|
109
109
|
"redraw_screen": [12], # Ctrl+l
|
|
110
110
|
"cycle_sort_method": [ord('s')],
|
|
111
111
|
"cycle_sort_method_reverse": [ord('S')],
|
|
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.6 → listpick-0.1.16.8}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl
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
|
|
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
|