listpick 0.1.14.6__tar.gz → 0.1.14.8__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 (59) hide show
  1. {listpick-0.1.14.6 → listpick-0.1.14.8}/CHANGELOG.md +2 -0
  2. {listpick-0.1.14.6/src/listpick.egg-info → listpick-0.1.14.8}/PKG-INFO +1 -1
  3. {listpick-0.1.14.6 → listpick-0.1.14.8}/TODO.md +1 -1
  4. {listpick-0.1.14.6 → listpick-0.1.14.8}/setup.py +1 -1
  5. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/listpick_app.py +22 -8
  6. {listpick-0.1.14.6 → listpick-0.1.14.8/src/listpick.egg-info}/PKG-INFO +1 -1
  7. {listpick-0.1.14.6 → listpick-0.1.14.8}/.gitignore +0 -0
  8. {listpick-0.1.14.6 → listpick-0.1.14.8}/LICENSE.txt +0 -0
  9. {listpick-0.1.14.6 → listpick-0.1.14.8}/README.md +0 -0
  10. {listpick-0.1.14.6 → listpick-0.1.14.8}/assets/aria2tui_screenshot.png +0 -0
  11. {listpick-0.1.14.6 → listpick-0.1.14.8}/assets/file_compare.png +0 -0
  12. {listpick-0.1.14.6 → listpick-0.1.14.8}/assets/lpfman.png +0 -0
  13. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/data_generation/list_files.toml +0 -0
  14. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/data_generation/list_files_empty.toml +0 -0
  15. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/data_generation/video_duplicates.toml +0 -0
  16. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/data_generation/video_mediainfo.toml +0 -0
  17. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/input_files/polynomials.tsv +0 -0
  18. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/input_guides/gnuplot_graph.md +0 -0
  19. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/picker/auxiallary_files/2024-25_Premier_League.pkl +0 -0
  20. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/picker/footer_string_example.py +0 -0
  21. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/picker/picker_example.py +0 -0
  22. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/picker/template.py +0 -0
  23. {listpick-0.1.14.6 → listpick-0.1.14.8}/examples/picker/wikipedia_table.py +0 -0
  24. {listpick-0.1.14.6 → listpick-0.1.14.8}/listpick.py +0 -0
  25. {listpick-0.1.14.6 → listpick-0.1.14.8}/requirements.txt +0 -0
  26. {listpick-0.1.14.6 → listpick-0.1.14.8}/setup.cfg +0 -0
  27. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/__init__.py +0 -0
  28. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/__main__.py +0 -0
  29. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/__init__.py +0 -0
  30. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/build_help.py +0 -0
  31. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/footer.py +0 -0
  32. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/git-bugreport-2025-08-16-1438.txt +0 -0
  33. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/help_screen.py +0 -0
  34. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/input_field.py +0 -0
  35. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/keycodes.py +0 -0
  36. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/keys.py +0 -0
  37. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/pane_stuff.py +0 -0
  38. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/ui/picker_colours.py +0 -0
  39. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/__init__.py +0 -0
  40. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/clipboard_operations.py +0 -0
  41. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/config.py +0 -0
  42. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/dump.py +0 -0
  43. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/filtering.py +0 -0
  44. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/generate_data.py +0 -0
  45. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/options_selectors.py +0 -0
  46. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/paste_operations.py +0 -0
  47. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/picker_log.py +0 -0
  48. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/search_and_filter_utils.py +0 -0
  49. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/searching.py +0 -0
  50. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/sorting.py +0 -0
  51. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/table_to_list_of_lists.py +0 -0
  52. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick/utils/utils.py +0 -0
  53. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick.egg-info/SOURCES.txt +0 -0
  54. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick.egg-info/dependency_links.txt +0 -0
  55. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick.egg-info/entry_points.txt +0 -0
  56. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick.egg-info/requires.txt +0 -0
  57. {listpick-0.1.14.6 → listpick-0.1.14.8}/src/listpick.egg-info/top_level.txt +0 -0
  58. {listpick-0.1.14.6 → listpick-0.1.14.8}/tests/kitty_control.sh +0 -0
  59. {listpick-0.1.14.6 → listpick-0.1.14.8}/tests/sorting_dates.csv +0 -0
@@ -14,6 +14,8 @@ Note that the changes between 0.1.11.0 and 1.1.12.0 are listed under 0.1.11
14
14
  - This was necessary to ensure that we can pipe data in via stdin and still receive user input.
15
15
  - Bugs fixed:
16
16
  - Closing files causes issues switching between files.
17
+ - Fixed crash when loading non-existent config file.
18
+ - Fixed highlighted cell not being aligned in the way that we expect.
17
19
  - Create ~/.config/listpick directory for storing input history if it doesn't already exist.
18
20
  - Added error checking when opening files.
19
21
  - Added --headerless flag to prevent interpreting the first line of the input as the header.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.6
3
+ Version: 0.1.14.8
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
@@ -368,7 +368,7 @@ ASAP
368
368
  > - [x] Wrong data for some files.
369
369
  > - [x] Some can't be switched to...
370
370
  > - [x] Fixed.
371
- >
371
+ > - [x] Highlighted cells display padded cell string when it should not be padded.
372
372
 
373
373
 
374
374
 
@@ -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.6",
19
+ version = "0.1.14.8",
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.",
@@ -352,9 +352,17 @@ class Picker:
352
352
  size += sys.getsizeof(getattr(self, attr_name))
353
353
  return size
354
354
 
355
- def set_config(self, path: str ="~/.config/listpick/config.toml"):
355
+ def set_config(self, path: str ="~/.config/listpick/config.toml") -> bool:
356
356
  """ Set config from toml file. """
357
- config = self.get_config(path)
357
+ path = os.path.expanduser(os.path.expandvars(path))
358
+ if not os.path.exists(path):
359
+ return False
360
+ try:
361
+ config = self.get_config(path)
362
+ except Exception as e:
363
+ self.logger.error(f"get_config({path}) load error. {e}")
364
+ return False
365
+
358
366
  self.logger.info(f"function: set_config()")
359
367
  if "general" in config:
360
368
  for key, val in config["general"].items():
@@ -363,16 +371,17 @@ class Picker:
363
371
  setattr(self, key, val)
364
372
  except Exception as e:
365
373
  self.logger.error(f"set_config: key={key}, val={val}. {e}")
374
+ return True
375
+
366
376
 
367
377
 
368
378
  def get_config(self, path: str ="~/.config/listpick/config.toml") -> dict:
369
379
  """ Get config from file. """
370
380
  self.logger.info(f"function: get_config()")
371
381
  import toml
372
- if os.path.exists(os.path.expanduser(path)):
373
- with open(os.path.expanduser(path), "r") as f:
374
- config = toml.load(f)
375
- return config
382
+ with open(os.path.expanduser(path), "r") as f:
383
+ config = toml.load(f)
384
+ return config
376
385
 
377
386
  def calculate_section_sizes(self):
378
387
  """
@@ -867,10 +876,10 @@ class Picker:
867
876
  else:
868
877
  cell_value = self.indexed_items[row][1][col] + self.separator
869
878
  # cell_value = cell_value[:min(cell_width, cell_max_width)-len(self.separator)]
870
- cell_value = truncate_to_display_width(cell_value, min(cell_width, cell_max_width)-len(self.separator), self.unicode_char_width)
879
+ cell_value = truncate_to_display_width(cell_value, min(cell_width, cell_max_width)-len(self.separator), self.centre_in_cols, self.unicode_char_width)
871
880
  cell_value = cell_value + self.separator
872
881
  # cell_value = cell_value
873
- cell_value = truncate_to_display_width(cell_value, min(cell_width, cell_max_width), self.unicode_char_width)
882
+ cell_value = truncate_to_display_width(cell_value, min(cell_width, cell_max_width), self.centre_in_cols, self.unicode_char_width)
874
883
  # row_str = truncate_to_display_width(row_str_left_adj, min(w-self.startx, visible_columns_total_width))
875
884
  self.stdscr.addstr(y, cell_pos, cell_value, curses.color_pair(self.colours_start+colour_pair_number) | curses.A_BOLD)
876
885
  # Part of the cell is on screen
@@ -1112,6 +1121,7 @@ class Picker:
1112
1121
  "hidden_columns": [],
1113
1122
  "title": title,
1114
1123
  "reset_colours": False,
1124
+ "cell_cursor": False,
1115
1125
  }
1116
1126
 
1117
1127
  OptionPicker = Picker(submenu_win, **infobox_data)
@@ -1352,6 +1362,7 @@ class Picker:
1352
1362
  "cancel_is_back": True,
1353
1363
  "number_columns": False,
1354
1364
  "reset_colours": False,
1365
+ "cell_cursor": False,
1355
1366
  }
1356
1367
  while True:
1357
1368
  h, w = stdscr.getmaxyx()
@@ -1418,6 +1429,7 @@ class Picker:
1418
1429
  "loaded_file_states": [],
1419
1430
  "loaded_file": "",
1420
1431
  "loaded_file_index": 0,
1432
+ "cell_cursor": False,
1421
1433
  }
1422
1434
  OptionPicker = Picker(submenu_win, **notification_data)
1423
1435
  s, o, f = OptionPicker.run()
@@ -2297,6 +2309,7 @@ class Picker:
2297
2309
  "centre_in_terminal_vertical": True,
2298
2310
  "hidden_columns": [],
2299
2311
  "reset_colours": False,
2312
+ "cell_cursor": False,
2300
2313
 
2301
2314
  }
2302
2315
  OptionPicker = Picker(self.stdscr, **help_data)
@@ -2407,6 +2420,7 @@ class Picker:
2407
2420
  "centre_in_terminal_vertical": True,
2408
2421
  "hidden_columns": [],
2409
2422
  "reset_colours": False,
2423
+ "cell_cursor": False,
2410
2424
 
2411
2425
  }
2412
2426
  OptionPicker = Picker(self.stdscr, **info_data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: listpick
3
- Version: 0.1.14.6
3
+ Version: 0.1.14.8
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