listpick 0.1.14.9__tar.gz → 0.1.14.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.
Files changed (60) hide show
  1. {listpick-0.1.14.9 → listpick-0.1.14.10}/CHANGELOG.md +3 -1
  2. {listpick-0.1.14.9/src/listpick.egg-info → listpick-0.1.14.10}/PKG-INFO +1 -1
  3. {listpick-0.1.14.9 → listpick-0.1.14.10}/TODO.md +6 -6
  4. {listpick-0.1.14.9 → listpick-0.1.14.10}/setup.py +1 -1
  5. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/listpick_app.py +17 -26
  6. {listpick-0.1.14.9 → listpick-0.1.14.10/src/listpick.egg-info}/PKG-INFO +1 -1
  7. {listpick-0.1.14.9 → listpick-0.1.14.10}/.gitignore +0 -0
  8. {listpick-0.1.14.9 → listpick-0.1.14.10}/LICENSE.txt +0 -0
  9. {listpick-0.1.14.9 → listpick-0.1.14.10}/README.md +0 -0
  10. {listpick-0.1.14.9 → listpick-0.1.14.10}/assets/aria2tui_screenshot.png +0 -0
  11. {listpick-0.1.14.9 → listpick-0.1.14.10}/assets/file_compare.png +0 -0
  12. {listpick-0.1.14.9 → listpick-0.1.14.10}/assets/lpfman.png +0 -0
  13. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/data_generation/list_files.toml +0 -0
  14. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/data_generation/list_files_empty.toml +0 -0
  15. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/data_generation/video_duplicates.toml +0 -0
  16. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/data_generation/video_mediainfo.toml +0 -0
  17. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/input_files/polynomials.tsv +0 -0
  18. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/input_guides/gnuplot_graph.md +0 -0
  19. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
  20. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/picker/footer_string_example.py +0 -0
  21. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/picker/picker_example.py +0 -0
  22. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/picker/template.py +0 -0
  23. {listpick-0.1.14.9 → listpick-0.1.14.10}/examples/picker/wikipedia_table.py +0 -0
  24. {listpick-0.1.14.9 → listpick-0.1.14.10}/listpick.py +0 -0
  25. {listpick-0.1.14.9 → listpick-0.1.14.10}/requirements.txt +0 -0
  26. {listpick-0.1.14.9 → listpick-0.1.14.10}/setup.cfg +0 -0
  27. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/__init__.py +0 -0
  28. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/__main__.py +0 -0
  29. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/__init__.py +0 -0
  30. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/build_help.py +0 -0
  31. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/footer.py +0 -0
  32. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/git-bugreport-2025-08-16-1438.txt +0 -0
  33. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/help_screen.py +0 -0
  34. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/input_field.py +0 -0
  35. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/keys.py +0 -0
  36. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/pane_stuff.py +0 -0
  37. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/ui/picker_colours.py +0 -0
  38. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/__init__.py +0 -0
  39. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/clipboard_operations.py +0 -0
  40. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/config.py +0 -0
  41. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/dump.py +0 -0
  42. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/filtering.py +0 -0
  43. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/generate_data.py +0 -0
  44. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/keycodes.py +0 -0
  45. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/options_selectors.py +0 -0
  46. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/paste_operations.py +0 -0
  47. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/picker_log.py +0 -0
  48. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/search_and_filter_utils.py +0 -0
  49. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/searching.py +0 -0
  50. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/sorting.py +0 -0
  51. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/table_to_list_of_lists.py +0 -0
  52. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/user_input.py +0 -0
  53. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick/utils/utils.py +0 -0
  54. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick.egg-info/SOURCES.txt +0 -0
  55. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick.egg-info/dependency_links.txt +0 -0
  56. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick.egg-info/entry_points.txt +0 -0
  57. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick.egg-info/requires.txt +0 -0
  58. {listpick-0.1.14.9 → listpick-0.1.14.10}/src/listpick.egg-info/top_level.txt +0 -0
  59. {listpick-0.1.14.9 → listpick-0.1.14.10}/tests/kitty_control.sh +0 -0
  60. {listpick-0.1.14.9 → listpick-0.1.14.10}/tests/sorting_dates.csv +0 -0
@@ -24,7 +24,9 @@ Note that the changes between 0.1.11.0 and 1.1.12.0 are listed under 0.1.11
24
24
  - meta+key (input_field)
25
25
  - Added column number to footer
26
26
  - Improved splitting of whitespace separated data passed on stdin.
27
- - Main picker is now refreshed after a resize when there is a notification.
27
+ - Ensured that main picker elements resize if the terminal is resized when other dialogues are in focus: notifications, options, settings.
28
+ - Added method to check for terminal resize.
29
+ - Was necessary since we are no longer using getch from curses so we can't test whether getch() == curses.KEY_RESIZE.
28
30
 
29
31
  ## [0.1.14] 2025-08-20
30
32
  - Fixed bug when cells are centred vertically.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.9
3
+ Version: 0.1.14.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
@@ -14,12 +14,12 @@ ASAP
14
14
  > - [ ] Sheet states remain the same when switching files.
15
15
  > - [x] Deal with nan values in xlsx and ods files.
16
16
  > - [ ] They are set to empyt strings.
17
- > - [ ] Fix special keys not working:
18
- > - [ ] May need to create separate keycodes...
19
- > - [ ] F1-f12
20
- > - [ ] Tab, shift+tab
21
- > - [ ] Delete, shift+delete
22
- > - [ ] Alt+KEY
17
+ > - [x] Fix special keys not working:
18
+ > - [x] May need to create separate keycodes...
19
+ > - [x] F1-f12
20
+ > - [x] Tab, shift+tab
21
+ > - [x] Delete, shift+delete
22
+ > - [x] Alt+KEY
23
23
  > - [x] Arrow keys
24
24
 
25
25
 
@@ -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.14.9",
19
+ version = "0.1.14.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.",
@@ -1370,7 +1370,6 @@ class Picker:
1370
1370
  "cancel_is_back": True,
1371
1371
  "number_columns": False,
1372
1372
  "reset_colours": False,
1373
- "cell_cursor": False,
1374
1373
  }
1375
1374
  while True:
1376
1375
  h, w = stdscr.getmaxyx()
@@ -1390,7 +1389,7 @@ class Picker:
1390
1389
  if s:
1391
1390
  return {x: options[x] for x in s}, o, f
1392
1391
  return {}, "", f
1393
-
1392
+
1394
1393
 
1395
1394
 
1396
1395
  def notification(self, stdscr: curses.window, message: str="", title:str="Notification", colours_end: int=0, duration:int=4) -> None:
@@ -1401,12 +1400,7 @@ class Picker:
1401
1400
  message_width = notification_width-5
1402
1401
 
1403
1402
  if not message: message = "!!"
1404
- if type(message) == type(""):
1405
- mw = message_width
1406
- submenu_items = [[message[i*mw:(i+1)*mw]] for i in range(len(message)//mw+1)]
1407
- elif type(message) != type([]):
1408
- submenu_items = [[" !!"]]
1409
-
1403
+ submenu_items = [" "+message[i*message_width:(i+1)*message_width] for i in range(len(message)//message_width+1)]
1410
1404
 
1411
1405
  notification_remap_keys = {
1412
1406
  curses.KEY_RESIZE: curses.KEY_F5,
@@ -1416,12 +1410,6 @@ class Picker:
1416
1410
  h, w = stdscr.getmaxyx()
1417
1411
 
1418
1412
  submenu_win = curses.newwin(notification_height, notification_width, 3, w - (notification_width+4))
1419
- # submenu_win = self.stdscr.subwin(notification_height, notification_width, 3, w - (notification_width+4))
1420
- def update_after_resize():
1421
- h, w = self.stdscr.getmaxyx()
1422
- submenu_win.mvwin(3, w - (notification_width+4))
1423
- self.draw_screen(self.indexed_items, self.highlights)
1424
-
1425
1413
  notification_data = {
1426
1414
  "items": submenu_items,
1427
1415
  "title": title,
@@ -1438,19 +1426,9 @@ class Picker:
1438
1426
  "cancel_is_back": True,
1439
1427
  "reset_colours": False,
1440
1428
 
1441
- "loaded_files": [],
1442
- "loaded_file_states": [],
1443
- "loaded_file": "",
1444
- "loaded_file_index": 0,
1445
- "cell_cursor": False,
1446
- # "redraw_screen_accessory": lambda : self.draw_screen(self.indexed_items, self.highlights),
1447
- "redraw_screen_accessory": update_after_resize,
1448
- "get_new_data": False,
1449
- # "key_remappings": notification_remap_keys,
1450
1429
  }
1451
1430
  OptionPicker = Picker(submenu_win, **notification_data)
1452
1431
  s, o, f = OptionPicker.run()
1453
- os.system(f"notify-send resizing")
1454
1432
 
1455
1433
  if o != "refresh": break
1456
1434
  submenu_win.clear()
@@ -1459,7 +1437,6 @@ class Picker:
1459
1437
  stdscr.clear()
1460
1438
  stdscr.refresh()
1461
1439
  self.draw_screen(self.indexed_items, self.highlights)
1462
-
1463
1440
  # set_colours(colours=get_colours(0))
1464
1441
 
1465
1442
  def toggle_column_visibility(self, col_index:int) -> None:
@@ -2248,6 +2225,13 @@ class Picker:
2248
2225
  # Open tty to accept input
2249
2226
  tty_fd = open_tty()
2250
2227
 
2228
+ h, w = self.stdscr.getmaxyx()
2229
+ def terminal_resized(old_w, old_h) -> bool:
2230
+ w, h = os.get_terminal_size()
2231
+ if old_h != h or old_w != w: return True
2232
+ else: return False
2233
+
2234
+ COLS, LINES = os.get_terminal_size()
2251
2235
  # Main loop
2252
2236
  while True:
2253
2237
  # key = self.stdscr.getch()
@@ -2255,7 +2239,14 @@ class Picker:
2255
2239
  key = get_char(tty_fd, timeout=0.2)
2256
2240
  if key != -1:
2257
2241
  self.logger.info(f"key={key}")
2242
+
2243
+ self.term_resize_event = terminal_resized(COLS, LINES)
2244
+ COLS, LINES = os.get_terminal_size()
2245
+ if self.term_resize_event:
2246
+ key = curses.KEY_RESIZE
2247
+
2258
2248
  h, w = self.stdscr.getmaxyx()
2249
+
2259
2250
  if key in self.disabled_keys: continue
2260
2251
  clear_screen=True
2261
2252
 
@@ -3110,7 +3101,7 @@ class Picker:
3110
3101
  self.logger.info(f"key_function opts_select")
3111
3102
  s, o, f = self.choose_option(self.stdscr, self.options_list)
3112
3103
  if self.user_opts.strip(): self.user_opts += " "
3113
- self.user_opts += " ".join([x for x in s.values()])
3104
+ self.user_opts += " ".join([x[0] for x in s.values()])
3114
3105
  elif self.check_key("notification_toggle", key, self.keys_dict):
3115
3106
  self.logger.info(f"key_function notification_toggle")
3116
3107
  self.notification(self.stdscr, colours_end=self.colours_end)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.9
3
+ Version: 0.1.14.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