listpick 0.1.13.25__tar.gz → 0.1.13.26__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 (55) hide show
  1. {listpick-0.1.13.25/src/listpick.egg-info → listpick-0.1.13.26}/PKG-INFO +1 -1
  2. {listpick-0.1.13.25 → listpick-0.1.13.26}/setup.py +1 -1
  3. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/listpick_app.py +26 -22
  4. {listpick-0.1.13.25 → listpick-0.1.13.26/src/listpick.egg-info}/PKG-INFO +1 -1
  5. {listpick-0.1.13.25 → listpick-0.1.13.26}/.gitignore +0 -0
  6. {listpick-0.1.13.25 → listpick-0.1.13.26}/CHANGELOG.md +0 -0
  7. {listpick-0.1.13.25 → listpick-0.1.13.26}/LICENSE.txt +0 -0
  8. {listpick-0.1.13.25 → listpick-0.1.13.26}/README.md +0 -0
  9. {listpick-0.1.13.25 → listpick-0.1.13.26}/TODO.md +0 -0
  10. {listpick-0.1.13.25 → listpick-0.1.13.26}/assets/aria2tui_screenshot.png +0 -0
  11. {listpick-0.1.13.25 → listpick-0.1.13.26}/assets/file_compare.png +0 -0
  12. {listpick-0.1.13.25 → listpick-0.1.13.26}/assets/lpfman.png +0 -0
  13. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/footer_string_example.py +0 -0
  14. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/input.toml +0 -0
  15. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/input.txt +0 -0
  16. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/list_files.toml +0 -0
  17. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/list_files_empty.toml +0 -0
  18. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/picker_example.py +0 -0
  19. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/setup.cfg +0 -0
  20. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/template.py +0 -0
  21. {listpick-0.1.13.25 → listpick-0.1.13.26}/examples/video_duplicates.toml +0 -0
  22. {listpick-0.1.13.25 → listpick-0.1.13.26}/listpick.py +0 -0
  23. {listpick-0.1.13.25 → listpick-0.1.13.26}/requirements.txt +0 -0
  24. {listpick-0.1.13.25 → listpick-0.1.13.26}/setup.cfg +0 -0
  25. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/__init__.py +0 -0
  26. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/__main__.py +0 -0
  27. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/__init__.py +0 -0
  28. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/build_help.py +0 -0
  29. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/footer.py +0 -0
  30. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/help_screen.py +0 -0
  31. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/input_field.py +0 -0
  32. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/keys.py +0 -0
  33. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/pane_stuff.py +0 -0
  34. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/ui/picker_colours.py +0 -0
  35. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/__init__.py +0 -0
  36. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/clipboard_operations.py +0 -0
  37. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/config.py +0 -0
  38. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/dump.py +0 -0
  39. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/filtering.py +0 -0
  40. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/generate_data.py +0 -0
  41. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/options_selectors.py +0 -0
  42. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/paste_operations.py +0 -0
  43. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/picker_log.py +0 -0
  44. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/search_and_filter_utils.py +0 -0
  45. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/searching.py +0 -0
  46. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/sorting.py +0 -0
  47. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/table_to_list_of_lists.py +0 -0
  48. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick/utils/utils.py +0 -0
  49. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick.egg-info/SOURCES.txt +0 -0
  50. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick.egg-info/dependency_links.txt +0 -0
  51. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick.egg-info/entry_points.txt +0 -0
  52. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick.egg-info/requires.txt +0 -0
  53. {listpick-0.1.13.25 → listpick-0.1.13.26}/src/listpick.egg-info/top_level.txt +0 -0
  54. {listpick-0.1.13.25 → listpick-0.1.13.26}/tests/kitty_control.sh +0 -0
  55. {listpick-0.1.13.25 → listpick-0.1.13.26}/tests/sorting_dates.csv +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.13.25
3
+ Version: 0.1.13.26
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.13.25",
19
+ version = "0.1.13.26",
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.",
@@ -324,6 +324,7 @@ class Picker:
324
324
  # self.footer = CompactFooter(self.stdscr, colours_start, self.get_function_data)
325
325
 
326
326
 
327
+
327
328
  def calculate_section_sizes(self):
328
329
  """
329
330
  Calculte the following for the Picker:
@@ -598,6 +599,8 @@ class Picker:
598
599
  else:
599
600
  self.cursor_pos = 0
600
601
 
602
+ if self.display_infobox:
603
+ self.infobox_picker = self.infobox(self.stdscr, self.infobox_items, self.infobox_title)
601
604
 
602
605
 
603
606
  def move_column(self, direction: int) -> None:
@@ -988,15 +991,23 @@ class Picker:
988
991
  ## Display infobox
989
992
  if self.display_infobox:
990
993
  # self.stdscr.refresh()
991
- self.infobox(self.stdscr, message=self.infobox_items, title=self.infobox_title)
994
+ # self.infobox(self.stdscr, message=self.infobox_items, title=self.infobox_title)
995
+
996
+ infobox_width, infobox_height = w//2, 3*h//5
997
+ infobox_x, infobox_y = w - (infobox_width + 4), 3
998
+ self.infobox_picker.stdscr.mvwin(infobox_y, infobox_x)
999
+ self.infobox_picker.stdscr.resize(infobox_height, infobox_width)
1000
+ self.infobox_picker.run()
1001
+ self.infobox_picker.stdscr.noutrefresh()
1002
+ else:
1003
+ self.stdscr.noutrefresh()
992
1004
 
993
- # if not self.display_only:
994
- # self.stdscr.refresh()
995
- # self.stdscr.timeout(2000) # timeout is set to 50 in order to get the infobox to be displayed so here we reset it to 2000
996
1005
 
1006
+ if not self.display_only:
1007
+ curses.doupdate()
997
1008
 
998
1009
 
999
- def infobox(self, stdscr: curses.window, message: str ="", title: str ="Infobox", colours_end: int = 0, duration: int = 4) -> curses.window:
1010
+ def infobox(self, stdscr: curses.window, message: list =[], title: str ="Infobox", colours_end: int = 0, duration: int = 4):
1000
1011
  """ Display non-interactive infobox window. """
1001
1012
 
1002
1013
  self.logger.info(f"function: infobox()")
@@ -1004,6 +1015,7 @@ class Picker:
1004
1015
  notification_width, notification_height = w//2, 3*h//5
1005
1016
  message_width = notification_width-5
1006
1017
 
1018
+ notification_x, notification_y = w-(notification_width+4), 3
1007
1019
  if not message: message = "!!"
1008
1020
  if isinstance(message, str):
1009
1021
  submenu_items = [" "+message[i*message_width:(i+1)*message_width] for i in range(len(message)//message_width+1)]
@@ -1019,10 +1031,7 @@ class Picker:
1019
1031
  # while True:
1020
1032
  h, w = stdscr.getmaxyx()
1021
1033
 
1022
- # submenu_win = curses.newwin(notification_height, notification_width, 3, w - (notification_width+4))
1023
- submenu_win = self.stdscr.subpad(notification_height, notification_width, 3, w - (notification_width+4))
1024
- submenu_win.erase()
1025
- # submenu_win.untouchwin()
1034
+ submenu_win = self.stdscr.derwin(notification_height, notification_width, 3, w - (notification_width+4))
1026
1035
  infobox_data = {
1027
1036
  "items": submenu_items,
1028
1037
  "colours": notification_colours,
@@ -1036,12 +1045,9 @@ class Picker:
1036
1045
  "title": title,
1037
1046
  "reset_colours": False,
1038
1047
  }
1039
-
1040
- # for i in range(3, 3+notification_height):
1041
- # self.stdscr.addstr(i, w - (notification_width+4), ' '*notification_width, curses.color_pair(4))
1048
+ submenu_win.noutrefresh()
1042
1049
  OptionPicker = Picker(submenu_win, **infobox_data)
1043
- s, o, f = OptionPicker.run()
1044
- submenu_win.refresh()
1050
+ return OptionPicker
1045
1051
 
1046
1052
 
1047
1053
  def get_function_data(self) -> dict:
@@ -1936,7 +1942,7 @@ class Picker:
1936
1942
  # curses.curs_set(0)
1937
1943
  # stdscr.nodelay(1) # Non-blocking input
1938
1944
  # stdscr.timeout(2000) # Set a timeout for getch() to ensure it does not block indefinitely
1939
- self.stdscr.timeout(max(min(2000, int(self.timer*1000)//2, int(self.footer_timer*1000))//2, 20)) # Set a timeout for getch() to ensure it does not block indefinitely
1945
+ # self.stdscr.timeout(max(min(2000, int(self.timer*1000)//2, int(self.footer_timer*1000))//2, 20)) # Set a timeout for getch() to ensure it does not block indefinitely
1940
1946
 
1941
1947
  if self.clear_on_start:
1942
1948
  self.stdscr.clear()
@@ -1953,8 +1959,6 @@ class Picker:
1953
1959
  self.draw_screen(self.indexed_items, self.highlights)
1954
1960
 
1955
1961
  if self.display_only:
1956
- # self.stdscr.refresh()
1957
- # function_data = self.get_function_data()
1958
1962
  return [], "", {}
1959
1963
 
1960
1964
  # Main loop
@@ -1982,8 +1986,8 @@ class Picker:
1982
1986
 
1983
1987
  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() - initial_time) >= self.timer):
1984
1988
  self.logger.debug(f"Get new data (refresh).")
1985
- self.stdscr.addstr(0,w-3,"  ", curses.color_pair(self.colours_start+21) | curses.A_BOLD)
1986
- self.stdscr.refresh()
1989
+ # self.stdscr.addstr(0,w-3,"  ", curses.color_pair(self.colours_start+21) | curses.A_BOLD)
1990
+ # self.stdscr.refresh()
1987
1991
  if self.get_new_data and self.refresh_function:
1988
1992
  self.refreshing_data = True
1989
1993
 
@@ -3158,9 +3162,9 @@ def main() -> None:
3158
3162
  function_data["centre_in_terminal_vertical"] = True
3159
3163
  function_data["highlight_full_row"] = True
3160
3164
  function_data["pin_cursor"] = True
3161
- # function_data["display_infobox"] = True
3162
- # function_data["infobox_items"] = [["1"], ["2"], ["3"]]
3163
- # function_data["infobox_title"] = "Title"
3165
+ function_data["display_infobox"] = True
3166
+ function_data["infobox_items"] = [["1"], ["2"], ["3"]]
3167
+ function_data["infobox_title"] = "Title"
3164
3168
 
3165
3169
 
3166
3170
  # function_data["debug"] = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.13.25
3
+ Version: 0.1.13.26
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
File without changes