listpick 0.1.16.9__tar.gz → 0.1.16.10__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.

Files changed (67) hide show
  1. {listpick-0.1.16.9 → listpick-0.1.16.10}/CHANGELOG.md +7 -0
  2. {listpick-0.1.16.9/src/listpick.egg-info → listpick-0.1.16.10}/PKG-INFO +1 -1
  3. {listpick-0.1.16.9 → listpick-0.1.16.10}/setup.py +1 -1
  4. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/listpick_app.py +41 -8
  5. {listpick-0.1.16.9 → listpick-0.1.16.10/src/listpick.egg-info}/PKG-INFO +1 -1
  6. {listpick-0.1.16.9 → listpick-0.1.16.10}/.gitignore +0 -0
  7. {listpick-0.1.16.9 → listpick-0.1.16.10}/LICENSE.txt +0 -0
  8. {listpick-0.1.16.9 → listpick-0.1.16.10}/README.md +0 -0
  9. {listpick-0.1.16.9 → listpick-0.1.16.10}/TODO.md +0 -0
  10. {listpick-0.1.16.9 → listpick-0.1.16.10}/assets/aria2tui_screenshot.png +0 -0
  11. {listpick-0.1.16.9 → listpick-0.1.16.10}/assets/file_compare.png +0 -0
  12. {listpick-0.1.16.9 → listpick-0.1.16.10}/assets/lpfman.png +0 -0
  13. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/data_generation/list_files.toml +0 -0
  14. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/data_generation/list_files_empty.toml +0 -0
  15. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/data_generation/video_duplicates.toml +0 -0
  16. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/data_generation/video_mediainfo.toml +0 -0
  17. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/input_files/polynomials.tsv +0 -0
  18. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/input_guides/gnuplot_graph.md +0 -0
  19. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
  20. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/picker/footer_string_example.py +0 -0
  21. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/picker/picker_example.py +0 -0
  22. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/picker/template.py +0 -0
  23. {listpick-0.1.16.9 → listpick-0.1.16.10}/examples/picker/wikipedia_table.py +0 -0
  24. {listpick-0.1.16.9 → listpick-0.1.16.10}/listpick.py +0 -0
  25. {listpick-0.1.16.9 → listpick-0.1.16.10}/requirements.txt +0 -0
  26. {listpick-0.1.16.9 → listpick-0.1.16.10}/setup.cfg +0 -0
  27. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/__init__.py +0 -0
  28. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/__main__.py +0 -0
  29. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/pane/__init__.py +0 -0
  30. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/pane/get_data.py +0 -0
  31. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/pane/left_pane_functions.py +0 -0
  32. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/pane/pane_functions.py +0 -0
  33. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/pane/pane_functions_1.py +0 -0
  34. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/pane/pane_utils.py +0 -0
  35. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/__init__.py +0 -0
  36. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/build_help.py +0 -0
  37. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/draw_screen.py +0 -0
  38. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/footer.py +0 -0
  39. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/help_screen.py +0 -0
  40. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/input_field.py +0 -0
  41. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/keys.py +0 -0
  42. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/ui/picker_colours.py +0 -0
  43. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/__init__.py +0 -0
  44. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/clipboard_operations.py +0 -0
  45. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/config.py +0 -0
  46. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/dump.py +0 -0
  47. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/filtering.py +0 -0
  48. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/generate_data.py +0 -0
  49. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/generate_data_multithreaded.py +0 -0
  50. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/graphing.py +0 -0
  51. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/keycodes.py +0 -0
  52. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/options_selectors.py +0 -0
  53. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/paste_operations.py +0 -0
  54. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/picker_log.py +0 -0
  55. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/search_and_filter_utils.py +0 -0
  56. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/searching.py +0 -0
  57. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/sorting.py +0 -0
  58. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/table_to_list_of_lists.py +0 -0
  59. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/user_input.py +0 -0
  60. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick/utils/utils.py +0 -0
  61. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick.egg-info/SOURCES.txt +0 -0
  62. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick.egg-info/dependency_links.txt +0 -0
  63. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick.egg-info/entry_points.txt +0 -0
  64. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick.egg-info/requires.txt +0 -0
  65. {listpick-0.1.16.9 → listpick-0.1.16.10}/src/listpick.egg-info/top_level.txt +0 -0
  66. {listpick-0.1.16.9 → listpick-0.1.16.10}/tests/kitty_control.sh +0 -0
  67. {listpick-0.1.16.9 → listpick-0.1.16.10}/tests/sorting_dates.csv +0 -0
@@ -1,5 +1,12 @@
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
+
4
+ ## [0.1.16.10] 2025-09-23
5
+ - Created separate header_separator with " |" as the default which shows borders between the column-headers.
6
+ - Created ensure_no_overscroll() method to ensure we do not scroll past the data-set when we move the cursor down, select different columns, resize the terminal, etc.
7
+ - Mostly needed for consistency as each of these actions had effectively implemented their own version.
8
+
9
+
3
10
  ## [0.1.16.9] 2025-09-22
4
11
  - Feature added: support for displaying a left pane.
5
12
  - Adjust leftmost_char when we resize the terminal.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.16.9
3
+ Version: 0.1.16.10
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
@@ -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.9",
19
+ version = "0.1.16.10",
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.",
@@ -96,6 +96,7 @@ class Picker:
96
96
  options_list: list[str] = [],
97
97
  user_settings : str = "",
98
98
  separator : str = " ",
99
+ header_separator : str = " │",
99
100
  search_query : str = "",
100
101
  search_count : int = 0,
101
102
  search_index : int = 0,
@@ -243,6 +244,7 @@ class Picker:
243
244
  self.options_list = options_list
244
245
  self.user_settings = user_settings
245
246
  self.separator = separator
247
+ self.header_separator = header_separator
246
248
  self.search_query = search_query
247
249
  self.search_count = search_count
248
250
  self.search_index = search_index
@@ -946,7 +948,7 @@ class Picker:
946
948
 
947
949
 
948
950
  header_str += f"{col_str:^{self.column_widths[i]-len(number)}}"
949
- header_str += self.separator
951
+ header_str += self.header_separator
950
952
  header_str_w = min(self.rows_w-self.left_gutter_width, visible_columns_total_width+1, self.term_w-self.startx)
951
953
 
952
954
  header_str = header_str[self.leftmost_char:]
@@ -2067,6 +2069,7 @@ class Picker:
2067
2069
  if self.indexed_items[new_pos][0] in self.unselectable_indices: new_pos+=1
2068
2070
  else: break
2069
2071
  self.cursor_pos = new_pos
2072
+ self.ensure_no_overscroll()
2070
2073
  return True
2071
2074
 
2072
2075
  def cursor_up(self, count=1) -> bool:
@@ -2080,6 +2083,7 @@ class Picker:
2080
2083
  elif new_pos in self.unselectable_indices: new_pos -= 1
2081
2084
  else: break
2082
2085
  self.cursor_pos = new_pos
2086
+ self.ensure_no_overscroll()
2083
2087
  return True
2084
2088
 
2085
2089
  def remapped_key(self, key: int, val: int, key_remappings: dict) -> bool:
@@ -2505,23 +2509,53 @@ class Picker:
2505
2509
  self.split_right = not self.split_right
2506
2510
  if self.right_panes[self.right_pane_index]["data"] in [[], None, {}]:
2507
2511
  self.right_panes[self.right_pane_index]["data"] = self.right_panes[self.right_pane_index]["get_data"](self.right_panes[self.right_pane_index]["data"], self.get_function_data())
2512
+ self.ensure_no_overscroll()
2508
2513
 
2509
2514
  def toggle_left_pane(self):
2510
2515
  if len(self.left_panes):
2511
2516
  self.split_left = not self.split_left
2512
2517
  if self.left_panes[self.left_pane_index]["data"] in [[], None, {}]:
2513
2518
  self.left_panes[self.left_pane_index]["data"] = self.left_panes[self.left_pane_index]["get_data"](self.left_panes[self.left_pane_index]["data"], self.get_function_data())
2519
+ self.ensure_no_overscroll()
2514
2520
 
2515
2521
 
2516
2522
  def cycle_right_pane(self, increment=1):
2517
2523
  if len(self.right_panes) > 1:
2518
2524
  self.right_pane_index = (self.right_pane_index+1)%len(self.right_panes)
2519
2525
  self.initial_right_split_time -= self.right_panes[self.right_pane_index]["refresh_time"]
2526
+ self.ensure_no_overscroll()
2520
2527
 
2521
2528
  def cycle_left_pane(self, increment=1):
2522
2529
  if len(self.left_panes) > 1:
2523
2530
  self.left_pane_index = (self.left_pane_index+1)%len(self.left_panes)
2524
2531
  self.initial_left_split_time -= self.left_panes[self.left_pane_index]["refresh_time"]
2532
+ self.ensure_no_overscroll()
2533
+
2534
+ def ensure_no_overscroll(self):
2535
+ """
2536
+ Ensure that we haven't scrolled past the last column.
2537
+
2538
+ This check should be performed after:
2539
+ - Terminal resize event
2540
+ - Scrolling down - i.e., rows with potentially different widths come into view
2541
+ """
2542
+ self.calculate_section_sizes()
2543
+ self.get_visible_rows()
2544
+ self.column_widths = get_column_widths(
2545
+ self.visible_rows,
2546
+ header=self.header,
2547
+ max_column_width=self.max_column_width,
2548
+ number_columns=self.number_columns,
2549
+ max_total_width=self.rows_w,
2550
+ unicode_char_width=self.unicode_char_width
2551
+ )
2552
+
2553
+ row_width = sum(self.column_widths) + len(self.separator)*(len(self.column_widths)-1)
2554
+ if row_width - self.leftmost_char < self.rows_w:
2555
+ if row_width <= self.rows_w - self.left_gutter_width:
2556
+ self.leftmost_char = 0
2557
+ else:
2558
+ self.leftmost_char = row_width - (self.rows_w - self.left_gutter_width) + 5
2525
2559
 
2526
2560
  def run(self) -> Tuple[list[int], str, dict]:
2527
2561
  """ Run the picker. """
@@ -2991,6 +3025,7 @@ class Picker:
2991
3025
  self.selected_cells_by_row[row] = [col]
2992
3026
 
2993
3027
  self.cursor_down()
3028
+ self.ensure_no_overscroll()
2994
3029
  elif self.check_key("select_all", key, self.keys_dict): # Select all (m or ctrl-a)
2995
3030
  self.select_all()
2996
3031
 
@@ -3005,6 +3040,7 @@ class Picker:
3005
3040
  if new_pos < len(self.indexed_items):
3006
3041
  self.cursor_pos = new_pos
3007
3042
 
3043
+ self.ensure_no_overscroll()
3008
3044
  self.draw_screen()
3009
3045
 
3010
3046
  elif self.check_key("cursor_bottom", key, self.keys_dict):
@@ -3014,6 +3050,7 @@ class Picker:
3014
3050
  else: break
3015
3051
  if new_pos < len(self.items) and new_pos >= 0:
3016
3052
  self.cursor_pos = new_pos
3053
+ self.ensure_no_overscroll()
3017
3054
  self.draw_screen()
3018
3055
  # current_row = items_per_page - 1
3019
3056
  # if current_page + 1 == (len(self.indexed_items) + items_per_page - 1) // items_per_page:
@@ -3138,6 +3175,7 @@ class Picker:
3138
3175
  self.leftmost_char = end_of_cell - display_width
3139
3176
 
3140
3177
  self.leftmost_char = max(0, min(column_set_width - display_width + 5, self.leftmost_char))
3178
+ self.ensure_no_overscroll()
3141
3179
 
3142
3180
  elif self.check_key("col_select_prev", key, self.keys_dict):
3143
3181
  if len(self.items) > 0 and len(self.items[0]) > 0:
@@ -3166,6 +3204,7 @@ class Picker:
3166
3204
  self.leftmost_char = start_of_cell
3167
3205
 
3168
3206
  self.leftmost_char = max(0, min(column_set_width - display_width + 5, self.leftmost_char))
3207
+ self.ensure_no_overscroll()
3169
3208
 
3170
3209
  elif self.check_key("scroll_right", key, self.keys_dict):
3171
3210
  self.logger.info(f"key_function scroll_right")
@@ -3317,14 +3356,8 @@ class Picker:
3317
3356
  elif key == curses.KEY_RESIZE: # Terminal resize signal
3318
3357
 
3319
3358
  self.calculate_section_sizes()
3320
- self.column_widths = get_column_widths(self.items, header=self.header, max_column_width=self.max_column_width, number_columns=self.number_columns, max_total_width=self.rows_w, unicode_char_width=self.unicode_char_width)
3359
+ self.ensure_no_overscroll()
3321
3360
 
3322
- row_width = sum(self.column_widths) + len(self.separator)*(len(self.column_widths)-1)
3323
- if row_width - self.leftmost_char < self.rows_w:
3324
- if row_width <= self.rows_w - self.left_gutter_width:
3325
- self.leftmost_char = 0
3326
- else:
3327
- self.leftmost_char = row_width - (self.rows_w - self.left_gutter_width) + 5
3328
3361
  self.stdscr.clear()
3329
3362
  self.stdscr.refresh()
3330
3363
  self.draw_screen()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.16.9
3
+ Version: 0.1.16.10
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes