listpick 0.1.14.0__tar.gz → 0.1.14.1__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 (46) hide show
  1. {listpick-0.1.14.0 → listpick-0.1.14.1}/CHANGELOG.md +6 -1
  2. {listpick-0.1.14.0/src/listpick.egg-info → listpick-0.1.14.1}/PKG-INFO +1 -1
  3. {listpick-0.1.14.0 → listpick-0.1.14.1}/TODO.md +15 -11
  4. {listpick-0.1.14.0 → listpick-0.1.14.1}/setup.py +1 -1
  5. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/listpick_app.py +113 -8
  6. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/keys.py +5 -4
  7. {listpick-0.1.14.0 → listpick-0.1.14.1/src/listpick.egg-info}/PKG-INFO +1 -1
  8. {listpick-0.1.14.0 → listpick-0.1.14.1}/.gitignore +0 -0
  9. {listpick-0.1.14.0 → listpick-0.1.14.1}/LICENSE.txt +0 -0
  10. {listpick-0.1.14.0 → listpick-0.1.14.1}/README.md +0 -0
  11. {listpick-0.1.14.0 → listpick-0.1.14.1}/assets/aria2tui_screenshot.png +0 -0
  12. {listpick-0.1.14.0 → listpick-0.1.14.1}/assets/file_compare.png +0 -0
  13. {listpick-0.1.14.0 → listpick-0.1.14.1}/assets/lpfman.png +0 -0
  14. {listpick-0.1.14.0 → listpick-0.1.14.1}/listpick.py +0 -0
  15. {listpick-0.1.14.0 → listpick-0.1.14.1}/requirements.txt +0 -0
  16. {listpick-0.1.14.0 → listpick-0.1.14.1}/setup.cfg +0 -0
  17. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/__init__.py +0 -0
  18. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/__main__.py +0 -0
  19. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/__init__.py +0 -0
  20. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/build_help.py +0 -0
  21. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/footer.py +0 -0
  22. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/help_screen.py +0 -0
  23. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/input_field.py +0 -0
  24. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/pane_stuff.py +0 -0
  25. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/ui/picker_colours.py +0 -0
  26. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/__init__.py +0 -0
  27. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/clipboard_operations.py +0 -0
  28. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/config.py +0 -0
  29. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/dump.py +0 -0
  30. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/filtering.py +0 -0
  31. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/generate_data.py +0 -0
  32. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/options_selectors.py +0 -0
  33. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/paste_operations.py +0 -0
  34. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/picker_log.py +0 -0
  35. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/search_and_filter_utils.py +0 -0
  36. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/searching.py +0 -0
  37. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/sorting.py +0 -0
  38. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/table_to_list_of_lists.py +0 -0
  39. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick/utils/utils.py +0 -0
  40. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick.egg-info/SOURCES.txt +0 -0
  41. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick.egg-info/dependency_links.txt +0 -0
  42. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick.egg-info/entry_points.txt +0 -0
  43. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick.egg-info/requires.txt +0 -0
  44. {listpick-0.1.14.0 → listpick-0.1.14.1}/src/listpick.egg-info/top_level.txt +0 -0
  45. {listpick-0.1.14.0 → listpick-0.1.14.1}/tests/kitty_control.sh +0 -0
  46. {listpick-0.1.14.0 → listpick-0.1.14.1}/tests/sorting_dates.csv +0 -0
@@ -1,5 +1,10 @@
1
1
  # CHANGELOG.md
2
- ## [0.1.14] 2025-??
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.15] 2025-??-??
5
+ - Added info screen to display all information on the running Picker.
6
+
7
+ ## [0.1.14] 2025-08-20
3
8
  - Fixed bug when cells are centred vertically.
4
9
  - Added "level" keyword for highlight dictionary.
5
10
  - l0: show highlight above base rows
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.0
3
+ Version: 0.1.14.1
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
@@ -9,17 +9,8 @@ ASAP
9
9
  > - [ ] Make input field look better:
10
10
  > - [ ] During input
11
11
  > - [ ] While being displayed.
12
- > - [ ] Handle multiple files
13
- > - [x] Display 'open' files in footer
14
- > - [x] Open multiple files with file_picker
15
- > - [x] Switch between 'open' files
16
- > - [ ] Handle unsaved files.
17
- > - [x] Remember state when switching between files.
18
- > - [x] Selections
19
- > - [ ] Add support in the alternate footers
20
- > - [x] Handle files with multiple sheets.
21
- > - [ ] Add support in the alternate footers
22
- > - [ ] Support opening multiple files from the command line.
12
+ > - [ ] Add keys for next page, next sheet, info
13
+ > - [ ] Sort out what to do when the width of the columns is less than the terminal.
23
14
 
24
15
 
25
16
 
@@ -276,6 +267,19 @@ ASAP
276
267
  > - [ ] Add row selection using 'V'--select all cells in a row.
277
268
  > - [ ] Add option for those who don't use a nerdfont.
278
269
  > - [ ] refreshing symbol, pin cursor symbol,
270
+ > - [x] Add info page.
271
+ > - [ ] Handle multiple files
272
+ > - [x] Display 'open' files in footer
273
+ > - [x] Open multiple files with file_picker
274
+ > - [x] Switch between 'open' files
275
+ > - [ ] Handle unsaved files.
276
+ > - [x] Remember state when switching between files.
277
+ > - [x] Selections
278
+ > - [ ] Add support in the alternate footers
279
+ > - [ ] Add symbol in footer list to show if file has been edited or is unsaved
280
+ > - [x] Handle files with multiple sheets.
281
+ > - [ ] Add support in the alternate footers
282
+ > - [x] Support opening multiple files from the command line.
279
283
 
280
284
  > [!Bug] Bugs
281
285
  > - [ ] fix resizing when input field active
@@ -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.0",
19
+ version = "0.1.14.1",
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.",
@@ -123,7 +123,7 @@ class Picker:
123
123
 
124
124
  paginate: bool =False,
125
125
  cancel_is_back: bool = False,
126
- mode_index: int =0,
126
+ mode_index: int = 0,
127
127
  modes: list[dict] = [],
128
128
  display_modes: bool =False,
129
129
  require_option: list=[],
@@ -162,10 +162,8 @@ class Picker:
162
162
 
163
163
  startup_notification:str = "",
164
164
 
165
- leftmost_column: int = 0,
166
165
  leftmost_char: int = 0,
167
166
 
168
-
169
167
  history_filter_and_search: list[str] = [],
170
168
  history_opts: list[str] = [],
171
169
  history_settings: list[str] = [],
@@ -299,7 +297,6 @@ class Picker:
299
297
 
300
298
  self.SORT_METHODS = SORT_METHODS
301
299
  self.command_stack = command_stack
302
- self.leftmost_column = leftmost_column
303
300
  self.leftmost_char = leftmost_char
304
301
 
305
302
 
@@ -321,8 +318,6 @@ class Picker:
321
318
  self.history_edits = history_edits
322
319
 
323
320
 
324
-
325
-
326
321
  self.debug = debug
327
322
  self.debug_level = debug_level
328
323
 
@@ -343,9 +338,17 @@ class Picker:
343
338
  # Note: We have to set the footer after initialising the picker state so that the footer can use the get_function_data method
344
339
  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)]
345
340
  self.footer = self.footer_options[self.footer_style]
341
+ self.__version__ = "1.0"
346
342
 
343
+ def __sizeof__(self):
347
344
 
348
-
345
+ size = super().__sizeof__()
346
+
347
+ # Add the size of each attribute directly owned by the object
348
+ for attr_name in dir(self):
349
+ if not attr_name.startswith('__') and not callable(getattr(self, attr_name)):
350
+ size += sys.getsizeof(getattr(self, attr_name))
351
+ return size
349
352
 
350
353
  def calculate_section_sizes(self):
351
354
  """
@@ -1170,7 +1173,6 @@ class Picker:
1170
1173
  "keys_dict": self.keys_dict,
1171
1174
  "cancel_is_back": self.cancel_is_back,
1172
1175
  "paginate": self.paginate,
1173
- "leftmost_column": self.leftmost_column,
1174
1176
  "leftmost_char": self.leftmost_char,
1175
1177
  "history_filter_and_search" : self.history_filter_and_search,
1176
1178
  "history_pipes" : self.history_pipes,
@@ -2227,6 +2229,108 @@ class Picker:
2227
2229
  }
2228
2230
  OptionPicker = Picker(self.stdscr, **help_data)
2229
2231
  s, o, f = OptionPicker.run()
2232
+ self.draw_screen(self.indexed_items, self.highlights)
2233
+
2234
+ if self.check_key("info", key, self.keys_dict):
2235
+ self.logger.info(f"key_function help")
2236
+ self.stdscr.clear()
2237
+ self.stdscr.refresh()
2238
+ import importlib.metadata as metadata
2239
+ version = metadata.version('listpick')
2240
+
2241
+ info_items = [
2242
+ [" Listpick info:", "-*"*30],
2243
+ ["",""],
2244
+ ["listpick version", f"{version}"],
2245
+
2246
+ ["",""],
2247
+ [" Global:", "-*"*30],
2248
+ ["",""],
2249
+ ["current_file", self.loaded_file],
2250
+ ["loaded_files", repr(self.loaded_files)],
2251
+ ["auto_refresh", f"{repr(self.auto_refresh)}"],
2252
+ ["timer", f"{repr(self.timer)}"],
2253
+ ["pin_cursor", f"{repr(self.pin_cursor)}"],
2254
+ ["cwd", f"{os.getcwd()}"],
2255
+ ["Picker memory", f"{format_size(sys.getsizeof(self))}"],
2256
+ ["debug", f"{repr(self.debug)}"],
2257
+ ["debug level", f"{repr(self.debug_level)}"],
2258
+
2259
+ ["",""],
2260
+ [" Current File:", "-*"*30],
2261
+ ["",""],
2262
+ ["row/row count", f"{self.cursor_pos}/{len(self.indexed_items)}"],
2263
+ ["total rows", f"{len(self.items)}"],
2264
+ ["selections", f"{self.selected_cells_by_row}"],
2265
+ ["current_sheet", self.sheet_name],
2266
+ ["sheets", repr(self.sheets)],
2267
+ ["current column/column_count", f"{self.selected_column}/{len(self.column_widths)}"],
2268
+ ["hidden columns", f"{self.hidden_columns}"],
2269
+ ["sort column", f"{self.sort_column}"],
2270
+ ["sort method", f"{self.SORT_METHODS[self.columns_sort_method[self.sort_column]]}"],
2271
+ ["sort order", f"{'Descending' if self.sort_reverse[self.sort_column] else 'Ascending'}"],
2272
+ ["id_column", f"{self.id_column}"],
2273
+
2274
+ ["",""],
2275
+ [" Display options:", "-*"*30],
2276
+ ["",""],
2277
+ ["show_header", str(self.show_header)],
2278
+ ["show_footer", repr(self.show_footer)],
2279
+ ["show_row_header", repr(self.show_row_header)],
2280
+ ["max_column_width", str(self.max_column_width)],
2281
+ ["colour_theme_number", str(self.colour_theme_number)],
2282
+ ["top_gap", str(self.top_gap)],
2283
+ ["highlight_full_row", repr(self.highlight_full_row)],
2284
+ ["cell_cursor", repr(self.cell_cursor)],
2285
+ ["items_per_page", repr(self.items_per_page)],
2286
+ ["paginate", repr(self.paginate)],
2287
+ ["display_modes", repr(self.display_modes)],
2288
+ ["footer_style", repr(self.footer_style)],
2289
+ ["unicode_char_width", repr(self.unicode_char_width)],
2290
+ ["centre_in_terminal", repr(self.centre_in_terminal)],
2291
+ ["centre_in_cols", repr(self.centre_in_cols)],
2292
+ ["centre_in_terminal_vertical", repr(self.centre_in_terminal_vertical)],
2293
+ ]
2294
+
2295
+ data = self.get_function_data()
2296
+ del data["indexed_items"]
2297
+ del data["selections"]
2298
+ del data["selected_cells_by_row"]
2299
+ del data["cell_selections"]
2300
+ del data["items"]
2301
+ del data["require_option"]
2302
+ del data["option_functions"]
2303
+ info_items += [
2304
+ ["",""],
2305
+ [" get_function_data():", "-*"*30],
2306
+ ["",""],
2307
+ ["show_header", str(self.show_header)],
2308
+ ]
2309
+ info_items += [[key, repr(value)] for key, value in data.items()]
2310
+ info_header = ["Option", "Value"]
2311
+ info_data = {
2312
+ "items": info_items,
2313
+ "header": info_header,
2314
+ "title": f"{self.title} Info",
2315
+ "colours_start": self.help_colours_start,
2316
+ "colours": help_colours,
2317
+ "show_footer": True,
2318
+ "max_selected": 1,
2319
+ "keys_dict": help_keys,
2320
+ "disabled_keys": [ord('?'), ord('v'), ord('V'), ord('m'), ord('M'), ord('l'), curses.KEY_ENTER, ord('\n')],
2321
+ "highlight_full_row": True,
2322
+ "top_gap": 0,
2323
+ "paginate": self.paginate,
2324
+ "centre_in_terminal": False,
2325
+ "centre_in_terminal_vertical": True,
2326
+ "hidden_columns": [],
2327
+ "reset_colours": False,
2328
+
2329
+ }
2330
+ OptionPicker = Picker(self.stdscr, **info_data)
2331
+ s, o, f = OptionPicker.run()
2332
+
2333
+ self.draw_screen(self.indexed_items, self.highlights)
2230
2334
 
2231
2335
  elif self.check_key("exit", key, self.keys_dict):
2232
2336
  self.stdscr.clear()
@@ -2247,6 +2351,7 @@ class Picker:
2247
2351
  else:
2248
2352
  self.set_function_data({}, reset_absent_variables=True)
2249
2353
  self.load_file(self.loaded_file)
2354
+ self.draw_screen(self.indexed_items, self.highlights)
2250
2355
 
2251
2356
  elif self.check_key("full_exit", key, self.keys_dict):
2252
2357
  close_curses(self.stdscr)
@@ -47,8 +47,8 @@ picker_keys = {
47
47
  "search_input": [ord('/')],
48
48
  "settings_input": [ord('`')],
49
49
  "settings_options": [ord('~')],
50
- "continue_search_forward": [ord('n'), ord('i')],
51
- "continue_search_backward": [ord('N'), ord('I')],
50
+ "continue_search_forward": [ord('n')],
51
+ "continue_search_backward": [ord('N')],
52
52
  "cancel": [27], # Escape key
53
53
  "opts_input": [ord(':')],
54
54
  "opts_select": [ord('o')],
@@ -80,6 +80,7 @@ picker_keys = {
80
80
  "add_column_after": [ord('+')],
81
81
  # "add_row_before": [ord('=')],
82
82
  "add_row_after": [ord('=')],
83
+ "info": [ord('i')],
83
84
  }
84
85
 
85
86
 
@@ -106,8 +107,8 @@ help_keys = {
106
107
  "search_input": [ord('/')],
107
108
  "settings_input": [ord('`')],
108
109
  "settings_options": [ord('~')],
109
- "continue_search_forward": [ord('n'), ord('i')],
110
- "continue_search_backward": [ord('N'), ord('I')],
110
+ "continue_search_forward": [ord('n')],
111
+ "continue_search_backward": [ord('N')],
111
112
  "cancel": [27], # Escape key
112
113
  "col_select": [ord('0'), ord('1'), ord('2'), ord('3'), ord('4'), ord('5'), ord('6'), ord('7'), ord('8'), ord('9')],
113
114
  "col_select_next": [ord('>')],
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.0
3
+ Version: 0.1.14.1
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