listpick 0.1.15.2__tar.gz → 0.1.15.4__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 (63) hide show
  1. {listpick-0.1.15.2 → listpick-0.1.15.4}/CHANGELOG.md +7 -0
  2. {listpick-0.1.15.2/src/listpick.egg-info → listpick-0.1.15.4}/PKG-INFO +1 -1
  3. {listpick-0.1.15.2 → listpick-0.1.15.4}/setup.py +1 -1
  4. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/listpick_app.py +33 -20
  5. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/filtering.py +1 -0
  6. {listpick-0.1.15.2 → listpick-0.1.15.4/src/listpick.egg-info}/PKG-INFO +1 -1
  7. {listpick-0.1.15.2 → listpick-0.1.15.4}/.gitignore +0 -0
  8. {listpick-0.1.15.2 → listpick-0.1.15.4}/LICENSE.txt +0 -0
  9. {listpick-0.1.15.2 → listpick-0.1.15.4}/README.md +0 -0
  10. {listpick-0.1.15.2 → listpick-0.1.15.4}/TODO.md +0 -0
  11. {listpick-0.1.15.2 → listpick-0.1.15.4}/assets/aria2tui_screenshot.png +0 -0
  12. {listpick-0.1.15.2 → listpick-0.1.15.4}/assets/file_compare.png +0 -0
  13. {listpick-0.1.15.2 → listpick-0.1.15.4}/assets/lpfman.png +0 -0
  14. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/data_generation/list_files.toml +0 -0
  15. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/data_generation/list_files_empty.toml +0 -0
  16. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/data_generation/video_duplicates.toml +0 -0
  17. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/data_generation/video_mediainfo.toml +0 -0
  18. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/input_files/polynomials.tsv +0 -0
  19. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/input_guides/gnuplot_graph.md +0 -0
  20. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
  21. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/picker/footer_string_example.py +0 -0
  22. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/picker/picker_example.py +0 -0
  23. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/picker/template.py +0 -0
  24. {listpick-0.1.15.2 → listpick-0.1.15.4}/examples/picker/wikipedia_table.py +0 -0
  25. {listpick-0.1.15.2 → listpick-0.1.15.4}/listpick.py +0 -0
  26. {listpick-0.1.15.2 → listpick-0.1.15.4}/requirements.txt +0 -0
  27. {listpick-0.1.15.2 → listpick-0.1.15.4}/setup.cfg +0 -0
  28. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/__init__.py +0 -0
  29. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/__main__.py +0 -0
  30. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/pane/__init__.py +0 -0
  31. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/pane/get_data.py +0 -0
  32. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/pane/pane_functions.py +0 -0
  33. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/pane/pane_utils.py +0 -0
  34. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/ui/__init__.py +0 -0
  35. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/ui/build_help.py +0 -0
  36. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/ui/footer.py +0 -0
  37. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/ui/help_screen.py +0 -0
  38. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/ui/input_field.py +0 -0
  39. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/ui/keys.py +0 -0
  40. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/ui/picker_colours.py +0 -0
  41. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/__init__.py +0 -0
  42. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/clipboard_operations.py +0 -0
  43. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/config.py +0 -0
  44. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/dump.py +0 -0
  45. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/generate_data.py +0 -0
  46. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/graphing.py +0 -0
  47. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/keycodes.py +0 -0
  48. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/options_selectors.py +0 -0
  49. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/paste_operations.py +0 -0
  50. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/picker_log.py +0 -0
  51. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/search_and_filter_utils.py +0 -0
  52. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/searching.py +0 -0
  53. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/sorting.py +0 -0
  54. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/table_to_list_of_lists.py +0 -0
  55. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/user_input.py +0 -0
  56. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick/utils/utils.py +0 -0
  57. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick.egg-info/SOURCES.txt +0 -0
  58. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick.egg-info/dependency_links.txt +0 -0
  59. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick.egg-info/entry_points.txt +0 -0
  60. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick.egg-info/requires.txt +0 -0
  61. {listpick-0.1.15.2 → listpick-0.1.15.4}/src/listpick.egg-info/top_level.txt +0 -0
  62. {listpick-0.1.15.2 → listpick-0.1.15.4}/tests/kitty_control.sh +0 -0
  63. {listpick-0.1.15.2 → listpick-0.1.15.4}/tests/sorting_dates.csv +0 -0
@@ -1,6 +1,13 @@
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.15.4] 2025-07-27
5
+ - Fixed error with filtering when there are no rows.
6
+ - Fixed error with changing modes when there are no rows.
7
+
8
+ ## [0.1.15.3] 2025-07-27
9
+ - Added error checking when setting the cursor_pos_id in fetch_data.
10
+
4
11
  ## [0.1.15.1] 2025-07-27
5
12
  - Added key to toggle right pane.
6
13
  - Improved appearance of help screen.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.15.2
3
+ Version: 0.1.15.4
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.15.2",
19
+ version = "0.1.15.4",
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.",
@@ -2037,7 +2037,11 @@ class Picker:
2037
2037
  self.selected_cells_by_row = get_selected_cells_by_row(self.cell_selections)
2038
2038
 
2039
2039
  if len(self.indexed_items) > 0 and len(self.indexed_items) >= self.cursor_pos and len(self.indexed_items[0][1]) >= self.id_column:
2040
- self.cursor_pos_id = self.indexed_items[self.cursor_pos][1][self.id_column]
2040
+ try:
2041
+ self.cursor_pos_id = self.indexed_items[self.cursor_pos][1][self.id_column]
2042
+ except:
2043
+ self.logger.warning(f"fetch_data() len(indexed_items)={len(self.indexed_items)}, cusor_pos={self.cursor_pos}")
2044
+ self.cursor_pos_id = -1
2041
2045
  self.cursor_pos_prev = self.cursor_pos
2042
2046
  with self.data_lock:
2043
2047
  self.items, self.header = tmp_items, tmp_header
@@ -3191,14 +3195,21 @@ class Picker:
3191
3195
  if 'filter' in self.modes[prev_mode_index]:
3192
3196
  self.filter_query = self.filter_query.replace(self.modes[prev_mode_index]['filter'], '')
3193
3197
  self.filter_query = f"{self.filter_query.strip()} {val.strip()}".strip()
3194
- prev_index = self.indexed_items[self.cursor_pos][0] if len(self.indexed_items)>0 else 0
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
3195
3203
 
3196
3204
  self.indexed_items = filter_items(self.items, self.indexed_items, self.filter_query)
3197
- 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)
3198
- else: new_index = 0
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
3199
3209
  self.cursor_pos = new_index
3200
3210
  # Re-sort self.items after applying filter
3201
- 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
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
3202
3213
  elif self.check_key("mode_prev", key, self.keys_dict): # shift+tab key
3203
3214
  self.logger.info(f"key_function mode_prev")
3204
3215
  if len(self.modes):
@@ -3211,6 +3222,8 @@ class Picker:
3211
3222
  self.filter_query = self.filter_query.replace(self.modes[prev_mode_index]['filter'], '')
3212
3223
  self.filter_query = f"{self.filter_query.strip()} {val.strip()}".strip()
3213
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 != [[]]:
3214
3227
  self.indexed_items = filter_items(self.items, self.indexed_items, self.filter_query)
3215
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)
3216
3229
  else: new_index = 0
@@ -3707,21 +3720,21 @@ def main() -> None:
3707
3720
  pass
3708
3721
 
3709
3722
  # function_data["colour_theme_number"] = 3
3710
- # function_data["modes"] = [
3711
- # {
3712
- # 'filter': '',
3713
- # 'sort': 0,
3714
- # 'name': 'All',
3715
- # },
3716
- # {
3717
- # 'filter': '--2 miss',
3718
- # 'name': 'miss',
3719
- # },
3720
- # {
3721
- # 'filter': '--2 mp4',
3722
- # 'name': 'mp4',
3723
- # },
3724
- # ]
3723
+ function_data["modes"] = [
3724
+ {
3725
+ 'filter': '',
3726
+ 'sort': 0,
3727
+ 'name': 'All',
3728
+ },
3729
+ {
3730
+ 'filter': '--2 miss',
3731
+ 'name': 'miss',
3732
+ },
3733
+ {
3734
+ 'filter': '--2 mp4',
3735
+ 'name': 'mp4',
3736
+ },
3737
+ ]
3725
3738
  highlights = [
3726
3739
  {
3727
3740
  "field": 1,
@@ -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
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.15.2
3
+ Version: 0.1.15.4
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